Commit 2aeeeff8 2aeeeff8dd895a10d89a25b961acdce44fb0b436 by Sergey Poznyakoff

Reflect namespace changes

1 parent 5d383c02
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006
3 @c Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 4 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 5 @comment *******************************************************************
5 6
...@@ -70,8 +71,8 @@ The index @var{no} is outside of the range of available addresses. ...@@ -70,8 +71,8 @@ The index @var{no} is outside of the range of available addresses.
70 Invalid usage, usually a required argument was @code{NULL}. 71 Invalid usage, usually a required argument was @code{NULL}.
71 @end macro 72 @end macro
72 73
73 @deftp {Data Type} address_t 74 @deftp {Data Type} mu_address_t
74 The @code{address_t} object is used to hold information about a parsed 75 The @code{mu_address_t} object is used to hold information about a parsed
75 RFC822 address list, and is an opaque 76 RFC822 address list, and is an opaque
76 data structure to the user. Functions are provided to retrieve information 77 data structure to the user. Functions are provided to retrieve information
77 about an address in the address list. 78 about an address in the address list.
...@@ -81,7 +82,7 @@ about an address in the address list. ...@@ -81,7 +82,7 @@ about an address in the address list.
81 @c Functions. 82 @c Functions.
82 @c 83 @c
83 84
84 @deftypefun int address_create (address_t *@var{addr}, const char *@var{string}) 85 @deftypefun int mu_address_create (mu_address_t *@var{addr}, const char *@var{string})
85 This function allocates and initializes @var{addr} by parsing the 86 This function allocates and initializes @var{addr} by parsing the
86 RFC822 address-list @var{string}. 87 RFC822 address-list @var{string}.
87 88
...@@ -93,7 +94,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -93,7 +94,7 @@ The return value is @code{0} on success and a code number on error conditions:
93 @end table 94 @end table
94 @end deftypefun 95 @end deftypefun
95 96
96 @deftypefun int address_createv (address_t *@var{addr}, const char *@var{sv}, size_t @var{len}) 97 @deftypefun int mu_address_createv (mu_address_t *@var{addr}, const char *@var{sv}, size_t @var{len})
97 This function allocates and initializes @var{addr} by parsing the 98 This function allocates and initializes @var{addr} by parsing the
98 array of pointers to RFC822 address-lists in @var{sv}. If @var{len} is 99 array of pointers to RFC822 address-lists in @var{sv}. If @var{len} is
99 @code{-1}, then @var{sv} must be @code{NULL} terminated in the fashion of @var{argv}, 100 @code{-1}, then @var{sv} must be @code{NULL} terminated in the fashion of @var{argv},
...@@ -107,7 +108,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -107,7 +108,7 @@ The return value is @code{0} on success and a code number on error conditions:
107 @end table 108 @end table
108 @end deftypefun 109 @end deftypefun
109 110
110 @deftypefun void address_destroy (address_t *@var{addr}) 111 @deftypefun void mu_address_destroy (mu_address_t *@var{addr})
111 The @var{addr} is destroyed. 112 The @var{addr} is destroyed.
112 @end deftypefun 113 @end deftypefun
113 114
...@@ -115,10 +116,10 @@ The @var{addr} is destroyed. ...@@ -115,10 +116,10 @@ The @var{addr} is destroyed.
115 @c address_get_ 116 @c address_get_
116 @c 117 @c
117 118
118 @deftypefun int address_get_nth (address_t @var{addr}, size_t @var{no}, address_t *@var{ret}) 119 @deftypefun int mu_address_get_nth (mu_address_t @var{addr}, size_t @var{no}, mu_address_t *@var{ret})
119 @end deftypefun 120 @end deftypefun
120 121
121 @deftypefun int address_get_email (address_t @var{addr}, size_t @var{no}, char* @var{buf}, size_t @var{len}, size_t *@var{n}) 122 @deftypefun int mu_address_get_email (mu_address_t @var{addr}, size_t @var{no}, char* @var{buf}, size_t @var{len}, size_t *@var{n})
122 Accesses the @var{no}th email address component of the address list. This 123 Accesses the @var{no}th email address component of the address list. This
123 address is the plain email address, correctly quoted, suitable for 124 address is the plain email address, correctly quoted, suitable for
124 using in an smtp dialog, for example, or as the address part of 125 using in an smtp dialog, for example, or as the address part of
...@@ -134,7 +135,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -134,7 +135,7 @@ The return value is @code{0} on success and a code number on error conditions:
134 @end table 135 @end table
135 @end deftypefun 136 @end deftypefun
136 137
137 @deftypefun int address_get_local_part (address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n}) 138 @deftypefun int mu_address_get_local_part (mu_address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n})
138 Accesses the local-part of an email addr-spec extracted while 139 Accesses the local-part of an email addr-spec extracted while
139 parsing the @var{no}th email address. 140 parsing the @var{no}th email address.
140 141
...@@ -145,7 +146,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -145,7 +146,7 @@ The return value is @code{0} on success and a code number on error conditions:
145 @end table 146 @end table
146 @end deftypefun 147 @end deftypefun
147 148
148 @deftypefun int address_get_domain (address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n}) 149 @deftypefun int mu_address_get_domain (mu_address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n})
149 Accesses the domain of an email addr-spec extracted while 150 Accesses the domain of an email addr-spec extracted while
150 parsing the @var{no}th email address. This will be @code{0} 151 parsing the @var{no}th email address. This will be @code{0}
151 length for a unix-mbox. 152 length for a unix-mbox.
...@@ -157,7 +158,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -157,7 +158,7 @@ The return value is @code{0} on success and a code number on error conditions:
157 @end table 158 @end table
158 @end deftypefun 159 @end deftypefun
159 160
160 @deftypefun int address_get_personal (address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n}) 161 @deftypefun int mu_address_get_personal (mu_address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n})
161 Accesses the display-name describing the @var{no}th email address. This 162 Accesses the display-name describing the @var{no}th email address. This
162 display-name is optional, so may not be present. If it is not present, but 163 display-name is optional, so may not be present. If it is not present, but
163 there is an RFC822 comment after the address, that comment will be 164 there is an RFC822 comment after the address, that comment will be
...@@ -168,7 +169,7 @@ A group is a kind of a special case. It has a display-name, followed ...@@ -168,7 +169,7 @@ A group is a kind of a special case. It has a display-name, followed
168 by an optional mailbox-list. The display-name will be allocated an address 169 by an optional mailbox-list. The display-name will be allocated an address
169 all it's own, but all the other elements (local-part, domain, etc.) will 170 all it's own, but all the other elements (local-part, domain, etc.) will
170 be zero-length. So "a group: ;" is valid, will have a count of 1, but 171 be zero-length. So "a group: ;" is valid, will have a count of 1, but
171 @code{address_get_email()}, and all the rest, will return zero-length output. 172 @code{mu_address_get_email()}, and all the rest, will return zero-length output.
172 173
173 The return value is @code{0} on success and a code number on error conditions: 174 The return value is @code{0} on success and a code number on error conditions:
174 @table @code 175 @table @code
...@@ -177,7 +178,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -177,7 +178,7 @@ The return value is @code{0} on success and a code number on error conditions:
177 @end table 178 @end table
178 @end deftypefun 179 @end deftypefun
179 180
180 @deftypefun int address_get_comments (address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n}) 181 @deftypefun int mu_address_get_comments (mu_address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n})
181 Accesses the comments extracted while parsing the @var{no}th email address. 182 Accesses the comments extracted while parsing the @var{no}th email address.
182 These comments have no defined meaning, and are not currently collected. 183 These comments have no defined meaning, and are not currently collected.
183 184
...@@ -188,7 +189,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -188,7 +189,7 @@ The return value is @code{0} on success and a code number on error conditions:
188 @end table 189 @end table
189 @end deftypefun 190 @end deftypefun
190 191
191 @deftypefun int address_get_route (address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n}) 192 @deftypefun int mu_address_get_route (mu_address_t @var{addr}, size_t @var{no}, char *@var{buf}, size_t @var{len}, size_t *@var{n})
192 Accesses the route of an email addr-spec extracted while 193 Accesses the route of an email addr-spec extracted while
193 parsing the @var{no}th email address. This is a rarely used RFC822 address 194 parsing the @var{no}th email address. This is a rarely used RFC822 address
194 syntax, but is legal in SMTP as well. The entire route is returned as 195 syntax, but is legal in SMTP as well. The entire route is returned as
...@@ -205,7 +206,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -205,7 +206,7 @@ The return value is @code{0} on success and a code number on error conditions:
205 @c address_aget_ 206 @c address_aget_
206 @c 207 @c
207 208
208 @deftypefun int address_aget_email (address_t @var{addr}, size_t @var{no}, char **@var{bufp}) 209 @deftypefun int mu_address_aget_email (mu_address_t @var{addr}, size_t @var{no}, char **@var{bufp})
209 As above, but mallocs the email address, if present, 210 As above, but mallocs the email address, if present,
210 and write a pointer to it into @var{bufp}. @var{bufp} will be @code{NULL} 211 and write a pointer to it into @var{bufp}. @var{bufp} will be @code{NULL}
211 if there is no email address to return. 212 if there is no email address to return.
...@@ -217,20 +218,20 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -217,20 +218,20 @@ The return value is @code{0} on success and a code number on error conditions:
217 @end table 218 @end table
218 @end deftypefun 219 @end deftypefun
219 220
220 @deftypefun int address_aget_local_part (address_t @var{addr}, size_t @var{no}, char **@var{buf}) 221 @deftypefun int mu_address_aget_local_part (mu_address_t @var{addr}, size_t @var{no}, char **@var{buf})
221 @end deftypefun 222 @end deftypefun
222 223
223 @deftypefun int address_aget_domain (address_t @var{addr}, size_t @var{no}, char **@var{buf}) 224 @deftypefun int mu_address_aget_domain (mu_address_t @var{addr}, size_t @var{no}, char **@var{buf})
224 @end deftypefun 225 @end deftypefun
225 226
226 @deftypefun int address_aget_personal (address_t @var{addr}, size_t @var{no}, char **@var{buf}) 227 @deftypefun int mu_address_aget_personal (mu_address_t @var{addr}, size_t @var{no}, char **@var{buf})
227 @end deftypefun 228 @end deftypefun
228 229
229 @c 230 @c
230 @c ----------- 231 @c -----------
231 @c 232 @c
232 233
233 @deftypefun int address_is_group (address_t @var{addr}, size_t @var{no}, int *@var{yes}) 234 @deftypefun int mu_address_is_group (mu_address_t @var{addr}, size_t @var{no}, int *@var{yes})
234 Sets *@var{yes} to @code{1} if this address is just the name of a group, 235 Sets *@var{yes} to @code{1} if this address is just the name of a group,
235 @code{0} otherwise. This is faster than checking if the address has 236 @code{0} otherwise. This is faster than checking if the address has
236 a non-zero length personal, and a zero-length local_part and domain. 237 a non-zero length personal, and a zero-length local_part and domain.
...@@ -247,7 +248,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -247,7 +248,7 @@ The return value is @code{0} on success and a code number on error conditions:
247 @end table 248 @end table
248 @end deftypefun 249 @end deftypefun
249 250
250 @deftypefun int address_to_string (address_t *@var{addr}, char *@var{buf}, size_t @var{len}, size_t *@var{n}) 251 @deftypefun int mu_address_to_string (mu_address_t *@var{addr}, char *@var{buf}, size_t @var{len}, size_t *@var{n})
251 Returns the entire address list as a single RFC822 formatted address list. 252 Returns the entire address list as a single RFC822 formatted address list.
252 253
253 The return value is @code{0} on success and a code number on error conditions: 254 The return value is @code{0} on success and a code number on error conditions:
...@@ -257,7 +258,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -257,7 +258,7 @@ The return value is @code{0} on success and a code number on error conditions:
257 @end table 258 @end table
258 @end deftypefun 259 @end deftypefun
259 260
260 @deftypefun int address_get_count (address_t @var{addr}, size_t *@var{count}) 261 @deftypefun int mu_address_get_count (mu_address_t @var{addr}, size_t *@var{count})
261 Returns a count of the addresses in the address list. 262 Returns a count of the addresses in the address list.
262 263
263 If @var{addr} is @code{NULL}, the count is @code{0}. If @var{count} is 264 If @var{addr} is @code{NULL}, the count is @code{0}. If @var{count} is
...@@ -266,22 +267,22 @@ not @code{NULL}, the count will be written to *@var{count}. ...@@ -266,22 +267,22 @@ not @code{NULL}, the count will be written to *@var{count}.
266 The return value is @code{0}. 267 The return value is @code{0}.
267 @end deftypefun 268 @end deftypefun
268 269
269 @deftypefun int address_get_group_count (address_t @var{addr}, size_t *) 270 @deftypefun int mu_address_get_group_count (mu_address_t @var{addr}, size_t *)
270 @end deftypefun 271 @end deftypefun
271 272
272 @deftypefun int address_get_email_count (address_t @var{addr}, size_t *) 273 @deftypefun int mu_address_get_email_count (mu_address_t @var{addr}, size_t *)
273 @end deftypefun 274 @end deftypefun
274 275
275 @deftypefun int address_get_unix_mailbox_count (address_t @var{addr}, size_t *) 276 @deftypefun int mu_address_get_unix_mailbox_count (mu_address_t @var{addr}, size_t *)
276 @end deftypefun 277 @end deftypefun
277 278
278 @deftypefun int address_contains_email (address_t @var{addr}, const char *@var{email}) 279 @deftypefun int mu_address_contains_email (mu_address_t @var{addr}, const char *@var{email})
279 @end deftypefun 280 @end deftypefun
280 281
281 @deftypefun int address_union (address_t *@var{a}, address_t @var{b}) 282 @deftypefun int mu_address_union (mu_address_t *@var{a}, mu_address_t @var{b})
282 @end deftypefun 283 @end deftypefun
283 284
284 @deftypefun size_t address_format_string (address_t @var{addr}, char *@var{buf}, size_t @var{buflen}) 285 @deftypefun size_t mu_address_format_string (mu_address_t @var{addr}, char *@var{buf}, size_t @var{buflen})
285 @end deftypefun 286 @end deftypefun
286 287
287 @subheading Example 288 @subheading Example
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006
3 @c Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 4 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 5 @comment *******************************************************************
5 6
6 @smallexample 7 @smallexample
7 @code{/* Prefix @emph{attribute_} is reserved. */} 8 @code{/* Prefix @emph{mu_attribute_} is reserved. */}
8 @code{#include <mailutils/attribute.h>} 9 @code{#include <mailutils/attribute.h>}
9 @end smallexample 10 @end smallexample
10 11
11 @deftypefun int attribute_create (attribute_t *@var{attr}, void *) 12 @deftypefun int mu_attribute_create (mu_attribute_t *@var{attr}, void *)
12 @end deftypefun 13 @end deftypefun
13 14
14 @deftypefun void attribute_destroy (attribute_t *@var{attr}, void *) 15 @deftypefun void mu_attribute_destroy (mu_attribute_t *@var{attr}, void *)
15 @end deftypefun 16 @end deftypefun
16 17
17 @deftypefun void* attribute_get_owner (attribute_t @var{attr}) 18 @deftypefun void* mu_attribute_get_owner (mu_attribute_t @var{attr})
18 @end deftypefun 19 @end deftypefun
19 20
20 @deftypefun int attribute_is_modified (attribute_t @var{attr}) 21 @deftypefun int mu_attribute_is_modified (mu_attribute_t @var{attr})
21 @end deftypefun 22 @end deftypefun
22 23
23 @deftypefun int attribute_clear_modified (attribute_t @var{attr}) 24 @deftypefun int mu_attribute_clear_modified (mu_attribute_t @var{attr})
24 @end deftypefun 25 @end deftypefun
25 26
26 @deftypefun int attribute_set_modified (attribute_t @var{attr}) 27 @deftypefun int mu_attribute_set_modified (mu_attribute_t @var{attr})
27 @end deftypefun 28 @end deftypefun
28 29
29 @c 30 @c
30 @c _is_ 31 @c _is_
31 @c 32 @c
32 33
33 @deftypefun int attribute_is_userflag (attribute_t @var{attr}) 34 @deftypefun int mu_attribute_is_userflag (mu_attribute_t @var{attr})
34 @end deftypefun 35 @end deftypefun
35 36
36 @deftypefun int attribute_is_seen (attribute_t @var{attr}) 37 @deftypefun int mu_attribute_is_seen (mu_attribute_t @var{attr})
37 @end deftypefun 38 @end deftypefun
38 39
39 @deftypefun int attribute_is_answered (attribute_t @var{attr}) 40 @deftypefun int mu_attribute_is_answered (mu_attribute_t @var{attr})
40 @end deftypefun 41 @end deftypefun
41 42
42 @deftypefun int attribute_is_flagged (attribute_t @var{attr}) 43 @deftypefun int mu_attribute_is_flagged (mu_attribute_t @var{attr})
43 @end deftypefun 44 @end deftypefun
44 45
45 @deftypefun int attribute_is_deleted (attribute_t @var{attr}) 46 @deftypefun int mu_attribute_is_deleted (mu_attribute_t @var{attr})
46 @end deftypefun 47 @end deftypefun
47 48
48 @deftypefun int attribute_is_draft (attribute_t @var{attr}) 49 @deftypefun int mu_attribute_is_draft (mu_attribute_t @var{attr})
49 @end deftypefun 50 @end deftypefun
50 51
51 @deftypefun int attribute_is_recent (attribute_t @var{attr}) 52 @deftypefun int mu_attribute_is_recent (mu_attribute_t @var{attr})
52 @end deftypefun 53 @end deftypefun
53 54
54 @deftypefun int attribute_is_read (attribute_t @var{attr}) 55 @deftypefun int mu_attribute_is_read (mu_attribute_t @var{attr})
55 @end deftypefun 56 @end deftypefun
56 57
57 @c 58 @c
58 @c _set_ 59 @c _set_
59 @c 60 @c
60 61
61 @deftypefun int attribute_set_userflag (attribute_t @var{attr}, int) 62 @deftypefun int mu_attribute_set_userflag (mu_attribute_t @var{attr}, int)
62 @end deftypefun 63 @end deftypefun
63 64
64 @deftypefun int attribute_set_seen (attribute_t @var{attr}) 65 @deftypefun int mu_attribute_set_seen (mu_attribute_t @var{attr})
65 @end deftypefun 66 @end deftypefun
66 67
67 @deftypefun int attribute_set_answered (attribute_t @var{attr}) 68 @deftypefun int mu_attribute_set_answered (mu_attribute_t @var{attr})
68 @end deftypefun 69 @end deftypefun
69 70
70 @deftypefun int attribute_set_flagged (attribute_t @var{attr}) 71 @deftypefun int mu_attribute_set_flagged (mu_attribute_t @var{attr})
71 @end deftypefun 72 @end deftypefun
72 73
73 @deftypefun int attribute_set_deleted (attribute_t @var{attr}) 74 @deftypefun int mu_attribute_set_deleted (mu_attribute_t @var{attr})
74 @end deftypefun 75 @end deftypefun
75 76
76 @deftypefun int attribute_set_draft (attribute_t @var{attr}) 77 @deftypefun int mu_attribute_set_draft (mu_attribute_t @var{attr})
77 @end deftypefun 78 @end deftypefun
78 79
79 @deftypefun int attribute_set_recent (attribute_t @var{attr}) 80 @deftypefun int mu_attribute_set_recent (mu_attribute_t @var{attr})
80 @end deftypefun 81 @end deftypefun
81 82
82 @deftypefun int attribute_set_read (attribute_t @var{attr}) 83 @deftypefun int mu_attribute_set_read (mu_attribute_t @var{attr})
83 @end deftypefun 84 @end deftypefun
84 85
85 @c 86 @c
86 @c _unset_ 87 @c _unset_
87 @c 88 @c
88 89
89 @deftypefun int attribute_unset_userflag (attribute_t @var{attr}, int) 90 @deftypefun int mu_attribute_unset_userflag (mu_attribute_t @var{attr}, int)
90 @end deftypefun 91 @end deftypefun
91 92
92 @deftypefun int attribute_unset_seen (attribute_t @var{attr}) 93 @deftypefun int mu_attribute_unset_seen (mu_attribute_t @var{attr})
93 @end deftypefun 94 @end deftypefun
94 95
95 @deftypefun int attribute_unset_answered (attribute_t @var{attr}) 96 @deftypefun int mu_attribute_unset_answered (mu_attribute_t @var{attr})
96 @end deftypefun 97 @end deftypefun
97 98
98 @deftypefun int attribute_unset_flagged (attribute_t @var{attr}) 99 @deftypefun int mu_attribute_unset_flagged (mu_attribute_t @var{attr})
99 @end deftypefun 100 @end deftypefun
100 101
101 @deftypefun int attribute_unset_deleted (attribute_t @var{attr}) 102 @deftypefun int mu_attribute_unset_deleted (mu_attribute_t @var{attr})
102 @end deftypefun 103 @end deftypefun
103 104
104 @deftypefun int attribute_unset_draft (attribute_t @var{attr}) 105 @deftypefun int mu_attribute_unset_draft (mu_attribute_t @var{attr})
105 @end deftypefun 106 @end deftypefun
106 107
107 @deftypefun int attribute_unset_recent (attribute_t @var{attr}) 108 @deftypefun int mu_attribute_unset_recent (mu_attribute_t @var{attr})
108 @end deftypefun 109 @end deftypefun
109 110
110 @deftypefun int attribute_unset_read (attribute_t @var{attr}) 111 @deftypefun int mu_attribute_unset_read (mu_attribute_t @var{attr})
111 @end deftypefun 112 @end deftypefun
112 113
113 @c 114 @c
114 @c ---------- 115 @c ----------
115 @c 116 @c
116 117
117 @deftypefun int attribute_get_flags (attribute_t @var{attr}, int *) 118 @deftypefun int mu_attribute_get_flags (mu_attribute_t @var{attr}, int *)
118 @end deftypefun 119 @end deftypefun
119 120
120 @deftypefun int attribute_set_flags (attribute_t @var{attr}, int) 121 @deftypefun int mu_attribute_set_flags (mu_attribute_t @var{attr}, int)
121 @end deftypefun 122 @end deftypefun
122 123
123 @deftypefun int attribute_unset_flags (attribute_t @var{attr}, int) 124 @deftypefun int mu_attribute_unset_flags (mu_attribute_t @var{attr}, int)
124 @end deftypefun 125 @end deftypefun
125 126
126 @deftypefun int attribute_set_set_flags (attribute_t @var{attr}, int (*@var{_set_flags}) (attribute_t, int), void *) 127 @deftypefun int mu_attribute_set_set_flags (mu_attribute_t @var{attr}, int (*@var{_set_flags}) (mu_attribute_t, int), void *)
127 @end deftypefun 128 @end deftypefun
128 129
129 @deftypefun int attribute_set_unset_flags (attribute_t @var{attr}, int (*@var{_unset_flags}) (attribute_t, int), void *) 130 @deftypefun int mu_attribute_set_unset_flags (mu_attribute_t @var{attr}, int (*@var{_unset_flags}) (mu_attribute_t, int), void *)
130 @end deftypefun 131 @end deftypefun
131 132
132 @deftypefun int attribute_set_get_flags (attribute_t @var{attr}, int (*@var{_get_flags}) (attribute_t, int *), void *) 133 @deftypefun int mu_attribute_set_get_flags (mu_attribute_t @var{attr}, int (*@var{_get_flags}) (mu_attribute_t, int *), void *)
133 @end deftypefun 134 @end deftypefun
134 135
135 @c 136 @c
136 @c ---------- 137 @c ----------
137 @c 138 @c
138 139
139 @deftypefun int attribute_is_equal (attribute_t @var{attr1}, attribute_t @var{attr2}) 140 @deftypefun int mu_attribute_is_equal (mu_attribute_t @var{attr1}, mu_attribute_t @var{attr2})
140 @end deftypefun 141 @end deftypefun
141 142
142 @deftypefun int attribute_copy (attribute_t @var{dst}, attribute_t @var{src}) 143 @deftypefun int mu_attribute_copy (mu_attribute_t @var{dst}, mu_attribute_t @var{src})
143 @end deftypefun 144 @end deftypefun
144 145
145 @deftypefun int attribute_to_string (attribute_t @var{attr}, char *@var{buf}, size_t @var{len}, size_t *@var{writen}) 146 @deftypefun int mu_attribute_to_string (mu_attribute_t @var{attr}, char *@var{buf}, size_t @var{len}, size_t *@var{writen})
146 @end deftypefun 147 @end deftypefun
147 148
148 @deftypefun int string_to_flags (const char *@var{buf}, int *) 149 @deftypefun int string_to_flags (const char *@var{buf}, int *)
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefixes @emph{authority_}, @emph{ticket_}, and @emph{wicket_} are reserved. */} 7 @code{/* Prefixes @emph{mu_authority_}, @emph{mu_ticket_}, and @emph{mu_wicket_} are reserved. */}
8 @code{#include <mailutils/auth.h>} 8 @code{#include <mailutils/auth.h>}
9 9
10 @end smallexample 10 @end smallexample
11 11
12 There are many ways to authenticate to a server. To be flexible the 12 There are many ways to authenticate to a server. To be flexible the
13 authentication process is provided by three objects @code{authority_t}, 13 authentication process is provided by three objects @code{mu_authority_t},
14 @code{ticket_t}, and @code{wicket_t}. The @code{authority_t} can implement 14 @code{mu_ticket_t}, and @code{mu_wicket_t}. The @code{mu_authority_t} can implement
15 different protocol like APOP, MD5-AUTH, One Time Passwd, etc. By default 15 different protocol like APOP, MD5-AUTH, One Time Passwd, etc. By default
16 if a mailbox does not understand or know how to authenticate it falls back 16 if a mailbox does not understand or know how to authenticate it falls back
17 to user/passwd authentication. The @code{ticket_t} is a way for 17 to user/passwd authentication. The @code{mu_ticket_t} is a way for
18 Mailboxes and Mailers provide a way to authenticate when the URL does not 18 Mailboxes and Mailers provide a way to authenticate when the URL does not
19 contain enough information. The default action is to call the function 19 contain enough information. The default action is to call the function
20 @code{authority_authenticate()} which will get the @emph{user} and @emph{passwd} 20 @code{mu_authority_authenticate()} which will get the @emph{user} and @emph{passwd}
21 if not set, this function can be overridden by a custom method. 21 if not set, this function can be overridden by a custom method.
22 22
23 @c 23 @c
24 @c Ticket 24 @c Ticket
25 @c 25 @c
26 26
27 @deftypefun int ticket_create (ticket_t *, void *@var{owner}) 27 @deftypefun int mu_ticket_create (mu_ticket_t *, void *@var{owner})
28 @end deftypefun 28 @end deftypefun
29 29
30 @deftypefun void ticket_destroy (ticket_t *, void *@var{owner}) 30 @deftypefun void mu_ticket_destroy (mu_ticket_t *, void *@var{owner})
31 @end deftypefun 31 @end deftypefun
32 32
33 @deftypefun int ticket_set_destroy (ticket_t, void (*) (ticket_t), void *@var{owner}) 33 @deftypefun int mu_ticket_set_destroy (mu_ticket_t, void (*) (mu_ticket_t), void *@var{owner})
34 @end deftypefun 34 @end deftypefun
35 35
36 @deftypefun void* ticket_get_owner (ticket_t) 36 @deftypefun void* mu_ticket_get_owner (mu_ticket_t)
37 @end deftypefun 37 @end deftypefun
38 38
39 @deftypefun int ticket_set_pop (ticket_t, int (*@var{_pop}) (ticket_t, url_t, const char *, char **), void *) 39 @deftypefun int mu_ticket_set_pop (mu_ticket_t, int (*@var{_pop}) (mu_ticket_t, url_t, const char *, char **), void *)
40 @end deftypefun 40 @end deftypefun
41 41
42 @deftypefun int ticket_pop (ticket_t, url_t, const char *, char **) 42 @deftypefun int mu_ticket_pop (mu_ticket_t, url_t, const char *, char **)
43 @end deftypefun 43 @end deftypefun
44 44
45 @deftypefun int ticket_set_data (ticket_t, void *, void *@var{owner}) 45 @deftypefun int mu_ticket_set_data (mu_ticket_t, void *, void *@var{owner})
46 @end deftypefun 46 @end deftypefun
47 47
48 @deftypefun int ticket_get_data (ticket_t, void **) 48 @deftypefun int mu_ticket_get_data (mu_ticket_t, void **)
49 @end deftypefun 49 @end deftypefun
50 50
51 @c 51 @c
...@@ -54,28 +54,28 @@ if not set, this function can be overridden by a custom method. ...@@ -54,28 +54,28 @@ if not set, this function can be overridden by a custom method.
54 54
55 @sp 1 55 @sp 1
56 56
57 @deftypefun int authority_create (authority_t *, ticket_t, void *) 57 @deftypefun int mu_authority_create (mu_authority_t *, mu_ticket_t, void *)
58 @end deftypefun 58 @end deftypefun
59 59
60 @deftypefun void authority_destroy (authority_t *, void *) 60 @deftypefun void mu_authority_destroy (mu_authority_t *, void *)
61 @end deftypefun 61 @end deftypefun
62 62
63 @deftypefun void* authority_get_owner (authority_t) 63 @deftypefun void* mu_authority_get_owner (mu_authority_t)
64 @end deftypefun 64 @end deftypefun
65 65
66 @deftypefun int authority_set_ticket (authority_t, ticket_t) 66 @deftypefun int mu_authority_set_ticket (mu_authority_t, mu_ticket_t)
67 @end deftypefun 67 @end deftypefun
68 68
69 @deftypefun int authority_get_ticket (authority_t, ticket_t *) 69 @deftypefun int mu_authority_get_ticket (mu_authority_t, mu_ticket_t *)
70 @end deftypefun 70 @end deftypefun
71 71
72 @deftypefun int authority_authenticate (authority_t) 72 @deftypefun int mu_authority_authenticate (mu_authority_t)
73 @end deftypefun 73 @end deftypefun
74 74
75 @deftypefun int authority_set_authenticate (authority_t, int (*@var{_authenticate}) (authority_t), void *) 75 @deftypefun int mu_authority_set_authenticate (mu_authority_t, int (*@var{_authenticate}) (mu_authority_t), void *)
76 @end deftypefun 76 @end deftypefun
77 77
78 @deftypefun int authority_create_null (authority_t *@var{authority}, void *@var{owner}) 78 @deftypefun int mu_authority_create_null (mu_authority_t *@var{authority}, void *@var{owner})
79 @end deftypefun 79 @end deftypefun
80 80
81 @c 81 @c
...@@ -84,22 +84,22 @@ if not set, this function can be overridden by a custom method. ...@@ -84,22 +84,22 @@ if not set, this function can be overridden by a custom method.
84 84
85 @sp 1 85 @sp 1
86 86
87 @deftypefun int wicket_create (wicket_t *, const char *) 87 @deftypefun int mu_wicket_create (mu_wicket_t *, const char *)
88 @end deftypefun 88 @end deftypefun
89 89
90 @deftypefun void wicket_destroy (wicket_t *) 90 @deftypefun void mu_wicket_destroy (mu_wicket_t *)
91 @end deftypefun 91 @end deftypefun
92 92
93 @deftypefun int wicket_set_filename (wicket_t, const char *) 93 @deftypefun int mu_wicket_set_filename (mu_wicket_t, const char *)
94 @end deftypefun 94 @end deftypefun
95 95
96 @deftypefun int wicket_get_filename (wicket_t, char *, size_t, size_t *) 96 @deftypefun int mu_wicket_get_filename (mu_wicket_t, char *, size_t, size_t *)
97 @end deftypefun 97 @end deftypefun
98 98
99 @deftypefun int wicket_set_ticket (wicket_t, int (*) (wicket_t, const char *, const char *, ticket_t *)) 99 @deftypefun int mu_wicket_set_ticket (mu_wicket_t, int (*) (mu_wicket_t, const char *, const char *, mu_ticket_t *))
100 @end deftypefun 100 @end deftypefun
101 101
102 @deftypefun int wicket_get_ticket (wicket_t, ticket_t *, const char *, const char *) 102 @deftypefun int mu_wicket_get_ticket (mu_wicket_t, mu_ticket_t *, const char *, const char *)
103 @end deftypefun 103 @end deftypefun
104 104
105 @c 105 @c
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{body_} is reserved. */} 7 @code{/* Prefix @emph{mu_body_} is reserved. */}
8 @code{#include <mailutils/body.h>} 8 @code{#include <mailutils/body.h>}
9 @end smallexample 9 @end smallexample
10 10
11 @deftypefun int body_create (body_t *@var{body}, void *@var{owner}) 11 @deftypefun int mu_body_create (mu_body_t *@var{body}, void *@var{owner})
12 Initialize an object @var{body}. 12 Initialize an object @var{body}.
13 @end deftypefun 13 @end deftypefun
14 14
15 @deftypefun void body_destroy (body_t *@var{body}) 15 @deftypefun void mu_body_destroy (mu_body_t *@var{body})
16 The resources allocated are release. 16 The resources allocated are release.
17 @end deftypefun 17 @end deftypefun
18 18
19 @deftypefun void* body_get_owner (body_t @var{body}) 19 @deftypefun void* mu_body_get_owner (mu_body_t @var{body})
20 @end deftypefun 20 @end deftypefun
21 21
22 @deftypefun int body_is_modified (body_t @var{body}) 22 @deftypefun int mu_body_is_modified (mu_body_t @var{body})
23 @end deftypefun 23 @end deftypefun
24 24
25 @deftypefun int body_clear_modified (body_t @var{body}) 25 @deftypefun int mu_body_clear_modified (mu_body_t @var{body})
26 @end deftypefun 26 @end deftypefun
27 27
28 @c 28 @c
29 @c ----------- 29 @c -----------
30 @c 30 @c
31 31
32 @deftypefun int body_get_stream (body_t @var{body}, stream_t *@var{stream}) 32 @deftypefun int mu_body_get_stream (mu_body_t @var{body}, stream_t *@var{stream})
33 @end deftypefun 33 @end deftypefun
34 34
35 @deftypefun int body_set_stream (body_t @var{body}, stream_t @var{stream}, void *@var{owner}) 35 @deftypefun int mu_body_set_stream (mu_body_t @var{body}, stream_t @var{stream}, void *@var{owner})
36 @end deftypefun 36 @end deftypefun
37 37
38 @deftypefun int body_get_filename (body_t @var{body}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{writen}) 38 @deftypefun int mu_body_get_filename (mu_body_t @var{body}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{writen})
39 @end deftypefun 39 @end deftypefun
40 40
41 @deftypefun int body_size (body_t @var{body}, size_t *@var{size}) 41 @deftypefun int mu_body_size (mu_body_t @var{body}, size_t *@var{size})
42 @end deftypefun 42 @end deftypefun
43 43
44 @deftypefun int body_set_size (body_t @var{body}, int (*@var{_size}) (body_t, size_t *), void *@var{owner}) 44 @deftypefun int mu_body_set_size (mu_body_t @var{body}, int (*@var{_size}) (mu_body_t, size_t *), void *@var{owner})
45 @end deftypefun 45 @end deftypefun
46 46
47 @deftypefun int body_lines (body_t @var{body}, size_t *@var{lines}) 47 @deftypefun int mu_body_lines (mu_body_t @var{body}, size_t *@var{lines})
48 @end deftypefun 48 @end deftypefun
49 49
50 @deftypefun int body_set_lines (body_t @var{body}, int (*@var{_lines}) (body_t, size_t *), void *@var{owner}) 50 @deftypefun int mu_body_set_lines (mu_body_t @var{body}, int (*@var{_lines}) (mu_body_t, size_t *), void *@var{owner})
51 @end deftypefun 51 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{envelope_} is reserved. */} 7 @code{/* Prefix @emph{mu_envelope_} is reserved. */}
8 @code{#include <mailutils/envelope.h>} 8 @code{#include <mailutils/envelope.h>}
9 @end smallexample 9 @end smallexample
10 10
11 @deftypefun int envelope_create (envelope_t *, void *) 11 @deftypefun int mu_envelope_create (mu_envelope_t *, void *)
12 Primarily for internal use. 12 Primarily for internal use.
13 @end deftypefun 13 @end deftypefun
14 14
15 @deftypefun void envelope_destroy (envelope_t *, void *) 15 @deftypefun void mu_envelope_destroy (mu_envelope_t *, void *)
16 Primarily for internal use. 16 Primarily for internal use.
17 @end deftypefun 17 @end deftypefun
18 18
19 @deftypefun void* envelope_get_owner (envelope_t) 19 @deftypefun void* mu_envelope_get_owner (mu_envelope_t)
20 @end deftypefun 20 @end deftypefun
21 21
22 @c 22 @c
23 @c ---------- 23 @c ----------
24 @c 24 @c
25 25
26 @deftypefun int envelope_sender (envelope_t, char *, size_t, size_t *) 26 @deftypefun int mu_envelope_sender (mu_envelope_t, char *, size_t, size_t *)
27 Get the address that this message was reportedly received from. This 27 Get the address that this message was reportedly received from. This
28 would be the "mail from" argument if the message was delivered 28 would be the "mail from" argument if the message was delivered
29 or received via SMTP, for example. 29 or received via SMTP, for example.
30 @end deftypefun 30 @end deftypefun
31 31
32 @deftypefun int envelope_set_sender (envelope_t, int (*@var{_sender}) (envelope_t, char *, size_t, size_t *), void *) 32 @deftypefun int mu_envelope_set_sender (mu_envelope_t, int (*@var{_sender}) (mu_envelope_t, char *, size_t, size_t *), void *)
33 Primarily for internal use. The implementation of @code{envelope_t} depends 33 Primarily for internal use. The implementation of @code{mu_envelope_t} depends
34 on the mailbox type, this allows the function which actually gets 34 on the mailbox type, this allows the function which actually gets
35 the sender to be set by the creator of an @code{envelope_t}. 35 the sender to be set by the creator of an @code{mu_envelope_t}.
36 @end deftypefun 36 @end deftypefun
37 37
38 @deftypefun int envelope_date (envelope_t, char *, size_t, size_t *) 38 @deftypefun int mu_envelope_date (mu_envelope_t, char *, size_t, size_t *)
39 Get the date that the message was delivered to the mailbox, in 39 Get the date that the message was delivered to the mailbox, in
40 something close to ANSI @code{ctime()} format: Mon Jul 05 13:08:27 1999. 40 something close to ANSI @code{ctime()} format: Mon Jul 05 13:08:27 1999.
41 @end deftypefun 41 @end deftypefun
42 42
43 @deftypefun int envelope_set_date (envelope_t, int (*@var{_date}) (envelope_t, char *, size_t, size_t *), void *) 43 @deftypefun int mu_envelope_set_date (mu_envelope_t, int (*@var{_date}) (mu_envelope_t, char *, size_t, size_t *), void *)
44 Primarily for internal use. The implementation of @code{envelope_t} depends 44 Primarily for internal use. The implementation of @code{mu_envelope_t} depends
45 on the mailbox type, this allows the function which actually gets 45 on the mailbox type, this allows the function which actually gets
46 the date to be set by the creator of an @code{envelope_t}. 46 the date to be set by the creator of an @code{mu_envelope_t}.
47 @end deftypefun 47 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{folder_} is reserved. */} 7 @code{/* Prefix @emph{mu_folder_} is reserved. */}
8 @code{#include <mailutils/folder.h>} 8 @code{#include <mailutils/folder.h>}
9 9
10 @end smallexample 10 @end smallexample
11 11
12 @smallexample 12 @smallexample
13 @group 13 @group
14 folder_t url_t 14 mu_folder_t mu_url_t
15 -/var/mail- +---//--->/-----------------\ +-->/-----------\ 15 -/var/mail- +---//--->/-------------------\ +-->/-----------\
16 ( alain *-)-+ | | url_t *-|---+ | port | 16 ( alain *-)-+ | | mu_url_t *-|---+ | port |
17 ---------- | | |-----------------+ | hostname | 17 ---------- | | |-------------------+ | hostname |
18 ( jakob *-)-+--+ | observer_t *-| | file | 18 ( jakob *-)-+--+ | mu_observer_t *-| | file |
19 ---------- | |-----------------+ | ... | 19 ---------- | |-------------------+ | ... |
20 ( jeff *-)-+ | stream_t | \-----------/ 20 ( jeff *-)-+ | mu_stream_t | \-----------/
21 ---------- | |-----------------| 21 ---------- | |-------------------|
22 ( sean *-)-+ | auth_t | 22 ( sean *-)-+ | mu_auth_t |
23 ---------- |-----------------| 23 ---------- |-------------------|
24 | mailbox_t(1) | 24 | mu_mailbox_t(1) |
25 |-----------------| 25 |-------------------|
26 | mailbox_t(2) | 26 | mu_mailbox_t(2) |
27 | ...... | 27 | ...... |
28 | mailbox_t(n) | 28 | mu_mailbox_t(n) |
29 \-----------------/ 29 \-----------------/
30 @end group 30 @end group
31 @end smallexample 31 @end smallexample
...@@ -34,18 +34,13 @@ Data structures: ...@@ -34,18 +34,13 @@ Data structures:
34 34
35 @smallexample 35 @smallexample
36 @group 36 @group
37 struct list_response 37 struct mu_list_response
38 @{ 38 @{
39 int type; 39 int type;
40 int separator; 40 int separator;
41 char *name; 41 char *name;
42 @}; 42 @};
43 43
44 struct folder_list
45 @{
46 struct list_response **element;
47 size_t num;
48 @};
49 @end group 44 @end group
50 @end smallexample 45 @end smallexample
51 46
...@@ -53,85 +48,82 @@ struct folder_list ...@@ -53,85 +48,82 @@ struct folder_list
53 @c Constructor/Destructor and possible types. 48 @c Constructor/Destructor and possible types.
54 @c 49 @c
55 50
56 @deftypefun int folder_create (folder_t *, const char *@var{url}) 51 @deftypefun int mu_folder_create (mu_folder_t *, const char *@var{url})
57 @end deftypefun
58
59 @deftypefun void folder_destroy (folder_t *)
60 @end deftypefun 52 @end deftypefun
61 53
62 @deftypefun int folder_open (folder_t, int @var{flag}) 54 @deftypefun void mu_folder_destroy (mu_folder_t *)
63 @end deftypefun 55 @end deftypefun
64 56
65 @deftypefun int folder_close (folder_t) 57 @deftypefun int mu_folder_open (mu_folder_t, int @var{flag})
66 @end deftypefun 58 @end deftypefun
67 59
68 @deftypefun int folder_delete (folder_t, const char *@var{mailbox}) 60 @deftypefun int mu_folder_close (mu_folder_t)
69 @end deftypefun 61 @end deftypefun
70 62
71 @deftypefun int folder_rename (folder_t, const char *, const char *@var{mailbox}) 63 @deftypefun int mu_folder_delete (mu_folder_t, const char *@var{mailbox})
72 @end deftypefun 64 @end deftypefun
73 65
74 @deftypefun int folder_subscribe (folder_t, const char *@var{mailbox}) 66 @deftypefun int mu_folder_rename (mu_folder_t, const char *, const char *@var{mailbox})
75 @end deftypefun 67 @end deftypefun
76 68
77 @deftypefun int folder_unsubscribe (folder_t, const char *@var{mailbox}) 69 @deftypefun int mu_folder_subscribe (mu_folder_t, const char *@var{mailbox})
78 @end deftypefun 70 @end deftypefun
79 71
80 @deftypefun int folder_list (folder_t, const char *@var{ref}, const char *@var{wcard}, struct folder_list *) 72 @deftypefun int mu_folder_unsubscribe (mu_folder_t, const char *@var{mailbox})
81 @end deftypefun 73 @end deftypefun
82 74
83 @deftypefun int folder_lsub (folder_t, const char *@var{ref}, const char *@var{wcard}, struct folder_list *) 75 @deftypefun int mu_folder_list (mu_folder_t, const char *@var{ref}, const char *@var{wcard}, size_t @var{size}, mu_list_t *@var{list})
84 @end deftypefun 76 @end deftypefun
85 77
86 @deftypefun int folder_list_destroy (struct folder_list *) 78 @deftypefun int mu_folder_lsub (mu_folder_t, const char *@var{ref}, const char *@var{wcard}, mu_list_t *@var{list})
87 @end deftypefun 79 @end deftypefun
88 80
89 @c 81 @c
90 @c Stream Settings. 82 @c Stream Settings.
91 @c 83 @c
92 84
93 @deftypefun int folder_get_stream (folder_t, stream_t *) 85 @deftypefun int mu_folder_get_stream (mu_folder_t, mu_stream_t *)
94 @end deftypefun 86 @end deftypefun
95 87
96 @deftypefun int folder_set_stream (folder_t, stream_t) 88 @deftypefun int mu_folder_set_stream (mu_folder_t, mu_stream_t)
97 @end deftypefun 89 @end deftypefun
98 90
99 @c 91 @c
100 @c Notifications. 92 @c Notifications.
101 @c 93 @c
102 94
103 @deftypefun int folder_get_observable (folder_t, observable_t *) 95 @deftypefun int mu_folder_get_observable (mu_folder_t, mu_observable_t *)
104 @end deftypefun 96 @end deftypefun
105 97
106 @c 98 @c
107 @c Debug. 99 @c Debug.
108 @c 100 @c
109 101
110 @deftypefun int folder_has_debug (folder_t) 102 @deftypefun int mu_folder_has_debug (mu_folder_t)
111 @end deftypefun 103 @end deftypefun
112 104
113 @deftypefun int folder_get_debug (folder_t, mu_debug_t *) 105 @deftypefun int mu_folder_get_debug (mu_folder_t, mu_debug_t *)
114 @end deftypefun 106 @end deftypefun
115 107
116 @deftypefun int folder_set_debug (folder_t, mu_debug_t) 108 @deftypefun int mu_folder_set_debug (mu_folder_t, mu_debug_t)
117 @end deftypefun 109 @end deftypefun
118 110
119 @c 111 @c
120 @c Authentication. 112 @c Authentication.
121 @c 113 @c
122 114
123 @deftypefun int folder_get_authority (folder_t, authority_t *) 115 @deftypefun int mu_folder_get_authority (mu_folder_t, mu_authority_t *)
124 @end deftypefun 116 @end deftypefun
125 117
126 @deftypefun int folder_set_authority (folder_t, authority_t) 118 @deftypefun int mu_folder_set_authority (mu_folder_t, mu_authority_t)
127 @end deftypefun 119 @end deftypefun
128 120
129 @c 121 @c
130 @c URL. 122 @c URL.
131 @c 123 @c
132 124
133 @deftypefun int folder_get_url (folder_t, url_t *) 125 @deftypefun int mu_folder_get_url (mu_folder_t, mu_url_t *)
134 @end deftypefun 126 @end deftypefun
135 127
136 @deftypefun int folder_set_url (folder_t, url_t) 128 @deftypefun int mu_folder_set_url (mu_folder_t, mu_url_t)
137 @end deftypefun 129 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
...@@ -33,39 +33,39 @@ etc ..). ...@@ -33,39 +33,39 @@ etc ..).
33 33
34 @smallexample 34 @smallexample
35 @group 35 @group
36 folder_t url_t 36 mu_folder_t mu_url_t
37 -/var/mail- +- .. ->+-----------------+ +-->+------------+ 37 -/var/mail- +- .. ->+-------------------+ +-->+------------+
38 ( alain *-)-+ | | url_t *-|---+ | port | 38 ( alain *-)-+ | | mu_url_t *-|---+ | port |
39 ---------- | | |-----------------| | hostname | 39 ---------- | | |-------------------| | hostname |
40 ( jakob *-)-+--+ | auth_t *-|---+ | file | 40 ( jakob *-)-+--+ | mu_auth_t *-|---+ | file |
41 ---------- | |-----------------| | | ... | 41 ---------- | |-------------------| | | ... |
42 ( jeff *-)-+ | stream_t | | +------------+ 42 ( jeff *-)-+ | mu_stream_t | | +------------+
43 ---------- | |-----------------| | 43 ---------- | |-------------------| |
44 ( shaleh*-)-+ | ..... | | auth_t 44 ( shaleh*-)-+ | ..... | | mu_auth_t
45 ---------- |-----------------| +-->+------------+ 45 ---------- |-------------------| +-->+-------------+
46 +---|-* mailbox_t[] | | ticket_t | 46 +---|-* mu_mailbox_t[] | | mu_ticket_t |
47 mailbox_t | +-----------------+ +------------+ 47 mu_mailbox_t | +-------------------+ +-------------+
48 +----------------+<-+ 48 +-------------------+
49 | locker_t *--|-------------+ 49 | mu_locker_t *--|-------------+
50 |----------------| | 50 |-------------------| |
51 | url_t | | locker_t 51 | mu_url_t | | mu_locker_t
52 |----------------| +-------->+---------+ 52 |-------------------| +-------->+---------+
53 | stream_t | | lock | 53 | mu_stream_t | | lock |
54 |----------------| | unlock | 54 |-------------------| | unlock |
55 | message_t[] *-|-------+ +---------+ 55 | mu_message_t[] *-|-------+ +---------+
56 +----------------+ | envelope_t 56 +-------------------+ | mu_envelope_t
57 | +-------->+-----------+ 57 | +-------->+-----------+
58 message_t | | | date | 58 mu_message_t | | | date |
59 +----------------+<------+ | | from | 59 +-------------------+<------+ | | from |
60 | envelope_t *-|------------------+ | to | 60 | mu_envelope_t *-|------------------+ | to |
61 |----------------| header_t +-----------+ 61 |-------------------| mu_header_t +-----------+
62 | header_t *-|------------>+--------------+ 62 | mu_header_t *-|------------>+-----------------+
63 |----------------| | stream_t | 63 |-------------------| | mu_stream_t |
64 | body_t *-|----+ +--------------+ 64 | mu_body_t *-|----+ +-----------------+
65 +----------------+ | body_t 65 +-------------------+ | mu_body_t
66 +-->+--------------+ 66 +-->+-----------------+
67 | stream_t | 67 | mu_stream_t |
68 +--------------+ 68 +-----------------+
69 @end group 69 @end group
70 @end smallexample 70 @end smallexample
71 71
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{header_} is reserved. */} 7 @code{/* Prefix @emph{mu_header_} is reserved. */}
8 @code{#include <mailutils/header.h>} 8 @code{#include <mailutils/header.h>}
9 9
10 @end smallexample 10 @end smallexample
...@@ -12,29 +12,29 @@ ...@@ -12,29 +12,29 @@
12 So far we plan support for RFC822 and plan for RFC1522. With RFC1522 non-ASCII 12 So far we plan support for RFC822 and plan for RFC1522. With RFC1522 non-ASCII
13 characters will be encoded. 13 characters will be encoded.
14 14
15 @deftypefun int header_create (header_t *@var{hdr}, const char *@var{blurb}, size_t @var{len}, void *@var{owner}) 15 @deftypefun int mu_header_create (mu_header_t *@var{hdr}, const char *@var{blurb}, size_t @var{len}, void *@var{owner})
16 Initialize a @var{hdr} to a supported type. If @var{blurb} is not @code{NULL}, 16 Initialize a @var{hdr} to a supported type. If @var{blurb} is not @code{NULL},
17 it is parsed. 17 it is parsed.
18 @end deftypefun 18 @end deftypefun
19 19
20 @deftypefun void header_destroy (header_t *@var{hdr}, void *@var{owner}) 20 @deftypefun void mu_header_destroy (mu_header_t *@var{hdr}, void *@var{owner})
21 The resources allocated for @var{hdr} are freed. 21 The resources allocated for @var{hdr} are freed.
22 @end deftypefun 22 @end deftypefun
23 23
24 @deftypefun void* header_get_owner (header_t *@var{hdr}) 24 @deftypefun void* mu_header_get_owner (mu_header_t *@var{hdr})
25 @end deftypefun 25 @end deftypefun
26 26
27 @deftypefun int header_is_modified (header_t @var{hdr}) 27 @deftypefun int mu_header_is_modified (mu_header_t @var{hdr})
28 @end deftypefun 28 @end deftypefun
29 29
30 @deftypefun int header_clear_modified (header_t @var{hdr}) 30 @deftypefun int mu_header_clear_modified (mu_header_t @var{hdr})
31 @end deftypefun 31 @end deftypefun
32 32
33 @c 33 @c
34 @c Set and get field values by field name. 34 @c Set and get field values by field name.
35 @c 35 @c
36 36
37 @deftypefun int header_set_value (header_t @var{hdr}, const char *@var{fn}, const char *@var{fv}, int @var{n}) 37 @deftypefun int mu_header_set_value (mu_header_t @var{hdr}, const char *@var{fn}, const char *@var{fv}, int @var{n})
38 38
39 Some basic macros are already provided for RFC822. 39 Some basic macros are already provided for RFC822.
40 40
...@@ -128,12 +128,12 @@ Envelope-to ...@@ -128,12 +128,12 @@ Envelope-to
128 @end table 128 @end table
129 @end deftypefun 129 @end deftypefun
130 130
131 @deftypefun int header_get_value (header_t @var{hdr}, const char *@var{fn}, char *@var{fv}, size_t @var{len}, size_t *@var{n}) 131 @deftypefun int mu_header_get_value (mu_header_t @var{hdr}, const char *@var{fn}, char *@var{fv}, size_t @var{len}, size_t *@var{n})
132 Value of field-name @var{fn} is returned in buffer @var{fv} of size @var{len}. 132 Value of field-name @var{fn} is returned in buffer @var{fv} of size @var{len}.
133 The number of bytes written is put in @var{n}. 133 The number of bytes written is put in @var{n}.
134 @end deftypefun 134 @end deftypefun
135 135
136 @deftypefun int header_aget_value (header_t @var{hdr}, const char *@var{fn}, char **@var{fv}) 136 @deftypefun int mu_header_aget_value (mu_header_t @var{hdr}, const char *@var{fn}, char **@var{fv})
137 The value is allocated. 137 The value is allocated.
138 @end deftypefun 138 @end deftypefun
139 139
...@@ -141,70 +141,70 @@ The value is allocated. ...@@ -141,70 +141,70 @@ The value is allocated.
141 @c Get field values as an address_t. 141 @c Get field values as an address_t.
142 @c 142 @c
143 143
144 @deftypefun int header_get_address (header_t @var{hdr}, const char *@var{buf}, address_t *@var{addr}) 144 @deftypefun int mu_header_get_address (mu_header_t @var{hdr}, const char *@var{buf}, address_t *@var{addr})
145 @end deftypefun 145 @end deftypefun
146 146
147 @c 147 @c
148 @c Stream 148 @c Stream
149 @c 149 @c
150 150
151 @deftypefun int header_get_stream (header_t @var{hdr}, stream_t *@var{stream}) 151 @deftypefun int mu_header_get_stream (mu_header_t @var{hdr}, stream_t *@var{stream})
152 @end deftypefun 152 @end deftypefun
153 153
154 @deftypefun int header_set_stream (header_t @var{hdr}, stream_t @var{stream}, void *) 154 @deftypefun int mu_header_set_stream (mu_header_t @var{hdr}, stream_t @var{stream}, void *)
155 @end deftypefun 155 @end deftypefun
156 156
157 @c 157 @c
158 @c 158 @c
159 @c 159 @c
160 160
161 @deftypefun int header_get_field_count (header_t @var{hdr}, size_t *@var{count}) 161 @deftypefun int mu_header_get_field_count (mu_header_t @var{hdr}, size_t *@var{count})
162 @end deftypefun 162 @end deftypefun
163 163
164 @deftypefun int header_get_field_value (header_t @var{hdr}, size_t @var{index}, char *, size_t, size_t *) 164 @deftypefun int mu_header_get_field_value (mu_header_t @var{hdr}, size_t @var{index}, char *, size_t, size_t *)
165 @end deftypefun 165 @end deftypefun
166 166
167 @deftypefun int header_get_field_name (header_t @var{hdr}, size_t @var{index}, char *, size_t, size_t *) 167 @deftypefun int mu_header_get_field_name (mu_header_t @var{hdr}, size_t @var{index}, char *, size_t, size_t *)
168 @end deftypefun 168 @end deftypefun
169 169
170 @deftypefun int header_aget_field_value (header_t @var{hdr}, size_t @var{index}, char **) 170 @deftypefun int mu_header_aget_field_value (mu_header_t @var{hdr}, size_t @var{index}, char **)
171 @end deftypefun 171 @end deftypefun
172 172
173 @deftypefun int header_aget_field_name (header_t @var{hdr}, size_t @var{index}, char **) 173 @deftypefun int mu_header_aget_field_name (mu_header_t @var{hdr}, size_t @var{index}, char **)
174 @end deftypefun 174 @end deftypefun
175 175
176 @deftypefun int header_get_value_unfold (header_t @var{hdr}, const char *@var{name}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{n}) 176 @deftypefun int mu_header_get_value_unfold (mu_header_t @var{hdr}, const char *@var{name}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{n})
177 @end deftypefun 177 @end deftypefun
178 178
179 @deftypefun int header_aget_value_unfold (header_t @var{hdr}, const char *@var{name}, char **@var{value}) 179 @deftypefun int mu_header_aget_value_unfold (mu_header_t @var{hdr}, const char *@var{name}, char **@var{value})
180 @end deftypefun 180 @end deftypefun
181 181
182 @deftypefun int header_get_field_value_unfold (header_t @var{hdr}, size_t @var{num}, char *@var{buf}, size_t @var{buflen}, size_t *@var{nwritten}) 182 @deftypefun int mu_header_get_field_value_unfold (mu_header_t @var{hdr}, size_t @var{num}, char *@var{buf}, size_t @var{buflen}, size_t *@var{nwritten})
183 @end deftypefun 183 @end deftypefun
184 184
185 @deftypefun int header_aget_field_value_unfold (header_t @var{hdr}, size_t @var{num}, char **@var{value}); 185 @deftypefun int mu_header_aget_field_value_unfold (mu_header_t @var{hdr}, size_t @var{num}, char **@var{value});
186 @end deftypefun 186 @end deftypefun
187 187
188 @deftypefun int header_size (header_t @var{hdr}, size_t *); 188 @deftypefun int mu_header_size (mu_header_t @var{hdr}, size_t *);
189 @end deftypefun 189 @end deftypefun
190 190
191 @deftypefun int header_lines (header_t @var{hdr}, size_t *); 191 @deftypefun int mu_header_lines (mu_header_t @var{hdr}, size_t *);
192 @end deftypefun 192 @end deftypefun
193 193
194 @deftypefun int header_set_set_value (header_t @var{hdr}, int (*@var{_set_value}) (header_t, const char *, const char *, int), void *); 194 @deftypefun int mu_header_set_set_value (mu_header_t @var{hdr}, int (*@var{_set_value}) (mu_header_t, const char *, const char *, int), void *);
195 @end deftypefun 195 @end deftypefun
196 196
197 @deftypefun int header_set_get_value (header_t @var{hdr}, int (*@var{_get_value}) (header_t, const char *, char *, size_t, size_t *), void *); 197 @deftypefun int mu_header_set_get_value (mu_header_t @var{hdr}, int (*@var{_get_value}) (mu_header_t, const char *, char *, size_t, size_t *), void *);
198 @end deftypefun 198 @end deftypefun
199 199
200 @deftypefun int header_set_get_fvalue (header_t @var{hdr}, int (*@var{_get_value}) (header_t, const char *, char *, size_t, size_t *), void *); 200 @deftypefun int mu_header_set_get_fvalue (mu_header_t @var{hdr}, int (*@var{_get_value}) (mu_header_t, const char *, char *, size_t, size_t *), void *);
201 @end deftypefun 201 @end deftypefun
202 202
203 @deftypefun int header_set_size (header_t @var{hdr}, int (*@var{_size}) (header_t, size_t *), void *); 203 @deftypefun int mu_header_set_size (mu_header_t @var{hdr}, int (*@var{_size}) (mu_header_t, size_t *), void *);
204 @end deftypefun 204 @end deftypefun
205 205
206 @deftypefun int header_set_lines (header_t @var{hdr}, int (*@var{_lines}) (header_t, size_t *), void *); 206 @deftypefun int mu_header_set_lines (mu_header_t @var{hdr}, int (*@var{_lines}) (mu_header_t, size_t *), void *);
207 @end deftypefun 207 @end deftypefun
208 208
209 @deftypefun int header_set_fill (header_t @var{hdr}, int (*@var{_fill}) (header_t, char *, size_t, off_t, size_t *), void *@var{owner}); 209 @deftypefun int mu_header_set_fill (mu_header_t @var{hdr}, int (*@var{_fill}) (mu_header_t, char *, size_t, mu_off_t, size_t *), void *@var{owner});
210 @end deftypefun 210 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006
3 @c Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 4 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 5 @comment *******************************************************************
5 6
6 @smallexample 7 @smallexample
7 @code{/* Prefix @emph{imap4_} is reserved */} 8 @code{/* Prefix @emph{mu_imap4_} is reserved */}
8 @code{#include <mailutils/imap4.h>} 9 @code{#include <mailutils/imap4.h>}
9 10
10 @end smallexample 11 @end smallexample
...@@ -20,155 +21,155 @@ request. Untagged responses, for historical reasons are also call ...@@ -20,155 +21,155 @@ request. Untagged responses, for historical reasons are also call
20 @subsubsection Initialization 21 @subsubsection Initialization
21 @cindex IMAP4 Initialization 22 @cindex IMAP4 Initialization
22 23
23 @deftypefun int imap4_create (imap4_t *) 24 @deftypefun int mu_imap4_create (mu_imap4_t *)
24 @end deftypefun 25 @end deftypefun
25 26
26 @deftypefun int imap4_open (imap4_t, const char *@var{hostname}, unsigned int @var{port}, int @var{flags}) 27 @deftypefun int mu_imap4_open (mu_imap4_t, const char *@var{hostname}, unsigned int @var{port}, int @var{flags})
27 @end deftypefun 28 @end deftypefun
28 29
29 @deftypefun int imap4d_set_timeout (imap4_t, unsigned int @var{seconds}) 30 @deftypefun int imap4d_set_timeout (mu_imap4_t, unsigned int @var{seconds})
30 @end deftypefun 31 @end deftypefun
31 32
32 @subsubsection Append 33 @subsubsection Append
33 @cindex IMAP4 Append 34 @cindex IMAP4 Append
34 35
35 @deftypefun int imap4_append (imap4_t) 36 @deftypefun int mu_imap4_append (mu_imap4_t)
36 @end deftypefun 37 @end deftypefun
37 38
38 @subsubsection Capability 39 @subsubsection Capability
39 @cindex IMAP4 Capability 40 @cindex IMAP4 Capability
40 41
41 @deftypefun int imap4_capability (imap4_t) 42 @deftypefun int mu_imap4_capability (mu_imap4_t)
42 @end deftypefun 43 @end deftypefun
43 44
44 @subsubsection Create 45 @subsubsection Create
45 @cindex IMAP4 Create 46 @cindex IMAP4 Create
46 47
47 @deftypefun int imap4_create_mailbox (imap4_t, const char *@var{mbox}) 48 @deftypefun int mu_imap4_create_mailbox (mu_imap4_t, const char *@var{mbox})
48 @end deftypefun 49 @end deftypefun
49 50
50 @subsubsection Check 51 @subsubsection Check
51 @cindex IMAP4 Check 52 @cindex IMAP4 Check
52 53
53 @deftypefun int imap4_check (imap4_t) 54 @deftypefun int mu_imap4_check (mu_imap4_t)
54 @end deftypefun 55 @end deftypefun
55 56
56 @subsubsection Close 57 @subsubsection Close
57 @cindex IMAP4 Close 58 @cindex IMAP4 Close
58 59
59 @deftypefun int imap4_close (imap4_t) 60 @deftypefun int mu_imap4_close (mu_imap4_t)
60 @end deftypefun 61 @end deftypefun
61 62
62 @subsubsection Copy 63 @subsubsection Copy
63 @cindex IMAP4 Copy 64 @cindex IMAP4 Copy
64 65
65 @deftypefun int imap4_copy (imap4_t) 66 @deftypefun int mu_imap4_copy (mu_imap4_t)
66 @end deftypefun 67 @end deftypefun
67 68
68 @subsubsection UID Copy 69 @subsubsection UID Copy
69 @cindex IMAP4 UID Copy 70 @cindex IMAP4 UID Copy
70 71
71 @deftypefun int imap4_uid_copy (imap4_t) 72 @deftypefun int mu_imap4_uid_copy (mu_imap4_t)
72 @end deftypefun 73 @end deftypefun
73 74
74 @subsubsection Delete 75 @subsubsection Delete
75 @cindex IMAP4 Delete 76 @cindex IMAP4 Delete
76 77
77 @deftypefun int imap4_delete (imap4_t) 78 @deftypefun int mu_imap4_delete (mu_imap4_t)
78 @end deftypefun 79 @end deftypefun
79 80
80 @subsubsection Fetch 81 @subsubsection Fetch
81 @cindex IMAP4 Fetch 82 @cindex IMAP4 Fetch
82 83
83 @deftypefun int imap4_fetch (imap4_t) 84 @deftypefun int mu_imap4_fetch (mu_imap4_t)
84 @end deftypefun 85 @end deftypefun
85 86
86 @subsubsection UID Fetch 87 @subsubsection UID Fetch
87 @cindex IMAP4 UID Fetch 88 @cindex IMAP4 UID Fetch
88 89
89 @deftypefun int imap4_uid_fetch (imap4_t) 90 @deftypefun int mu_imap4_uid_fetch (mu_imap4_t)
90 @end deftypefun 91 @end deftypefun
91 92
92 @subsubsection Examine 93 @subsubsection Examine
93 @cindex IMAP4 Examine 94 @cindex IMAP4 Examine
94 95
95 @deftypefun int imap4_examine (imap4_t) 96 @deftypefun int mu_imap4_examine (mu_imap4_t)
96 @end deftypefun 97 @end deftypefun
97 98
98 @subsubsection Expunge 99 @subsubsection Expunge
99 @cindex IMAP4 Expunge 100 @cindex IMAP4 Expunge
100 101
101 @deftypefun int imap4_expunge (imap4_t) 102 @deftypefun int mu_imap4_expunge (mu_imap4_t)
102 @end deftypefun 103 @end deftypefun
103 104
104 @subsubsection List 105 @subsubsection List
105 @cindex IMAP4 List 106 @cindex IMAP4 List
106 107
107 @deftypefun int imap4_list (imap4_t) 108 @deftypefun int mu_imap4_list (mu_imap4_t)
108 @end deftypefun 109 @end deftypefun
109 110
110 @subsubsection Lsub 111 @subsubsection Lsub
111 @cindex IMAP4 Lsub 112 @cindex IMAP4 Lsub
112 113
113 @deftypefun int imap4_lsub (imap4_t) 114 @deftypefun int mu_imap4_lsub (mu_imap4_t)
114 @end deftypefun 115 @end deftypefun
115 116
116 @subsubsection Namespace 117 @subsubsection Namespace
117 @cindex IMAP4 Namespace 118 @cindex IMAP4 Namespace
118 119
119 @deftypefun int imap4_namespace (imap4_t) 120 @deftypefun int mu_imap4_namespace (mu_imap4_t)
120 @end deftypefun 121 @end deftypefun
121 122
122 @subsubsection Rename 123 @subsubsection Rename
123 @cindex IMAP4 Rename 124 @cindex IMAP4 Rename
124 125
125 @deftypefun int imap4_rename (imap4_t) 126 @deftypefun int mu_imap4_rename (mu_imap4_t)
126 @end deftypefun 127 @end deftypefun
127 128
128 @subsubsection Search 129 @subsubsection Search
129 @cindex IMAP4 Search 130 @cindex IMAP4 Search
130 131
131 @deftypefun int imap4_search (imap4_t) 132 @deftypefun int mu_imap4_search (mu_imap4_t)
132 @end deftypefun 133 @end deftypefun
133 134
134 @subsubsection UID Search 135 @subsubsection UID Search
135 @cindex IMAP4 UID Search 136 @cindex IMAP4 UID Search
136 137
137 @deftypefun int imap4_uid_search (imap4_t) 138 @deftypefun int mu_imap4_uid_search (mu_imap4_t)
138 @end deftypefun 139 @end deftypefun
139 140
140 @subsubsection Select 141 @subsubsection Select
141 @cindex IMAP4 Select 142 @cindex IMAP4 Select
142 143
143 @deftypefun int imap4_select (imap4_t) 144 @deftypefun int mu_imap4_select (mu_imap4_t)
144 @end deftypefun 145 @end deftypefun
145 146
146 @subsubsection Status 147 @subsubsection Status
147 @cindex IMAP4 Status 148 @cindex IMAP4 Status
148 149
149 @deftypefun int imap4_status (imap4_t) 150 @deftypefun int mu_imap4_status (mu_imap4_t)
150 @end deftypefun 151 @end deftypefun
151 152
152 @subsubsection Store 153 @subsubsection Store
153 @cindex IMAP4 Store 154 @cindex IMAP4 Store
154 155
155 @deftypefun int imap4_store (imap4_t) 156 @deftypefun int mu_imap4_store (mu_imap4_t)
156 @end deftypefun 157 @end deftypefun
157 158
158 @subsubsection UID Store 159 @subsubsection UID Store
159 @cindex IMAP4 UID Store 160 @cindex IMAP4 UID Store
160 161
161 @deftypefun int imap4_uid_store (imap4_t) 162 @deftypefun int mu_imap4_uid_store (mu_imap4_t)
162 @end deftypefun 163 @end deftypefun
163 164
164 @subsubsection Subscribe 165 @subsubsection Subscribe
165 @cindex IMAP4 Subscribe 166 @cindex IMAP4 Subscribe
166 167
167 @deftypefun int imap4_subscribe (imap4_t) 168 @deftypefun int mu_imap4_subscribe (mu_imap4_t)
168 @end deftypefun 169 @end deftypefun
169 170
170 @subsubsection Unsubscribe 171 @subsubsection Unsubscribe
171 @cindex IMAP4 Unsubscribe 172 @cindex IMAP4 Unsubscribe
172 173
173 @deftypefun int imap4_unsubscribe (imap4_t) 174 @deftypefun int mu_imap4_unsubscribe (mu_imap4_t)
174 @end deftypefun 175 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006
3 @c Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 4 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 5 @comment *******************************************************************
5 6
6 @smallexample 7 @smallexample
7 @code{/* Prefix @emph{iterator_} is reserved. */} 8 @code{/* Prefix @emph{mu_iterator_} is reserved. */}
8 @code{#include <mailutils/iterator.h>} 9 @code{#include <mailutils/iterator.h>}
9 @end smallexample 10 @end smallexample
10 11
11 @deftypefun int iterator_create (iterator_t *@var{iterator}, list_t) 12 @deftypefun int mu_iterator_create (mu_iterator_t *@var{iterator}, void *@var{obj})
12 @end deftypefun 13 @end deftypefun
13 14
14 @deftypefun int iterator_dup (iterator_t *@var{iterator}, iterator_t @var{orig}) 15 @deftypefun int mu_iterator_dup (mu_iterator_t *@var{iterator}, mu_iterator_t @var{orig})
15 @end deftypefun 16 @end deftypefun
16 17
17 @deftypefun void iterator_destroy (iterator_t *) 18 @deftypefun void mu_iterator_destroy (mu_iterator_t *)
18 @end deftypefun 19 @end deftypefun
19 20
20 @deftypefun int iterator_first (iterator_t) 21 @deftypefun int mu_iterator_first (mu_iterator_t)
21 @end deftypefun 22 @end deftypefun
22 23
23 @deftypefun int iterator_next (iterator_t) 24 @deftypefun int mu_iterator_next (mu_iterator_t)
24 @end deftypefun 25 @end deftypefun
25 26
26 @deftypefun int iterator_current (iterator_t, void **@var{item}) 27 @deftypefun int mu_iterator_current (mu_iterator_t, void **@var{item})
27 @end deftypefun 28 @end deftypefun
28 29
29 @deftypefun int iterator_is_done (iterator_t) 30 @deftypefun int mu_iterator_is_done (mu_iterator_t)
30 @end deftypefun 31 @end deftypefun
31 32
32 @deftypefun int iterator_get_list (iterator_t @var{iterator}, list_t *@var{list}) 33 @deftypefun int mu_iterator_attach (mu_iterator_t *@var{root}, mu_iterator_t @var{iterator})
33 @end deftypefun 34 @end deftypefun
35
36 @deftypefun int mu_iterator_detach (mu_iterator_t *@var{root}, mu_iterator_t @var{iterator})
37 @end deftypefun
38
39 @deftypefun void mu_iterator_advance (mu_iterator_t @var{iterator}, void *@var{item})
40 @end deftypefun
41
42 @deftypefun int mu_iterator_set_first (mu_iterator_t @var{iterator}, int (*@var{first}) (void *))
43 @end deftypefun
44
45 @deftypefun int mu_iterator_set_next (mu_iterator_t @var{iterator}, int (*@var{next}) (void *))
46 @end deftypefun
47
48 @deftypefun int mu_iterator_set_getitem (mu_iterator_t @var{iterator}, int (*@var{getitem}) (void *, void **))
49 @end deftypefun
50
51 @deftypefun int mu_iterator_set_finished_p (mu_iterator_t @var{iterator}, int (*@var{finished_p}) (void *))
52 @end deftypefun
53
54 @deftypefun int mu_iterator_set_dup (mu_iterator_t @var{itr}, int (*@var{dup}) (void **@var{ptr}, void *@var{data}))
55 @end deftypefun
56
57 @deftypefun int mu_iterator_set_destroy (mu_iterator_t @var{itr}, int (*@var{destroy}) (mu_iterator_t @var{itr}, void *@var{data}))
58 @end deftypefun
59
60 @deftypefun int mu_iterator_set_curitem_p (mu_iterator_t @var{itr}, int (*@var{curitem_p}) (void *, void *))
61 @end deftypefun
62
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
...@@ -17,7 +17,7 @@ The following is a typical scenario of using @code{libsieve}: ...@@ -17,7 +17,7 @@ The following is a typical scenario of using @code{libsieve}:
17 @enumerate 17 @enumerate
18 @item Application program creates the instance of sieve machine. 18 @item Application program creates the instance of sieve machine.
19 19
20 @item Then @code{sieve_compile} function is called to translate 20 @item Then @code{mu_sieve_compile} function is called to translate
21 the Sieve source into an equivalent program executable by the 21 the Sieve source into an equivalent program executable by the
22 Machine 22 Machine
23 23
...@@ -62,7 +62,7 @@ It is created by @code{sieve_machine_create()} and destroyed by ...@@ -62,7 +62,7 @@ It is created by @code{sieve_machine_create()} and destroyed by
62 type are described in @ref{Manipulating the Sieve Machine}. 62 type are described in @ref{Manipulating the Sieve Machine}.
63 @end deftp 63 @end deftp
64 64
65 @deftp {Data Type} sieve_data_type 65 @deftp {Data Type} mu_sieve_data_type
66 This enumeration keeps the possible types of sieve data. These are: 66 This enumeration keeps the possible types of sieve data. These are:
67 67
68 @table @code 68 @table @code
...@@ -76,38 +76,40 @@ Numeric type. ...@@ -76,38 +76,40 @@ Numeric type.
76 Character string. 76 Character string.
77 77
78 @item SVT_STRING_LIST 78 @item SVT_STRING_LIST
79 A @code{list_t}. Each item in this list represents a character string. 79 A @code{mu_list_t}. Each item in this list represents a character string.
80 80
81 @item SVT_TAG 81 @item SVT_TAG
82 A sieve tag. See @code{sieve_runtime_tag_t} below. 82 A sieve tag. See @code{mu_sieve_runtime_tag_t} below.
83 83
84 @item SVT_IDENT 84 @item SVT_IDENT
85 A character string representing an identifier. 85 A character string representing an identifier.
86 86
87 @item SVT_VALUE_LIST 87 @item SVT_VALUE_LIST
88 A @code{list_t}. Each item in this list is of @code{sieve_value_t}. 88 A @code{mu_list_t}. Each item in this list is of @code{mu_sieve_value_t} type.
89 89
90 @item SVT_POINTER 90 @item SVT_POINTER
91 An opaque pointer. 91 An opaque pointer.
92 @end table 92 @end table
93 @end deftp 93 @end deftp
94 94
95 @deftp {Data Type} sieve_value_t 95 @deftp {Data Type} mu_sieve_value_t
96 The @code{sieve_value_t} keeps an instance of sieve data. It is defined 96 The @code{mu_sieve_value_t} keeps an instance of sieve data. It is defined
97 as follows: 97 as follows:
98 98
99 @smallexample 99 @smallexample
100 @group 100 @group
101 typedef struct @{ 101 typedef struct
102 sieve_data_type type; /* Type of the data */ 102 @{
103 mu_sieve_data_type type; /* Type of the data */
103 union @{ 104 union @{
104 char *string; /* String value or identifier */ 105 char *string; /* String value or identifier */
105 size_t number; /* Numeric value */ 106 size_t number; /* Numeric value */
106 list_t list; /* List value */ 107 mu_list_t list; /* List value */
107 sieve_runtime_tag_t *tag; /* Tag value */ 108 mu_sieve_runtime_tag_t *tag; /* Tag value */
108 void *ptr; /* Pointer value */ 109 void *ptr; /* Pointer value */
109 @} v; 110 @} v;
110 @} sieve_value_t; 111 @}
112 mu_sieve_value_t;
111 @end group 113 @end group
112 @end smallexample 114 @end smallexample
113 115
...@@ -140,16 +142,18 @@ The data are pointed to by @code{ptr} member. ...@@ -140,16 +142,18 @@ The data are pointed to by @code{ptr} member.
140 142
141 @end deftp 143 @end deftp
142 144
143 @deftp {Data Type} sieve_tag_def_t 145 @deftp {Data Type} mu_sieve_tag_def_t
144 This structure represents a definition of a tagged (optional) argument 146 This structure represents a definition of a tagged (optional) argument
145 to a sieve action or test. It is defined as follows: 147 to a sieve action or test. It is defined as follows:
146 148
147 @smallexample 149 @smallexample
148 @group 150 @group
149 typedef struct @{ 151 typedef struct
152 @{
150 char *name; /* Tag name */ 153 char *name; /* Tag name */
151 sieve_data_type argtype; /* Type of tag argument. */ 154 mu_sieve_data_type argtype; /* Type of tag argument. */
152 @} sieve_tag_def_t; 155 @}
156 mu_sieve_tag_def_t;
153 @end group 157 @end group
154 @end smallexample 158 @end smallexample
155 159
...@@ -158,15 +162,16 @@ colon}. The @code{argtype} is set to @code{SVT_VOID} if the tag does ...@@ -158,15 +162,16 @@ colon}. The @code{argtype} is set to @code{SVT_VOID} if the tag does
158 not take argument, or to the type of the argument otherwise. 162 not take argument, or to the type of the argument otherwise.
159 @end deftp 163 @end deftp
160 164
161 @deftp {Data Type} sieve_runtime_tag_t 165 @deftp {Data Type} mu_sieve_runtime_tag_t
162 This structure represents the tagged (optional) argument at a runtime. 166 This structure represents the tagged (optional) argument at a runtime.
163 It is defined as: 167 It is defined as:
164 168
165 @smallexample 169 @smallexample
166 @group 170 @group
167 struct sieve_runtime_tag @{ 171 struct mu_sieve_runtime_tag
172 @{
168 char *tag; /* Tag name */ 173 char *tag; /* Tag name */
169 sieve_value_t *arg; /* Tag argument (if any) */ 174 mu_sieve_value_t *arg; /* Tag argument (if any) */
170 @}; 175 @};
171 @end group 176 @end group
172 @end smallexample 177 @end smallexample
...@@ -174,13 +179,29 @@ struct sieve_runtime_tag @{ ...@@ -174,13 +179,29 @@ struct sieve_runtime_tag @{
174 The @code{arg} member is @code{NULL} if the tag does not take an argument. 179 The @code{arg} member is @code{NULL} if the tag does not take an argument.
175 @end deftp 180 @end deftp
176 181
177 @deftp {Data Type} sieve_handler_t 182 @deftp {Data Type} mu_sieve_locus_t
183 Objects of this type represent a location in the Sieve source file:
184
185 @smallexample
186 @group
187 typedef struct
188 @{
189 const char *source_file;
190 size_t source_line;
191 @}
192 mu_sieve_locus_t;
193 @end group
194 @end smallexample
195 @end deftp
196
197 @deftp {Data Type} mu_sieve_handler_t
178 198
179 This is a pointer to function handler for a sieve action or test. 199 This is a pointer to function handler for a sieve action or test.
180 It is defined as follows: 200 It is defined as follows:
181 @smallexample 201 @smallexample
182 typedef int (*sieve_handler_t) (sieve_machine_t @var{mach}, 202 typedef int (*mu_sieve_handler_t) (mu_sieve_machine_t @var{mach},
183 list_t @var{args}, list_t @var{tags}); 203 mu_list_t @var{args},
204 mu_list_t @var{tags});
184 @end smallexample 205 @end smallexample
185 206
186 The arguments to the handler have the following meaning: 207 The arguments to the handler have the following meaning:
...@@ -195,16 +216,17 @@ A list of optional arguments (tags). ...@@ -195,16 +216,17 @@ A list of optional arguments (tags).
195 @end table 216 @end table
196 @end deftp 217 @end deftp
197 218
198 @deftp {Data Type} sieve_printf_t 219 @deftp {Data Type} mu_sieve_printf_t
199 A pointer to a diagnostic output function. It is defined as follows: 220 A pointer to a diagnostic output function. It is defined as follows:
200 @smallexample 221 @smallexample
201 typedef int (*sieve_printf_t) (void *@var{data}, const char *@var{fmt}, va_list @var{ap}); 222 typedef int (*mu_sieve_printf_t) (void *@var{data},
223 const char *@var{fmt}, va_list @var{ap});
202 @end smallexample 224 @end smallexample
203 225
204 @table @var 226 @table @var
205 @item data 227 @item data
206 A pointer to application specific data. These data are passed as 228 A pointer to application specific data. These data are passed as
207 second argument to @code{sieve_machine_init()}. 229 second argument to @code{mu_sieve_machine_init()}.
208 @item fmt 230 @item fmt
209 Printf-like format string. 231 Printf-like format string.
210 @item ap 232 @item ap
...@@ -212,12 +234,14 @@ Other arguments. ...@@ -212,12 +234,14 @@ Other arguments.
212 @end table 234 @end table
213 @end deftp 235 @end deftp
214 236
215 @deftp {Data Type} sieve_parse_error_t 237 @deftp {Data Type} mu_sieve_parse_error_t
216 This data type is declared as follows: 238 This data type is declared as follows:
217 @smallexample 239 @smallexample
218 typedef int (*sieve_parse_error_t) (void *@var{data}, 240 typedef int (*mu_sieve_parse_error_t) (void *@var{data},
219 const char *@var{filename}, int @var{lineno}, 241 const char *@var{filename},
220 const char *@var{fmt}, va_list @var{ap}); 242 int @var{lineno},
243 const char *@var{fmt},
244 va_list @var{ap});
221 @end smallexample 245 @end smallexample
222 246
223 It is used to declare error handlers for parsing errors. The 247 It is used to declare error handlers for parsing errors. The
...@@ -227,21 +251,26 @@ of the error in the source text, while @var{fmt} and @var{ap} give ...@@ -227,21 +251,26 @@ of the error in the source text, while @var{fmt} and @var{ap} give
227 verbose description of the error. 251 verbose description of the error.
228 @end deftp 252 @end deftp
229 253
230 @deftp {Data Type} sieve_action_log_t 254 @deftp {Data Type} mu_sieve_action_log_t
231 A pointer to the application-specific logging function: 255 A pointer to the application-specific logging function:
232 256
233 @smallexample 257 @smallexample
234 typedef void (*sieve_action_log_t) (void *@var{data}, 258 typedef void (*mu_sieve_action_log_t) (void *@var{data},
235 const char *@var{script}, 259 const mu_sieve_locus_t *@var{locus},
236 size_t @var{msgno}, message_t @var{msg}, 260 size_t @var{msgno},
261 mu_message_t @var{msg},
237 const char *@var{action}, 262 const char *@var{action},
238 const char *@var{fmt}, va_list @var{ap}); 263 const char *@var{fmt},
264 va_list @var{ap});
239 @end smallexample 265 @end smallexample
240 266
241 @table @var 267 @table @var
242 @item data 268 @item data
243 Application-specific data. 269 Application-specific data.
244 270
271 @item locus
272 Location in the Sieve source file.
273
245 @item script 274 @item script
246 Name of the sieve script being executed. 275 Name of the sieve script being executed.
247 276
...@@ -261,17 +290,17 @@ These two arguments give the detailed description of the action. ...@@ -261,17 +290,17 @@ These two arguments give the detailed description of the action.
261 @end table 290 @end table
262 @end deftp 291 @end deftp
263 292
264 @deftp {Data Type} sieve_relcmp_t 293 @deftp {Data Type} mu_sieve_relcmp_t
265 @deftpx {Data Type} sieve_relcmpn_t 294 @deftpx {Data Type} mu_sieve_relcmpn_t
266 @smallexample 295 @smallexample
267 typedef int (*sieve_relcmp_t) (int, int); 296 typedef int (*mu_sieve_relcmp_t) (int, int);
268 typedef int (*sieve_relcmpn_t) (size_t, size_t); 297 typedef int (*mu_sieve_relcmpn_t) (size_t, size_t);
269 @end smallexample 298 @end smallexample
270 @end deftp 299 @end deftp
271 300
272 @deftp {Data Type} sieve_comparator_t 301 @deftp {Data Type} mu_sieve_comparator_t
273 @smallexample 302 @smallexample
274 typedef int (*sieve_comparator_t) (const char *, const char *); 303 typedef int (*mu_sieve_comparator_t) (const char *, const char *);
275 @end smallexample 304 @end smallexample
276 305
277 A pointer to the comparator handler function. The function compares 306 A pointer to the comparator handler function. The function compares
...@@ -281,31 +310,31 @@ in comparison with most standard libc functions like @code{stcmp()}, etc. ...@@ -281,31 +310,31 @@ in comparison with most standard libc functions like @code{stcmp()}, etc.
281 310
282 @end deftp 311 @end deftp
283 312
284 @deftp {Data Type} sieve_retrieve_t 313 @deftp {Data Type} mu_sieve_retrieve_t
285 @smallexample 314 @smallexample
286 typedef int (*sieve_retrieve_t) (void *item, void *data, int idx, 315 typedef int (*mu_sieve_retrieve_t) (void *item, void *data, int idx,
287 char **pval); 316 char **pval);
288 @end smallexample 317 @end smallexample
289 318
290 A pointer to generic retriever function. See description of 319 A pointer to generic retriever function. See description of
291 @code{sieve_vlist_compare()} for details of its usage. 320 @code{mu_sieve_vlist_compare()} for details of its usage.
292 @end deftp 321 @end deftp
293 322
294 @deftp {Data Type} sieve_destructor_t 323 @deftp {Data Type} mu_sieve_destructor_t
295 @smallexample 324 @smallexample
296 typedef void (*sieve_destructor_t) (void *data); 325 typedef void (*mu_sieve_destructor_t) (void *data);
297 @end smallexample 326 @end smallexample
298 327
299 A pointer to destructor function. The function frees any resources 328 A pointer to destructor function. The function frees any resources
300 associated with @code{data}. See the description of 329 associated with @code{data}. See the description of
301 @code{sieve_machine_add_destructor()} for more information. 330 @code{mu_sieve_machine_add_destructor()} for more information.
302 @end deftp 331 @end deftp
303 332
304 @deftp {Data Type} sieve_tag_checker_t 333 @deftp {Data Type} mu_sieve_tag_checker_t
305 @smallexample 334 @smallexample
306 typedef int (*sieve_tag_checker_t) (const char *@var{name}, 335 typedef int (*mu_sieve_tag_checker_t) (const char *@var{name},
307 list_t @var{tags}, 336 mu_list_t @var{tags},
308 list_t @var{args}) 337 mu_list_t @var{args})
309 @end smallexample 338 @end smallexample
310 339
311 A pointer to tag checker function. The purpose of the function is to 340 A pointer to tag checker function. The purpose of the function is to
...@@ -316,10 +345,10 @@ perform compilation-time consistency test on tags. Its arguments are: ...@@ -316,10 +345,10 @@ perform compilation-time consistency test on tags. Its arguments are:
316 Name of the test or action whose tags are being checked. 345 Name of the test or action whose tags are being checked.
317 346
318 @item tags 347 @item tags
319 A list of @code{sieve_runtime_tag_t} representing tags. 348 A list of @code{mu_sieve_runtime_tag_t} representing tags.
320 349
321 @item args 350 @item args
322 A list of @code{sieve_value_t} representing required arguments to 351 A list of @code{mu_sieve_value_t} representing required arguments to
323 @var{name}. 352 @var{name}.
324 @end table 353 @end table
325 354
...@@ -336,32 +365,32 @@ case. [FIXME: describe how to do that] ...@@ -336,32 +365,32 @@ case. [FIXME: describe how to do that]
336 This subsection describes functions used to create an instance of the 365 This subsection describes functions used to create an instance of the
337 sieve machine, read or alter its internal fields and destroy it. 366 sieve machine, read or alter its internal fields and destroy it.
338 367
339 @deftypefun int sieve_machine_init (sieve_machine_t *@var{mach}, void *@var{data}) 368 @deftypefun int mu_sieve_machine_init (mu_sieve_machine_t *@var{mach}, void *@var{data})
340 369
341 The @code{sieve_machine_init()} function creates an instance of a sieve 370 The @code{mu_sieve_machine_init()} function creates an instance of a sieve
342 machine. A pointer to the instance itself is returned in the argument 371 machine. A pointer to the instance itself is returned in the argument
343 @var{mach}. The user-specific data to be associated with the new machine 372 @var{mach}. The user-specific data to be associated with the new machine
344 are passed in @var{data} argument. The function returns 0 on success, 373 are passed in @var{data} argument. The function returns 0 on success,
345 non-zero error code otherwise, 374 non-zero error code otherwise,
346 @end deftypefun 375 @end deftypefun
347 376
348 @deftypefun void sieve_machine_destroy (sieve_machine_t *@var{pmach}) 377 @deftypefun void mu_sieve_machine_destroy (mu_sieve_machine_t *@var{pmach})
349 378
350 This function destroys the instance of sieve machine pointed to by 379 This function destroys the instance of sieve machine pointed to by
351 @var{mach} parameter. After execution of @code{sieve_machine_destroy()} 380 @var{mach} parameter. After execution of @code{mu_sieve_machine_destroy()}
352 @var{pmach} contains @code{NULL}. The destructors registered with 381 @var{pmach} contains @code{NULL}. The destructors registered with
353 @code{sieve_machine_add_destructor()} are executed in @sc{lifo} 382 @code{mu_sieve_machine_add_destructor()} are executed in @sc{lifo}
354 order. 383 order.
355 @end deftypefun 384 @end deftypefun
356 385
357 @deftypefun int sieve_machine_add_destructor (sieve_machine_t @var{mach}, sieve_destructor_t @var{destr}, void *@var{ptr}); 386 @deftypefun int mu_sieve_machine_add_destructor (mu_sieve_machine_t @var{mach}, mu_sieve_destructor_t @var{destr}, void *@var{ptr});
358 387
359 This function registers a destructor function @var{dest}. The purpose 388 This function registers a destructor function @var{dest}. The purpose
360 of the destructor is to free any resources associated with the item 389 of the destructor is to free any resources associated with the item
361 @var{ptr}. The destructor function takes a single argument --- a 390 @var{ptr}. The destructor function takes a single argument --- a
362 pointer to the data being destroyed. All registered destructors are 391 pointer to the data being destroyed. All registered destructors are
363 called in reverse order upon execution of 392 called in reverse order upon execution of
364 @code{sieve_machine_destroy()}. Here's a short example of the use 393 @code{mu_sieve_machine_destroy()}. Here's a short example of the use
365 of this function: 394 of this function:
366 395
367 @smallexample 396 @smallexample
...@@ -378,9 +407,9 @@ match_part_checker (const char *name, list_t tags, list_t args) ...@@ -378,9 +407,9 @@ match_part_checker (const char *name, list_t tags, list_t args)
378 regex_t *regex; 407 regex_t *regex;
379 408
380 /* Initialise the regex: */ 409 /* Initialise the regex: */
381 regex = sieve_malloc (mach, sizeof (*regex)); 410 regex = mu_sieve_malloc (mach, sizeof (*regex));
382 /* Make sure it will be freed when necessary */ 411 /* Make sure it will be freed when necessary */
383 sieve_machine_add_destructor (sieve_machine, free_regex, regex); 412 mu_sieve_machine_add_destructor (sieve_machine, free_regex, regex);
384 . 413 .
385 . 414 .
386 . 415 .
...@@ -389,34 +418,39 @@ match_part_checker (const char *name, list_t tags, list_t args) ...@@ -389,34 +418,39 @@ match_part_checker (const char *name, list_t tags, list_t args)
389 @end smallexample 418 @end smallexample
390 @end deftypefun 419 @end deftypefun
391 420
392 @deftypefun void* sieve_get_data (sieve_machine_t @var{mach}) 421 @deftypefun {void *} mu_sieve_get_data (mu_sieve_machine_t @var{mach})
393 This function returns the application-specific data associated with 422 This function returns the application-specific data associated with
394 the instance of sieve machine. See @code{sieve_machine_init()}. 423 the instance of sieve machine. See @code{mu_sieve_machine_init()}.
395 @end deftypefun 424 @end deftypefun
396 425
397 @deftypefun message_t sieve_get_message (sieve_machine_t @var{mach}) 426 @deftypefun mu_message_t mu_sieve_get_message (mu_sieve_machine_t @var{mach})
398 This function returns the current message. 427 This function returns the current message.
399 @end deftypefun 428 @end deftypefun
400 429
401 @deftypefun size_t sieve_get_message_num (sieve_machine_t @var{mach}) 430 @deftypefun size_t mu_sieve_get_message_num (mu_sieve_machine_t @var{mach})
402 This function returns the current message number in the mailbox. 431 This function returns the current message number in the mailbox.
403 If there are no mailbox, i.e. the execution of the sieve code is started 432 If there are no mailbox, i.e. the execution of the sieve code is started
404 with @code{sieve_message}, this function returns 1. 433 with @code{mu_sieve_message}, this function returns 1.
405 @end deftypefun 434 @end deftypefun
406 435
407 @deftypefun int sieve_get_debug_level (sieve_machine_t @var{mach}) 436 @deftypefun int mu_sieve_get_debug_level (mu_sieve_machine_t @var{mach})
408 Returns the debug level set for this instance of sieve machine. 437 Returns the debug level set for this instance of sieve machine.
409 @end deftypefun 438 @end deftypefun
410 439
411 @deftypefun ticket_t sieve_get_ticket (sieve_machine_t @var{mach}) 440 @deftypefun mu_ticket_t mu_sieve_get_ticket (mu_sieve_machine_t @var{mach})
412 Returns the authentication ticket for this machine. 441 Returns the authentication ticket for this machine.
413 @end deftypefun 442 @end deftypefun
414 443
415 @deftypefun mailer_t sieve_get_mailer (sieve_machine_t @var{mach}) 444 @deftypefun mu_mailer_t mu_sieve_get_mailer (mu_sieve_machine_t @var{mach})
416 Returns the mailer. 445 Returns the mailer.
417 @end deftypefun 446 @end deftypefun
418 447
419 @deftypefun {char *} sieve_get_daemon_email (sieve_machine_t @var{mach}) 448 @deftypefun int mu_sieve_get_locus (mu_sieve_machine_t @var{mach}, mu_sieve_locus_t *@var{locus})
449 Returns the locus in the Sieve source file corresponding to the code pointer
450 where the Sieve machine currently is.
451 @end deftypefun
452
453 @deftypefun {char *} mu_sieve_get_daemon_email (mu_sieve_machine_t @var{mach})
420 This function returns the @dfn{daemon email} associated with this 454 This function returns the @dfn{daemon email} associated with this
421 instance of sieve machine. The daemon email is an email address used in 455 instance of sieve machine. The daemon email is an email address used in
422 envelope from addresses of automatic reply messages. By default its local 456 envelope from addresses of automatic reply messages. By default its local
...@@ -424,7 +458,7 @@ part is @samp{<MAILER-DAEMON>} and the domain part is the machine name. ...@@ -424,7 +458,7 @@ part is @samp{<MAILER-DAEMON>} and the domain part is the machine name.
424 @end deftypefun 458 @end deftypefun
425 459
426 460
427 @deftypefun void sieve_set_error (sieve_machine_t @var{mach}, sieve_printf_t @var{error_printer}) 461 @deftypefun void mu_sieve_set_error (mu_sieve_machine_t @var{mach}, mu_sieve_printf_t @var{error_printer})
428 This function sets the error printer function for the machine. If it is 462 This function sets the error printer function for the machine. If it is
429 not set, the default error printer will be used. It is defined as 463 not set, the default error printer will be used. It is defined as
430 follows: 464 follows:
...@@ -439,7 +473,7 @@ _sieve_default_error_printer (void *unused, const char *fmt, ...@@ -439,7 +473,7 @@ _sieve_default_error_printer (void *unused, const char *fmt,
439 @end smallexample 473 @end smallexample
440 @end deftypefun 474 @end deftypefun
441 475
442 @deftypefun void sieve_set_parse_error (sieve_machine_t @var{mach}, sieve_parse_error_t @var{p}) 476 @deftypefun void mu_sieve_set_parse_error (mu_sieve_machine_t @var{mach}, mu_sieve_parse_error_t @var{p})
443 This function sets the parse error printer function for the machine. If it is 477 This function sets the parse error printer function for the machine. If it is
444 not set, the default parse error printer will be used. It is defined as 478 not set, the default parse error printer will be used. It is defined as
445 follows: 479 follows:
...@@ -461,13 +495,13 @@ _sieve_default_parse_error (void *unused, ...@@ -461,13 +495,13 @@ _sieve_default_parse_error (void *unused,
461 @end smallexample 495 @end smallexample
462 @end deftypefun 496 @end deftypefun
463 497
464 @deftypefun void sieve_set_debug (sieve_machine_t @var{mach}, sieve_printf_t @var{debug}); 498 @deftypefun void mu_sieve_set_debug (mu_sieve_machine_t @var{mach}, mu_sieve_printf_t @var{debug});
465 This function sets the debug printer function for the machine. If it is 499 This function sets the debug printer function for the machine. If it is
466 not set, the default debug printer is @code{NULL} which means no 500 not set, the default debug printer is @code{NULL} which means no
467 debugging information will be displayed. 501 debugging information will be displayed.
468 @end deftypefun 502 @end deftypefun
469 503
470 @deftypefun void sieve_set_debug_level (sieve_machine_t @var{mach}, mu_debug_t @var{dbg}, int @var{level}) 504 @deftypefun void mu_sieve_set_debug_level (mu_sieve_machine_t @var{mach}, mu_debug_t @var{dbg}, int @var{level})
471 This function sets the debug level for the given instance of sieve 505 This function sets the debug level for the given instance of sieve
472 machine. The @var{dbg} argument is the @code{mu_debug_t} object to be 506 machine. The @var{dbg} argument is the @code{mu_debug_t} object to be
473 used with mailutils library, the @var{level} argument specifies the 507 used with mailutils library, the @var{level} argument specifies the
...@@ -489,33 +523,33 @@ Do not executed the actions, only show what would have been done. ...@@ -489,33 +523,33 @@ Do not executed the actions, only show what would have been done.
489 @end table 523 @end table
490 @end deftypefun 524 @end deftypefun
491 525
492 @deftypefun void sieve_set_logger (sieve_machine_t @var{mach}, sieve_action_log_t @var{logger}) 526 @deftypefun void mu_sieve_set_logger (mu_sieve_machine_t @var{mach}, mu_sieve_action_log_t @var{logger})
493 This function sets the logger function. By default the logger function 527 This function sets the logger function. By default the logger function
494 is @code{NULL}, which means that the executed actions are not logged. 528 is @code{NULL}, which means that the executed actions are not logged.
495 @end deftypefun 529 @end deftypefun
496 530
497 @deftypefun void sieve_set_ticket (sieve_machine_t @var{mach}, ticket_t @var{ticket}) 531 @deftypefun void mu_sieve_set_ticket (mu_sieve_machine_t @var{mach}, mu_ticket_t @var{ticket})
498 This function sets the authentication ticket to be used with this machine. 532 This function sets the authentication ticket to be used with this machine.
499 @end deftypefun 533 @end deftypefun
500 534
501 @deftypefun void sieve_set_mailer (sieve_machine_t @var{mach}, mailer_t @var{mailer}) 535 @deftypefun void mu_sieve_set_mailer (mu_sieve_machine_t @var{mach}, mu_mailer_t @var{mailer})
502 This function sets the mailer. The default mailer is @code{"sendmail:"}. 536 This function sets the mailer. The default mailer is @code{"sendmail:"}.
503 @end deftypefun 537 @end deftypefun
504 538
505 @deftypefun void sieve_set_daemon_email (sieve_machine_t @var{mach}, const char *@var{email}) 539 @deftypefun void mu_sieve_set_daemon_email (mu_sieve_machine_t @var{mach}, const char *@var{email})
506 This functions sets the @dfn{daemon email} for @code{reject} and 540 This functions sets the @dfn{daemon email} for @code{reject} and
507 @code{redirect} actions. 541 @code{redirect} actions.
508 @end deftypefun 542 @end deftypefun
509 543
510 @deftypefun int sieve_is_dry_run (sieve_machine_t @var{mach}) 544 @deftypefun int mu_sieve_is_dry_run (mu_sieve_machine_t @var{mach})
511 The @code{sieve_is_dry_run()} returns 1 if the machine is in @dfn{dry 545 The @code{mu_sieve_is_dry_run()} returns 1 if the machine is in @dfn{dry
512 run} state, i.e. it will only log the actions that would have been 546 run} state, i.e. it will only log the actions that would have been
513 executed without actually executing them. The dry run state is set 547 executed without actually executing them. The dry run state is set
514 by calling @code{sieve_set_debug_level()} if its last argument has 548 by calling @code{mu_sieve_set_debug_level()} if its last argument has
515 the @code{MU_SIEVE_DRY_RUN} bit set. 549 the @code{MU_SIEVE_DRY_RUN} bit set.
516 @end deftypefun 550 @end deftypefun
517 551
518 @deftypefun {const char *} sieve_type_str (sieve_data_type @var{type}) 552 @deftypefun {const char *} mu_sieve_type_str (mu_sieve_data_type @var{type})
519 Returns the string representation for the given sieve data type. The 553 Returns the string representation for the given sieve data type. The
520 return value is a pointer to a static constant string. 554 return value is a pointer to a static constant string.
521 @end deftypefun 555 @end deftypefun
...@@ -523,48 +557,48 @@ return value is a pointer to a static constant string. ...@@ -523,48 +557,48 @@ return value is a pointer to a static constant string.
523 @node Logging and Diagnostic Functions 557 @node Logging and Diagnostic Functions
524 @subsection Logging and Diagnostic Functions 558 @subsection Logging and Diagnostic Functions
525 559
526 @deftypefun void sieve_error (sieve_machine_t @var{mach}, const char *@var{fmt}, @dots{}) 560 @deftypefun void mu_sieve_error (mu_sieve_machine_t @var{mach}, const char *@var{fmt}, @dots{})
527 Format and output an error message using error printer of the machine @var{mach}. 561 Format and output an error message using error printer of the machine @var{mach}.
528 @end deftypefun 562 @end deftypefun
529 563
530 @deftypefun void sieve_debug (sieve_machine_t @var{mach}, const char *@var{fmt}, @dots{}) 564 @deftypefun void mu_sieve_debug (mu_sieve_machine_t @var{mach}, const char *@var{fmt}, @dots{})
531 Format and output a debug message using debug printer of the machine @var{mach}. 565 Format and output a debug message using debug printer of the machine @var{mach}.
532 @end deftypefun 566 @end deftypefun
533 567
534 @deftypefun void sieve_log_action (sieve_machine_t @var{mach}, const char *@var{action}, const char *@var{fmt}, @dots{}) 568 @deftypefun void mu_sieve_log_action (mu_sieve_machine_t @var{mach}, const char *@var{action}, const char *@var{fmt}, @dots{})
535 Log a sieve action using logger function associated with the machine @var{mach}. 569 Log a sieve action using logger function associated with the machine @var{mach}.
536 @end deftypefun 570 @end deftypefun
537 571
538 @deftypefun void sieve_abort (sieve_machine_t @var{mach}) 572 @deftypefun void mu_sieve_abort (mu_sieve_machine_t @var{mach})
539 Immediately abort the execution of the script. 573 Immediately abort the execution of the script.
540 @end deftypefun 574 @end deftypefun
541 575
542 @node Symbol Space Functions 576 @node Symbol Space Functions
543 @subsection Symbol Space Functions 577 @subsection Symbol Space Functions
544 578
545 @deftypefun {sieve_register_t *} sieve_test_lookup (sieve_machine_t @var{mach}, const char *@var{name}) 579 @deftypefun {mu_sieve_register_t *} mu_sieve_test_lookup (mu_sieve_machine_t @var{mach}, const char *@var{name})
546 Find a register object describing the test @var{name}. Returns 580 Find a register object describing the test @var{name}. Returns
547 @code{NULL} if no such test exists. 581 @code{NULL} if no such test exists.
548 @end deftypefun 582 @end deftypefun
549 583
550 @deftypefun {sieve_register_t *} sieve_action_lookup (sieve_machine_t @var{mach}, const char *@var{name}) 584 @deftypefun {mu_sieve_register_t *} mu_sieve_action_lookup (mu_sieve_machine_t @var{mach}, const char *@var{name})
551 Find a register object describing the action @var{name}. Returns 585 Find a register object describing the action @var{name}. Returns
552 @code{NULL} if no such action exists. 586 @code{NULL} if no such action exists.
553 @end deftypefun 587 @end deftypefun
554 588
555 @deftypefun int sieve_register_test (sieve_machine_t @var{mach}, const char *@var{name}, sieve_handler_t @var{handler}, sieve_data_type *@var{arg_types}, sieve_tag_group_t *@var{tags}, int @var{required}) 589 @deftypefun int mu_sieve_register_test (mu_sieve_machine_t @var{mach}, const char *@var{name}, mu_sieve_handler_t @var{handler}, mu_sieve_data_type *@var{arg_types}, mu_sieve_tag_group_t *@var{tags}, int @var{required})
556 @end deftypefun 590 @end deftypefun
557 591
558 @deftypefun int sieve_register_action (sieve_machine_t @var{mach}, const char *@var{name}, sieve_handler_t @var{handler}, sieve_data_type *@var{arg_types}, sieve_tag_group_t *@var{tags}, int @var{required}) 592 @deftypefun int mu_sieve_register_action (mu_sieve_machine_t @var{mach}, const char *@var{name}, mu_sieve_handler_t @var{handler}, mu_sieve_data_type *@var{arg_types}, mu_sieve_tag_group_t *@var{tags}, int @var{required})
559 @end deftypefun 593 @end deftypefun
560 594
561 @deftypefun int sieve_register_comparator (sieve_machine_t @var{mach}, const char *@var{name}, int @var{required}, sieve_comparator_t @var{is}, sieve_comparator_t @var{contains}, sieve_comparator_t @var{matches}, sieve_comparator_t @var{regex}, sieve_comparator_t @var{eq}) 595 @deftypefun int mu_sieve_register_comparator (mu_sieve_machine_t @var{mach}, const char *@var{name}, int @var{required}, mu_sieve_comparator_t @var{is}, mu_sieve_comparator_t @var{contains}, mu_sieve_comparator_t @var{matches}, mu_sieve_comparator_t @var{regex}, mu_sieve_comparator_t @var{eq})
562 @end deftypefun 596 @end deftypefun
563 597
564 @deftypefun int sieve_tag_lookup (list_t @var{taglist}, char *@var{name}, sieve_value_t **@var{arg}) 598 @deftypefun int mu_sieve_tag_lookup (mu_list_t @var{taglist}, char *@var{name}, mu_sieve_value_t **@var{arg})
565 @end deftypefun 599 @end deftypefun
566 600
567 @deftypefun int sieve_load_ext (sieve_machine_t @var{mach}, const char *@var{name}) 601 @deftypefun int mu_sieve_load_ext (mu_sieve_machine_t @var{mach}, const char *@var{name})
568 @end deftypefun 602 @end deftypefun
569 603
570 @node Memory Allocation 604 @node Memory Allocation
...@@ -572,33 +606,33 @@ Find a register object describing the action @var{name}. Returns ...@@ -572,33 +606,33 @@ Find a register object describing the action @var{name}. Returns
572 606
573 The following functions act as their libc counterparts. The allocated 607 The following functions act as their libc counterparts. The allocated
574 memory is associated with the @var{mach} argument and is automatically 608 memory is associated with the @var{mach} argument and is automatically
575 freed upon the call to @code{sieve_machine_destroy (@var{mach})}. 609 freed upon the call to @code{mu_sieve_machine_destroy (@var{mach})}.
576 610
577 @deftypefun {void *} sieve_malloc (sieve_machine_t @var{mach}, size_t @var{size}) 611 @deftypefun {void *} mu_sieve_malloc (mu_sieve_machine_t @var{mach}, size_t @var{size})
578 Allocates @var{size} bytes and returns a pointer to the allocated memory. 612 Allocates @var{size} bytes and returns a pointer to the allocated memory.
579 @end deftypefun 613 @end deftypefun
580 614
581 @deftypefun {char *} sieve_mstrdup (sieve_machine_t @var{mach}, const char *@var{str}) 615 @deftypefun {char *} mu_sieve_mstrdup (mu_sieve_machine_t @var{mach}, const char *@var{str})
582 This function returns a pointer to a new string which is a duplicate of the 616 This function returns a pointer to a new string which is a duplicate of the
583 string @var{str}. 617 string @var{str}.
584 @end deftypefun 618 @end deftypefun
585 619
586 @deftypefun {void *} sieve_mrealloc (sieve_machine_t @var{mach}, void *@var{ptr}, size_t @var{size}) 620 @deftypefun {void *} mu_sieve_mrealloc (mu_sieve_machine_t @var{mach}, void *@var{ptr}, size_t @var{size})
587 Changes the size of the memory block pointed to by @var{ptr} to 621 Changes the size of the memory block pointed to by @var{ptr} to
588 @var{size} bytes. The contents will be unchanged to the minimum of the 622 @var{size} bytes. The contents will be unchanged to the minimum of the
589 old and new sizes; newly allocated memory will be uninitialized. If 623 old and new sizes; newly allocated memory will be uninitialized. If
590 @var{ptr} is @code{NULL}, the call is equivalent to 624 @var{ptr} is @code{NULL}, the call is equivalent to
591 @code{sieve_malloc(@var{mach}, @var{size})}; if @var{size} is equal to 625 @code{mu_sieve_malloc(@var{mach}, @var{size})}; if @var{size} is equal to
592 zero, the call is equivalent to @code{sieve_mfree(@var{ptr})}. Unless 626 zero, the call is equivalent to @code{mu_sieve_mfree(@var{ptr})}. Unless
593 @var{ptr} is @code{NULL}, it must have been returned by an earlier 627 @var{ptr} is @code{NULL}, it must have been returned by an earlier
594 call to @code{sieve_malloc()} or @code{sieve_mrealloc()}. 628 call to @code{mu_sieve_malloc()} or @code{mu_sieve_mrealloc()}.
595 @end deftypefun 629 @end deftypefun
596 630
597 @deftypefun void sieve_mfree (sieve_machine_t @var{mach}, void *@var{ptr}) 631 @deftypefun void mu_sieve_mfree (mu_sieve_machine_t @var{mach}, void *@var{ptr})
598 @code{sieve_mfree()} frees the memory space pointed to by @var{ptr} and 632 @code{mu_sieve_mfree()} frees the memory space pointed to by @var{ptr} and
599 detaches it from the destructor list of @var{mach}. The @var{ptr} must 633 detaches it from the destructor list of @var{mach}. The @var{ptr} must
600 have been returned by a previous call to @code{sieve_malloc()} or 634 have been returned by a previous call to @code{mu_sieve_malloc()} or
601 @code{sieve_mrealloc()}. Otherwise, or if @code{sieve_mfree(@var{ptr})} 635 @code{mu_sieve_mrealloc()}. Otherwise, or if @code{mu_sieve_mfree(@var{ptr})}
602 has already been called before, undefined behaviour occurs. 636 has already been called before, undefined behaviour occurs.
603 637
604 If @var{ptr} is @code{NULL}, no operation is performed. 638 If @var{ptr} is @code{NULL}, no operation is performed.
...@@ -607,21 +641,21 @@ If @var{ptr} is @code{NULL}, no operation is performed. ...@@ -607,21 +641,21 @@ If @var{ptr} is @code{NULL}, no operation is performed.
607 @node Compiling and Executing the Script 641 @node Compiling and Executing the Script
608 @subsection Compiling and Executing the Script 642 @subsection Compiling and Executing the Script
609 643
610 @deftypefun int sieve_compile (sieve_machine_t @var{mach}, const char *@var{name}) 644 @deftypefun int mu_sieve_compile (mu_sieve_machine_t @var{mach}, const char *@var{name})
611 Compile the sieve script from the file @var{name}. 645 Compile the sieve script from the file @var{name}.
612 @end deftypefun 646 @end deftypefun
613 647
614 @deftypefun int sieve_mailbox (sieve_machine_t @var{mach}, mailbox_t @var{mbox}) 648 @deftypefun int mu_sieve_mailbox (mu_sieve_machine_t @var{mach}, mu_mailbox_t @var{mbox})
615 Execute the code from the given instance of sieve machine @var{mach} 649 Execute the code from the given instance of sieve machine @var{mach}
616 over each message in the mailbox @var{mbox}. 650 over each message in the mailbox @var{mbox}.
617 @end deftypefun 651 @end deftypefun
618 652
619 @deftypefun int sieve_message (sieve_machine_t @var{mach}, message_t @var{message}) 653 @deftypefun int mu_sieve_message (mu_sieve_machine_t @var{mach}, mu_message_t @var{message})
620 Execute the code from the given instance of sieve machine @var{mach} 654 Execute the code from the given instance of sieve machine @var{mach}
621 over the @var{message}. 655 over the @var{message}.
622 @end deftypefun 656 @end deftypefun
623 657
624 @deftypefun int sieve_disass (sieve_machine_t @var{mach}) 658 @deftypefun int mu_sieve_disass (mu_sieve_machine_t @var{mach})
625 Dump the disassembled code of the sieve machine @var{mach}. 659 Dump the disassembled code of the sieve machine @var{mach}.
626 @end deftypefun 660 @end deftypefun
627 661
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{locker_} is reserved. */} 7 @code{/* Prefix @emph{mu_locker_} is reserved. */}
8 @code{#include <mailutils/locker.h>} 8 @code{#include <mailutils/locker.h>}
9 @end smallexample 9 @end smallexample
10 10
11 @deftypefun int locker_set_default_flags (int @var{flags}, enum mu_locker_set_mode @var{mode}) 11 @deftypefun int mu_locker_set_default_flags (int @var{flags}, enum mu_locker_set_mode @var{mode})
12 @end deftypefun 12 @end deftypefun
13 13
14 @deftypefun void locker_set_default_retry_timeout (time_t @var{to}) 14 @deftypefun void mu_locker_set_default_retry_timeout (time_t @var{to})
15 @end deftypefun 15 @end deftypefun
16 16
17 @deftypefun void locker_set_default_retry_count (size_t @var{n}) 17 @deftypefun void mu_locker_set_default_retry_count (size_t @var{n})
18 @end deftypefun 18 @end deftypefun
19 19
20 @deftypefun void locker_set_default_expire_timeout (time_t @var{t}) 20 @deftypefun void mu_locker_set_default_expire_timeout (time_t @var{t})
21 @end deftypefun 21 @end deftypefun
22 22
23 @deftypefun void locker_set_default_external_program (char *@var{path}) 23 @deftypefun void mu_locker_set_default_external_program (char *@var{path})
24 @end deftypefun 24 @end deftypefun
25 25
26 A flags of 0 means that the default will be used. 26 A flags of 0 means that the default will be used.
27 27
28 @deftypefun int locker_create (locker_t *, const char *@var{filename}, int @var{flags}) 28 @deftypefun int mu_locker_create (mu_locker_t *, const char *@var{filename}, int @var{flags})
29 @end deftypefun 29 @end deftypefun
30 30
31 @deftypefun void locker_destroy (locker_t *) 31 @deftypefun void mu_locker_destroy (mu_locker_t *)
32 @end deftypefun 32 @end deftypefun
33 33
34 Time is measured in seconds. 34 Time is measured in seconds.
35 35
36 @deftypefun int locker_set_flags (locker_t, int) 36 @deftypefun int mu_locker_set_flags (mu_locker_t, int)
37 @end deftypefun 37 @end deftypefun
38 38
39 @deftypefun int locker_set_expire_time (locker_t, int) 39 @deftypefun int mu_locker_set_expire_time (mu_locker_t, int)
40 @end deftypefun 40 @end deftypefun
41 41
42 @deftypefun int locker_set_retries (locker_t, int) 42 @deftypefun int mu_locker_set_retries (mu_locker_t, int)
43 @end deftypefun 43 @end deftypefun
44 44
45 @deftypefun int locker_set_retry_sleep (locker_t, int) 45 @deftypefun int mu_locker_set_retry_sleep (mu_locker_t, int)
46 @end deftypefun 46 @end deftypefun
47 47
48 @deftypefun int locker_set_external (locker_t, const char *@var{program}) 48 @deftypefun int mu_locker_set_external (mu_locker_t, const char *@var{program})
49 @end deftypefun 49 @end deftypefun
50 50
51 @deftypefun int locker_get_flags (locker_t, int *) 51 @deftypefun int mu_locker_get_flags (mu_locker_t, int *)
52 @end deftypefun 52 @end deftypefun
53 53
54 @deftypefun int locker_get_expire_time (locker_t, int*) 54 @deftypefun int mu_locker_get_expire_time (mu_locker_t, int*)
55 @end deftypefun 55 @end deftypefun
56 56
57 @deftypefun int locker_get_retries (locker_t, int *) 57 @deftypefun int mu_locker_get_retries (mu_locker_t, int *)
58 @end deftypefun 58 @end deftypefun
59 59
60 @deftypefun int locker_get_retry_sleep (locker_t, int *) 60 @deftypefun int mu_locker_get_retry_sleep (mu_locker_t, int *)
61 @end deftypefun 61 @end deftypefun
62 62
63 @deftypefun int locker_get_external (locker_t, char **) 63 @deftypefun int mu_locker_get_external (mu_locker_t, char **)
64 @end deftypefun 64 @end deftypefun
65 65
66 @deftypefun int locker_lock (locker_t) 66 @deftypefun int mu_locker_lock (mu_locker_t)
67 @end deftypefun 67 @end deftypefun
68 68
69 @deftypefun int locker_touchlock (locker_t) 69 @deftypefun int mu_locker_touchlock (mu_locker_t)
70 @end deftypefun 70 @end deftypefun
71 71
72 @deftypefun int locker_unlock (locker_t) 72 @deftypefun int mu_locker_unlock (mu_locker_t)
73 @end deftypefun 73 @end deftypefun
74 74
75 @deftypefun int locker_remove_lock (locker_t) 75 @deftypefun int mu_locker_remove_lock (mu_locker_t)
76 @end deftypefun 76 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{mailbox_} is reserved. */} 7 @code{/* Prefix @emph{mu_mailbox_} is reserved. */}
8 @code{#include <mailutils/mailbox.h>} 8 @code{#include <mailutils/mailbox.h>}
9 @end smallexample 9 @end smallexample
10 10
11 @deftp {Data Type} mailbox_t 11 @deftp {Data Type} mu_mailbox_t
12 The @code{mailbox_t} object is used to hold information and it is an opaque 12 The @code{mu_mailbox_t} object is used to hold information and it is an opaque
13 data structure to the user. Functions are provided to retrieve information 13 data structure to the user. Functions are provided to retrieve information
14 from the data structure. 14 from the data structure.
15 @end deftp 15 @end deftp
16 16
17 @smallexample 17 @smallexample
18 @group 18 @group
19 mailbox_t url_t 19 mu_mailbox_t mu_url_t
20 -/var/mail- +---//--->/-----------------\ +-->/-----------\ 20 -/var/mail- +---//--->/------------------\ +-->/-----------\
21 ( alain ) | | url_t *-|---+ | port | 21 ( alain ) | | mu_url_t *-|---+ | port |
22 ---------- | |-----------------+ | hostname | 22 ---------- | |------------------+ | hostname |
23 ( jakob *-)----+ | observer_t *-| | file | 23 ( jakob *-)----+ | mu_observer_t *-| | file |
24 ---------- |-----------------+ | ... | 24 ---------- |------------------+ | ... |
25 ( jeff ) | stream_t | \-----------/ 25 ( jeff ) | mu_stream_t | \-----------/
26 ---------- |-----------------| 26 ---------- |------------------|
27 ( sean ) | locker_t | 27 ( sean ) | mu_locker_t |
28 ---------- |-----------------| 28 ---------- |------------------|
29 | message_t(1) | 29 | mu_message_t(1) |
30 |-----------------| 30 |------------------|
31 | message_t(2) | 31 | mu_message_t(2) |
32 | ...... | 32 | ...... |
33 | message_t(n) | 33 | mu_message_t(n) |
34 \-----------------/ 34 \------------------/
35 @end group 35 @end group
36 @end smallexample 36 @end smallexample
37 37
...@@ -39,8 +39,8 @@ from the data structure. ...@@ -39,8 +39,8 @@ from the data structure.
39 @c Constructor/destructor and possible types. 39 @c Constructor/destructor and possible types.
40 @c 40 @c
41 41
42 @deftypefun int mailbox_create (mailbox_t *@var{mbox}, const char *@var{name}) 42 @deftypefun int mu_mailbox_create (mu_mailbox_t *@var{mbox}, const char *@var{name})
43 The function @code{mailbox_create} allocates and initializes @var{mbox}. 43 The function @code{mu_mailbox_create} allocates and initializes @var{mbox}.
44 The concrete mailbox type instantiate is based on the scheme of the url @var{name}. 44 The concrete mailbox type instantiate is based on the scheme of the url @var{name}.
45 45
46 The return value is @code{0} on success and a code number on error conditions: 46 The return value is @code{0} on success and a code number on error conditions:
...@@ -56,17 +56,17 @@ Not enough memory to allocate resources. ...@@ -56,17 +56,17 @@ Not enough memory to allocate resources.
56 @end table 56 @end table
57 @end deftypefun 57 @end deftypefun
58 58
59 @deftypefun int mailbox_create_default (mailbox_t *@var{mbox}, const char *@var{name}) 59 @deftypefun int mu_mailbox_create_default (mu_mailbox_t *@var{mbox}, const char *@var{name})
60 Create a mailbox with @code{mailbox_create()} based on the environment 60 Create a mailbox with @code{mu_mailbox_create()} based on the environment
61 variable @env{MAIL} or the string formed by 61 variable @env{MAIL} or the string formed by
62 @emph{_PATH_MAILDIR}/@var{user}" or @env{LOGNAME} if @var{user} is null, 62 @emph{_PATH_MAILDIR}/@var{user}" or @env{LOGNAME} if @var{user} is null,
63 @end deftypefun 63 @end deftypefun
64 64
65 @deftypefun void mailbox_destroy (mailbox_t *@var{mbox}) 65 @deftypefun void mu_mailbox_destroy (mu_mailbox_t *@var{mbox})
66 Destroys and releases resources held by @var{mbox}. 66 Destroys and releases resources held by @var{mbox}.
67 @end deftypefun 67 @end deftypefun
68 68
69 @deftypefun int mailbox_open (mailbox_t @var{mbox}, int @var{flag}) 69 @deftypefun int mu_mailbox_open (mu_mailbox_t @var{mbox}, int @var{flag})
70 A connection is open, if no stream was provided, a stream 70 A connection is open, if no stream was provided, a stream
71 is created based on the @var{mbox} type. The @var{flag} can be OR'ed. 71 is created based on the @var{mbox} type. The @var{flag} can be OR'ed.
72 See @code{stream_create()} for @var{flag}'s description. 72 See @code{stream_create()} for @var{flag}'s description.
...@@ -85,7 +85,7 @@ Not enough memory. ...@@ -85,7 +85,7 @@ Not enough memory.
85 @end table 85 @end table
86 @end deftypefun 86 @end deftypefun
87 87
88 @deftypefun int mailbox_close (mailbox_t @var{mbox}) 88 @deftypefun int mu_mailbox_close (mu_mailbox_t @var{mbox})
89 The stream attach to @var{mbox} is closed. 89 The stream attach to @var{mbox} is closed.
90 90
91 The return value is @code{0} on success and a code number on error conditions: 91 The return value is @code{0} on success and a code number on error conditions:
...@@ -95,10 +95,10 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -95,10 +95,10 @@ The return value is @code{0} on success and a code number on error conditions:
95 @end table 95 @end table
96 @end deftypefun 96 @end deftypefun
97 97
98 @deftypefun int mailbox_flush (mailbox_t @var{mbox}, int @var{expunge}) 98 @deftypefun int mu_mailbox_flush (mu_mailbox_t @var{mbox}, int @var{expunge})
99 @end deftypefun 99 @end deftypefun
100 100
101 @deftypefun int mailbox_get_folder (mailbox_t @var{mbox}, folder_t *@var{folder}) 101 @deftypefun int mu_mailbox_get_folder (mu_mailbox_t @var{mbox}, folder_t *@var{folder})
102 Get the @var{folder}. 102 Get the @var{folder}.
103 103
104 The return value is @code{0} on success and a code number on error conditions: 104 The return value is @code{0} on success and a code number on error conditions:
...@@ -108,10 +108,10 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -108,10 +108,10 @@ The return value is @code{0} on success and a code number on error conditions:
108 @end table 108 @end table
109 @end deftypefun 109 @end deftypefun
110 110
111 @deftypefun int mailbox_set_folder (mailbox_t @var{mbox}, folder_t @var{folder}) 111 @deftypefun int mu_mailbox_set_folder (mu_mailbox_t @var{mbox}, mu_folder_t @var{folder})
112 @end deftypefun 112 @end deftypefun
113 113
114 @deftypefun int mailbox_uidvalidity (mailbox_t @var{mbox}, unsigned long *@var{number}); 114 @deftypefun int mu_mailbox_uidvalidity (mu_mailbox_t @var{mbox}, unsigned long *@var{number});
115 Give the uid validity of @var{mbox}. 115 Give the uid validity of @var{mbox}.
116 116
117 The return value is @code{0} on success and a code number on error conditions: 117 The return value is @code{0} on success and a code number on error conditions:
...@@ -121,7 +121,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -121,7 +121,7 @@ The return value is @code{0} on success and a code number on error conditions:
121 @end table 121 @end table
122 @end deftypefun 122 @end deftypefun
123 123
124 @deftypefun int mailbox_uidnext (mailbox_t @var{mbox}, size_t *@var{number}); 124 @deftypefun int mu_mailbox_uidnext (mu_mailbox_t @var{mbox}, size_t *@var{number});
125 Give the next predicted uid for @var{mbox}. 125 Give the next predicted uid for @var{mbox}.
126 126
127 The return value is @code{0} on success and a code number on error conditions: 127 The return value is @code{0} on success and a code number on error conditions:
...@@ -135,7 +135,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -135,7 +135,7 @@ The return value is @code{0} on success and a code number on error conditions:
135 @c Messages. 135 @c Messages.
136 @c 136 @c
137 137
138 @deftypefun int mailbox_get_message (mailbox_t @var{mbox}, size_t @var{msgno}, message_t *@var{message}) 138 @deftypefun int mu_mailbox_get_message (mu_mailbox_t @var{mbox}, size_t @var{msgno}, mu_message_t *@var{message})
139 Retrieve message number @var{msgno}, @var{message} is allocated and 139 Retrieve message number @var{msgno}, @var{message} is allocated and
140 initialized. 140 initialized.
141 141
...@@ -148,7 +148,7 @@ Not enough memory. ...@@ -148,7 +148,7 @@ Not enough memory.
148 @end table 148 @end table
149 @end deftypefun 149 @end deftypefun
150 150
151 @deftypefun int mailbox_append_message (mailbox_t @var{mbox}, message_t @var{message}) 151 @deftypefun int mu_mailbox_append_message (mu_mailbox_t @var{mbox}, mu_message_t @var{message})
152 The @var{message} is appended to the mailbox @var{mbox}. 152 The @var{message} is appended to the mailbox @var{mbox}.
153 153
154 The return value is @code{0} on success and a code number on error conditions: 154 The return value is @code{0} on success and a code number on error conditions:
...@@ -158,7 +158,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -158,7 +158,7 @@ The return value is @code{0} on success and a code number on error conditions:
158 @end table 158 @end table
159 @end deftypefun 159 @end deftypefun
160 160
161 @deftypefun int mailbox_messages_count (mailbox_t @var{mbox}, size_t *@var{number}); 161 @deftypefun int mu_mailbox_messages_count (mu_mailbox_t @var{mbox}, size_t *@var{number});
162 Give the number of messages in @var{mbox}. 162 Give the number of messages in @var{mbox}.
163 163
164 The return value is @code{0} on success and a code number on error conditions: 164 The return value is @code{0} on success and a code number on error conditions:
...@@ -168,7 +168,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -168,7 +168,7 @@ The return value is @code{0} on success and a code number on error conditions:
168 @end table 168 @end table
169 @end deftypefun 169 @end deftypefun
170 170
171 @deftypefun int mailbox_messages_recent (mailbox_t @var{mbox}, size_t *@var{number}); 171 @deftypefun int mu_mailbox_messages_recent (mu_mailbox_t @var{mbox}, size_t *@var{number});
172 Give the number of recent messages in @var{mbox}. 172 Give the number of recent messages in @var{mbox}.
173 173
174 The return value is @code{0} on success and a code number on error conditions: 174 The return value is @code{0} on success and a code number on error conditions:
...@@ -178,7 +178,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -178,7 +178,7 @@ The return value is @code{0} on success and a code number on error conditions:
178 @end table 178 @end table
179 @end deftypefun 179 @end deftypefun
180 180
181 @deftypefun int mailbox_message_unseen (mailbox_t @var{mbox}, size_t *@var{number}); 181 @deftypefun int mu_mailbox_message_unseen (mu_mailbox_t @var{mbox}, size_t *@var{number});
182 Give the number of first unseen message in @var{mbox}. 182 Give the number of first unseen message in @var{mbox}.
183 183
184 The return value is @code{0} on success and a code number on error conditions: 184 The return value is @code{0} on success and a code number on error conditions:
...@@ -188,7 +188,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -188,7 +188,7 @@ The return value is @code{0} on success and a code number on error conditions:
188 @end table 188 @end table
189 @end deftypefun 189 @end deftypefun
190 190
191 @deftypefun int mailbox_expunge (mailbox_t @var{mbox}) 191 @deftypefun int mu_mailbox_expunge (mu_mailbox_t @var{mbox})
192 All messages marked for deletion are removed. 192 All messages marked for deletion are removed.
193 193
194 The return value is @code{0} on success and a code number on error conditions: 194 The return value is @code{0} on success and a code number on error conditions:
...@@ -198,14 +198,14 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -198,14 +198,14 @@ The return value is @code{0} on success and a code number on error conditions:
198 @end table 198 @end table
199 @end deftypefun 199 @end deftypefun
200 200
201 @deftypefun int mailbox_save_attributes (mailbox_t @var{mbox}) 201 @deftypefun int mu_mailbox_save_attributes (mu_mailbox_t @var{mbox})
202 @end deftypefun 202 @end deftypefun
203 203
204 @c 204 @c
205 @c Update and Scanning. 205 @c Update and Scanning.
206 @c 206 @c
207 207
208 @deftypefun int mailbox_get_size (mailbox_t @var{mbox}, off_t *@var{size}) 208 @deftypefun int mu_mailbox_get_size (mu_mailbox_t @var{mbox}, mu_off_t *@var{size})
209 Gives the @var{mbox} size. 209 Gives the @var{mbox} size.
210 210
211 The return value is @code{0} on success and a code number on error conditions: 211 The return value is @code{0} on success and a code number on error conditions:
...@@ -215,10 +215,10 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -215,10 +215,10 @@ The return value is @code{0} on success and a code number on error conditions:
215 @end table 215 @end table
216 @end deftypefun 216 @end deftypefun
217 217
218 @deftypefun int mailbox_is_updated (mailbox_t @var{mbox}) 218 @deftypefun int mu_mailbox_is_updated (mu_mailbox_t @var{mbox})
219 @end deftypefun 219 @end deftypefun
220 220
221 @deftypefun int mailbox_scan (mailbox_t @var{mbox}, size_t @var{msgno}, size_t *@var{count}); 221 @deftypefun int mu_mailbox_scan (mu_mailbox_t @var{mbox}, size_t @var{msgno}, size_t *@var{count});
222 Scan the mailbox for new messages starting at message @var{msgno}. 222 Scan the mailbox for new messages starting at message @var{msgno}.
223 223
224 The return value is @code{0} on success and a code number on error conditions: 224 The return value is @code{0} on success and a code number on error conditions:
...@@ -234,7 +234,7 @@ Not enough memory. ...@@ -234,7 +234,7 @@ Not enough memory.
234 @c Mailbox Stream. 234 @c Mailbox Stream.
235 @c 235 @c
236 236
237 @deftypefun int mailbox_get_stream (mailbox_t @var{mbox}, stream_t *@var{stream}) 237 @deftypefun int mu_mailbox_get_stream (mu_mailbox_t @var{mbox}, mu_stream_t *@var{stream})
238 The mailbox stream is put in @var{stream}. 238 The mailbox stream is put in @var{stream}.
239 239
240 The return value is @code{0} on success and a code number on error conditions: 240 The return value is @code{0} on success and a code number on error conditions:
...@@ -244,7 +244,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -244,7 +244,7 @@ The return value is @code{0} on success and a code number on error conditions:
244 @end table 244 @end table
245 @end deftypefun 245 @end deftypefun
246 246
247 @deftypefun int mailbox_set_stream (mailbox_t @var{mbox}, stream_t @var{stream}) 247 @deftypefun int mu_mailbox_set_stream (mu_mailbox_t @var{mbox}, mu_stream_t @var{stream})
248 Set the @var{stream} connection to use for the mailbox. 248 Set the @var{stream} connection to use for the mailbox.
249 249
250 The return value is @code{0} on success and a code number on error conditions: 250 The return value is @code{0} on success and a code number on error conditions:
...@@ -258,8 +258,8 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -258,8 +258,8 @@ The return value is @code{0} on success and a code number on error conditions:
258 @c Lock Settings. 258 @c Lock Settings.
259 @c 259 @c
260 260
261 @deftypefun int mailbox_get_locker (mailbox_t @var{mbox}, locker_t *@var{locker}) 261 @deftypefun int mu_mailbox_get_locker (mu_mailbox_t @var{mbox}, mu_locker_t *@var{locker})
262 Get the @var{locker_t} object. 262 Get the @var{mu_locker_t} object.
263 263
264 The return value is @code{0} on success and a code number on error conditions: 264 The return value is @code{0} on success and a code number on error conditions:
265 @table @code 265 @table @code
...@@ -268,7 +268,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -268,7 +268,7 @@ The return value is @code{0} on success and a code number on error conditions:
268 @end table 268 @end table
269 @end deftypefun 269 @end deftypefun
270 270
271 @deftypefun int mailbox_set_locker (mailbox_t @var{mbox}, locker_t @var{locker}) 271 @deftypefun int mu_mailbox_set_locker (mu_mailbox_t @var{mbox}, mu_locker_t @var{locker})
272 Set the type of locking done by the @var{mbox}. 272 Set the type of locking done by the @var{mbox}.
273 273
274 The return value is @code{0} on success and a code number on error conditions: 274 The return value is @code{0} on success and a code number on error conditions:
...@@ -282,7 +282,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -282,7 +282,7 @@ The return value is @code{0} on success and a code number on error conditions:
282 @c Property. 282 @c Property.
283 @c 283 @c
284 284
285 @deftypefun int mailbox_get_property (mailbox_t @var{mbox}, property_t *@var{property}) 285 @deftypefun int mu_mailbox_get_property (mu_mailbox_t @var{mbox}, mu_property_t *@var{property})
286 Get the property object. 286 Get the property object.
287 The return value is @code{0} on success and a code number on error conditions: 287 The return value is @code{0} on success and a code number on error conditions:
288 @table @code 288 @table @code
...@@ -296,7 +296,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -296,7 +296,7 @@ The return value is @code{0} on success and a code number on error conditions:
296 @c URL. 296 @c URL.
297 @c 297 @c
298 298
299 @deftypefun int mailbox_get_url (mailbox_t @var{mbox}, url_t *@var{url}) 299 @deftypefun int mu_mailbox_get_url (mu_mailbox_t @var{mbox}, mu_url_t *@var{url})
300 Gives the constructed @var{url}. 300 Gives the constructed @var{url}.
301 301
302 The return value is @code{0} on success and a code number on error conditions: 302 The return value is @code{0} on success and a code number on error conditions:
...@@ -310,10 +310,10 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -310,10 +310,10 @@ The return value is @code{0} on success and a code number on error conditions:
310 @c Debug. 310 @c Debug.
311 @c 311 @c
312 312
313 @deftypefun int mailbox_has_debug (mailbox_t @var{mbox}) 313 @deftypefun int mu_mailbox_has_debug (mu_mailbox_t @var{mbox})
314 @end deftypefun 314 @end deftypefun
315 315
316 @deftypefun int mailbox_get_debug (mailbox_t @var{mbox}, mu_debug_t *@var{debug}) 316 @deftypefun int mu_mailbox_get_debug (mu_mailbox_t @var{mbox}, mu_debug_t *@var{debug})
317 Get a debug object. 317 Get a debug object.
318 The return value is @code{0} on success and a code number on error conditions: 318 The return value is @code{0} on success and a code number on error conditions:
319 @table @code 319 @table @code
...@@ -323,14 +323,14 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -323,14 +323,14 @@ The return value is @code{0} on success and a code number on error conditions:
323 @end table 323 @end table
324 @end deftypefun 324 @end deftypefun
325 325
326 @deftypefun int mailbox_set_debug (mailbox_t @var{mbox}, mu_debug_t @var{debug}) 326 @deftypefun int mu_mailbox_set_debug (mu_mailbox_t @var{mbox}, mu_debug_t @var{debug})
327 @end deftypefun 327 @end deftypefun
328 328
329 @c 329 @c
330 @c Events. 330 @c Events.
331 @c 331 @c
332 332
333 @deftypefun int mailbox_get_observable (mailbox_t mbox @var{mbox}, observable_t *@var{observable}) 333 @deftypefun int mu_mailbox_get_observable (mu_mailbox_t mbox @var{mbox}, mu_observable_t *@var{observable})
334 Get the observable object. 334 Get the observable object.
335 335
336 The return value is @code{0} on success and a code number on error conditions: 336 The return value is @code{0} on success and a code number on error conditions:
...@@ -346,8 +346,8 @@ Not enough memory. ...@@ -346,8 +346,8 @@ Not enough memory.
346 @c Locking 346 @c Locking
347 @c 347 @c
348 348
349 @deftypefun int mailbox_lock (mailbox_t @var{mbox}) 349 @deftypefun int mu_mailbox_lock (mu_mailbox_t @var{mbox})
350 @end deftypefun 350 @end deftypefun
351 351
352 @deftypefun int mailbox_unlock (mailbox_t @var{mbox}) 352 @deftypefun int mu_mailbox_unlock (mu_mailbox_t @var{mbox})
353 @end deftypefun 353 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
...@@ -70,7 +70,7 @@ from the data structure. ...@@ -70,7 +70,7 @@ from the data structure.
70 @include mailcap.inc 70 @include mailcap.inc
71 @end smallexample 71 @end smallexample
72 72
73 @deftypefun int mu_mailcap_create (mu_mailcap_t *@var{mailcap}, stream_t @var{stream}) 73 @deftypefun int mu_mailcap_create (mu_mailcap_t *@var{mailcap}, mu_stream_t @var{stream})
74 The function allocates, parses the buffer from the @var{stream} and initializes @var{mailcap}. 74 The function allocates, parses the buffer from the @var{stream} and initializes @var{mailcap}.
75 The return value is @code{0} on success and a code number on error conditions: 75 The return value is @code{0} on success and a code number on error conditions:
76 @table @code 76 @table @code
...@@ -156,9 +156,9 @@ Helper function saving in buffer, the argument of "notes" field. ...@@ -156,9 +156,9 @@ Helper function saving in buffer, the argument of "notes" field.
156 @end deftypefun 156 @end deftypefun
157 157
158 @deftypefun int mu_mailcap_entry_needsterminal (mu_mailcap_entry_t @var{entry}, int *@var{on}) 158 @deftypefun int mu_mailcap_entry_needsterminal (mu_mailcap_entry_t @var{entry}, int *@var{on})
159 Helper function. Returns *@var{on} != 0 if the flag "needsterminal" is in the record. 159 Helper function. Returns *@var{on} != 0 if the flag @code{needsterminal} is in the record.
160 @end deftypefun 160 @end deftypefun
161 161
162 @deftypefun int mu_mailcap_entry_copiousoutput (mu_mailcap_entry_t @var{entry}, int *@var{on}) 162 @deftypefun int mu_mailcap_entry_copiousoutput (mu_mailcap_entry_t @var{entry}, int *@var{on})
163 Helper function. Returns *@var{on} != 0 if the flag "copiousoutput" is in the record. 163 Helper function. Returns *@var{on} != 0 if the flag @var{copiousoutput} is in the record.
164 @end deftypefun 164 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{mailer_} is reserved. */} 7 @code{/* Prefix @emph{mu_mailer_} is reserved. */}
8 @code{#include <mailutils/mailer.h>} 8 @code{#include <mailutils/mailer.h>}
9 9
10 @end smallexample 10 @end smallexample
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
13 @c Constructor/Destructor. 13 @c Constructor/Destructor.
14 @c 14 @c
15 15
16 @deftypefun int mailer_create (mailer_t *, const char *@var{url}) 16 @deftypefun int mu_mailer_create (mu_mailer_t *, const char *@var{url})
17 @end deftypefun 17 @end deftypefun
18 18
19 @deftypefun void mailer_destroy (mailer_t *) 19 @deftypefun void mu_mailer_destroy (mu_mailer_t *)
20 @end deftypefun 20 @end deftypefun
21 21
22 @deftypefun int mailer_open (mailer_t, int @var{flags}) 22 @deftypefun int mu_mailer_open (mu_mailer_t, int @var{flags})
23 @end deftypefun 23 @end deftypefun
24 24
25 @deftypefun int mailer_close (mailer_t) 25 @deftypefun int mu_mailer_close (mu_mailer_t)
26 @end deftypefun 26 @end deftypefun
27 27
28 @deftypefun int mailer_send_message (mailer_t @var{mailer}, message_t @var{msg}, address_t @var{from}, address_t @var{to}); 28 @deftypefun int mu_mailer_send_message (mu_mailer_t @var{mailer}, mu_message_t @var{msg}, mu_address_t @var{from}, mu_address_t @var{to});
29 29
30 If @var{from} is not @code{NULL}, it must contain a single fully qualified 30 If @var{from} is not @code{NULL}, it must contain a single fully qualified
31 RFC2822 email address which will be used as the envelope from 31 RFC2822 email address which will be used as the envelope from
...@@ -42,31 +42,31 @@ The default for @var{to} is to use the contents of the standard "To:", "Cc:", ...@@ -42,31 +42,31 @@ The default for @var{to} is to use the contents of the standard "To:", "Cc:",
42 and "Bcc:" fields, this is equivalent to Sendmail's @option{-t} flag. 42 and "Bcc:" fields, this is equivalent to Sendmail's @option{-t} flag.
43 @end deftypefun 43 @end deftypefun
44 44
45 @deftypefun int mailer_get_property (mailer_t, property_t *) 45 @deftypefun int mu_mailer_get_property (mu_mailer_t, mu_property_t *)
46 @end deftypefun 46 @end deftypefun
47 47
48 @deftypefun int mailer_get_stream (mailer_t, stream_t *) 48 @deftypefun int mu_mailer_get_stream (mu_mailer_t, mu_stream_t *)
49 @end deftypefun 49 @end deftypefun
50 50
51 @deftypefun int mailer_set_stream (mailer_t, stream_t) 51 @deftypefun int mu_mailer_set_stream (mu_mailer_t, mu_stream_t)
52 @end deftypefun 52 @end deftypefun
53 53
54 @deftypefun int mailer_get_debug (mailer_t, mu_debug_t *) 54 @deftypefun int mu_mailer_get_debug (mu_mailer_t, mu_debug_t *)
55 @end deftypefun 55 @end deftypefun
56 56
57 @deftypefun int mailer_set_debug (mailer_t, mu_debug_t) 57 @deftypefun int mu_mailer_set_debug (mu_mailer_t, mu_debug_t)
58 @end deftypefun 58 @end deftypefun
59 59
60 @deftypefun int mailer_get_observable (mailer_t, observable_t *) 60 @deftypefun int mu_mailer_get_observable (mu_mailer_t, observable_t *)
61 @end deftypefun 61 @end deftypefun
62 62
63 @deftypefun int mailer_get_url (mailer_t, url_t *) 63 @deftypefun int mu_mailer_get_url (mu_mailer_t, url_t *)
64 @end deftypefun 64 @end deftypefun
65 65
66 @deftypefun int mailer_check_from (address_t @var{from}) 66 @deftypefun int mu_mailer_check_from (mu_address_t @var{from})
67 @end deftypefun 67 @end deftypefun
68 68
69 @deftypefun int mailer_check_to (address_t @var{to}) 69 @deftypefun int mu_mailer_check_to (mu_address_t @var{to})
70 @end deftypefun 70 @end deftypefun
71 71
72 @sp 1 72 @sp 1
...@@ -74,41 +74,53 @@ and "Bcc:" fields, this is equivalent to Sendmail's @option{-t} flag. ...@@ -74,41 +74,53 @@ and "Bcc:" fields, this is equivalent to Sendmail's @option{-t} flag.
74 74
75 Some possible use cases the API must support are: 75 Some possible use cases the API must support are:
76 76
77 - original submission 77 @itemize @bullet{}
78 @item original submission
78 79
79 1 - fill in header addresses 80 @enumerate 0
81 @item fill in header addresses
80 82
81 2 - @code{mailer_send_message(mailer, msg, NULL, NULL)} 83 @item @code{mu_mailer_send_message(mailer, msg, NULL, NULL)}
82 84
83 - from will be filled in if missing, 85 @itemize @minus{}
86 @item from will be filled in if missing,
84 87
85 - Bcc's will be deleted before delivery to a non-bcc address, 88 @item Bcc's will be deleted before delivery to a non-bcc address,
86 89
87 - message-id and date will be added, if missing, 90 @item message-id and date will be added, if missing,
88 91
89 - a To: or Apparently-To: will be added if non is present (for RFC 92 @item a @code{To:} or @code{Apparently-To:} header will be added if non is present (for RFC compliance)
90 compliance) 93 @end itemize
91 94
92 - MTA-style @file{.forward} (and Sieve-style redirect) 95 @end enumerate
93 96
94 1 - get the envelope from of the message to be forwarded 97 @item MTA-style @file{.forward} (and Sieve-style redirect)
95 98
96 2 - @code{mailer_send_message(mailer, msg, from, to)} 99 @enumerate 1
100 @item get the envelope from of the message to be forwarded
97 101
98 - MUA-style bounce 102 @item @code{mu_mailer_send_message(mailer, msg, from, to)}
103 @end enumerate
99 104
100 1 - add Resent-[To,From,...] 105 @item MUA-style bounce
101 106
102 2 - @code{mailer_send_message(mailer, msg, NULL, to)} 107 @enumerate 1
108 @item add @code{Resent-[To,From,...]}
103 109
104 - DSN "bounce" 110 @item @code{mu_mailer_send_message(mailer, msg, NULL, to)}
111 @end enumerate
105 112
106 1 - compose DSN 113 @item DSN "bounce"
107 114
108 2 - @code{mailer_deliver(mailer, msg, address_t("<>"), to)} 115 @enumerate 1
116 @item compose DSN
117
118 @item @code{mu_mailer_deliver(mailer, msg, address_t("<>"), to)}
109 119
110 Don't want mail loops, so the null but valid SMTP address of @samp{<>} 120 Don't want mail loops, so the null but valid SMTP address of @samp{<>}
111 is the envelope From. 121 is the envelope From.
122 @end enumerate
123 @end itemize
112 124
113 @subheading The Sendmail Mailer 125 @subheading The Sendmail Mailer
114 126
...@@ -124,7 +136,7 @@ contents for the recipients). ...@@ -124,7 +136,7 @@ contents for the recipients).
124 136
125 @strong{Caution:} since the @code{stdout} and @code{stderr} of Sendmail 137 @strong{Caution:} since the @code{stdout} and @code{stderr} of Sendmail
126 is closed, we have no way of ever giving feedback on failure. Also, what 138 is closed, we have no way of ever giving feedback on failure. Also, what
127 should the return code be from @code{mailer_send_message()} when Sendmail 139 should the return code be from @code{mu_mailer_send_message()} when Sendmail
128 returns @samp{1}? @samp{1} maps to @code{EPERM}, which is less than 140 returns @samp{1}? @samp{1} maps to @code{EPERM}, which is less than
129 descriptive! 141 descriptive!
130 142
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{mbox_} is reserved */} 7 @code{/* Prefix @emph{mu_mbox_} is reserved */}
8 @code{#include <mailutils/mbox.h>} 8 @code{#include <mailutils/mbox.h>}
9 9
10 @end smallexample 10 @end smallexample
...@@ -27,25 +27,25 @@ From SP envelope-sender SP date [SP moreinfo] ...@@ -27,25 +27,25 @@ From SP envelope-sender SP date [SP moreinfo]
27 are optional values that are seldom used. 27 are optional values that are seldom used.
28 @end table 28 @end table
29 29
30 A @var{mbox_t} is created, initialized and destroyed by @code{mbox_create ()} 30 A @var{mu_mbox_t} is created, initialized and destroyed by @code{mu_mbox_create ()}
31 and @code{mbox_destroy ()}. When opening, @code{mbox_open ()} will do a quick 31 and @code{mu_mbox_destroy ()}. When opening, @code{mu_mbox_open ()} will do a quick
32 check to see if the format is a valid format or an empty file. The scanning 32 check to see if the format is a valid format or an empty file. The scanning
33 of the mailbox is done by @code{mbox_scan ()}, the function, takes callback 33 of the mailbox is done by @code{mu_mbox_scan ()}, the function, takes callback
34 functions called during the scanning to provide information on progress and 34 functions called during the scanning to provide information on progress and
35 new messages found. The scanning will cache some of the headers fields for 35 new messages found. The scanning will cache some of the headers fields for
36 speed, new fields could be add with @code{mbox_add_hcache ()}. On Closing 36 speed, new fields could be add with @code{mu_mbox_add_hcache ()}. On Closing
37 the @var{mbox_t}, @code{mbox_close ()} will free any resources like, headers 37 the @var{mu_mbox_t}, @code{mu_mbox_close ()} will free any resources like, headers
38 cache, locks etc ... The messages with attributes marked deleted will only 38 cache, locks etc ... The messages with attributes marked deleted will only
39 be removed on @code{mbox_expunge ()}, if there is a need to save the 39 be removed on @code{mu_mbox_expunge ()}, if there is a need to save the
40 modification without purging @code{mbox_save ()} is more appropriate. 40 modification without purging @code{mu_mbox_save ()} is more appropriate.
41 New messages are added to the mbox with @code{mbox_append ()}. 41 New messages are added to the mbox with @code{mu_mbox_append ()}.
42 Attributes are saved in the @emph{Status:} header 42 Attributes are saved in the @emph{Status:} header
43 field, Read is 'R', Seen is 'O', Deleted is 'd' and Reply is 'r'. 43 field, Read is 'R', Seen is 'O', Deleted is 'd' and Reply is 'r'.
44 44
45 @subsubsection Initialization 45 @subsubsection Initialization
46 @cindex Mbox Initialization 46 @cindex Mbox Initialization
47 47
48 @deftypefun int mbox_create (mbox_t *@var{mbox}) 48 @deftypefun int mu_mbox_create (mu_mbox_t *@var{mbox})
49 49
50 Allocate and initialize a @var{mbox} handle. 50 Allocate and initialize a @var{mbox} handle.
51 51
...@@ -55,7 +55,7 @@ Allocate and initialize a @var{mbox} handle. ...@@ -55,7 +55,7 @@ Allocate and initialize a @var{mbox} handle.
55 @end table 55 @end table
56 @end deftypefun 56 @end deftypefun
57 57
58 @deftypefun void mbox_destroy (mbox_t @var{mbox}) 58 @deftypefun void mu_mbox_destroy (mu_mbox_t @var{mbox})
59 59
60 When a POP3 session is finished, the structure must be @code{free ()}'ed to 60 When a POP3 session is finished, the structure must be @code{free ()}'ed to
61 reclaim memory. 61 reclaim memory.
...@@ -64,10 +64,10 @@ reclaim memory. ...@@ -64,10 +64,10 @@ reclaim memory.
64 @subsubsection Carrier 64 @subsubsection Carrier
65 @cindex Mbox channel 65 @cindex Mbox channel
66 66
67 @deftypefun int mbox_set_carrier (mbox_t, stream_t @var{carrier}); 67 @deftypefun int mu_mbox_set_carrier (mu_mbox_t, stream_t @var{carrier});
68 68
69 Another type of stream can be provided, the @var{carrier} 69 Another type of stream can be provided, the @var{carrier}
70 is set in the @var{mbox_t} handle. Any previous @var{carrier} stream in 70 is set in the @var{mu_mbox_t} handle. Any previous @var{carrier} stream in
71 the handle, will be close and destroy. Since the parsing code 71 the handle, will be close and destroy. Since the parsing code
72 maintain only the offsets off the message the @var{carrier} stream must be 72 maintain only the offsets off the message the @var{carrier} stream must be
73 seekable. 73 seekable.
...@@ -77,9 +77,9 @@ seekable. ...@@ -77,9 +77,9 @@ seekable.
77 @end table 77 @end table
78 @end deftypefun 78 @end deftypefun
79 79
80 @deftypefun int mbox_get_carrier (mbox_t, stream_t *@var{carrier}); 80 @deftypefun int mu_mbox_get_carrier (mu_mbox_t, stream_t *@var{carrier});
81 81
82 Return the @var{mbox_t} carrier. If none was set, a new file stream will be 82 Return the @var{mu_mbox_t} carrier. If none was set, a new file stream will be
83 created. 83 created.
84 84
85 @table @code 85 @table @code
...@@ -88,7 +88,7 @@ created. ...@@ -88,7 +88,7 @@ created.
88 @end table 88 @end table
89 @end deftypefun 89 @end deftypefun
90 90
91 @deftypefun int mbox_open (mbox_t, const char *@var{filename}, int @var{flags}) 91 @deftypefun int mu_mbox_open (mu_mbox_t, const char *@var{filename}, int @var{flags})
92 92
93 Open carrier stream with @var{filename} and @var{flags}. The stream will be 93 Open carrier stream with @var{filename} and @var{flags}. The stream will be
94 quickly examine to see if it is a mbox format. 94 quickly examine to see if it is a mbox format.
...@@ -102,7 +102,7 @@ quickly examine to see if it is a mbox format. ...@@ -102,7 +102,7 @@ quickly examine to see if it is a mbox format.
102 @end table 102 @end table
103 @end deftypefun 103 @end deftypefun
104 104
105 @deftypefun int mbox_close (mbox_t) 105 @deftypefun int mu_mbox_close (mu_mbox_t)
106 106
107 Close the carrier stream and resources particular to the mailbox. 107 Close the carrier stream and resources particular to the mailbox.
108 108
...@@ -112,29 +112,29 @@ Close the carrier stream and resources particular to the mailbox. ...@@ -112,29 +112,29 @@ Close the carrier stream and resources particular to the mailbox.
112 @end table 112 @end table
113 @end deftypefun 113 @end deftypefun
114 114
115 @deftypefun int mbox_uidnext (mbox_t, unsigned long *@var{uidnext}) 115 @deftypefun int mu_mbox_uidnext (mu_mbox_t, unsigned long *@var{uidnext})
116 116
117 Return the uidnext, if the @var{mbox_t} was not scan @code{mbox_scan ()} 117 Return the uidnext, if the @var{mu_mbox_t} was not scan @code{mu_mbox_scan ()}
118 is called first. 118 is called first.
119 119
120 @table @code 120 @table @code
121 @item MU_ERROR_INVALID_PARAMETER 121 @item MU_ERROR_INVALID_PARAMETER
122 @item same as @code{mbox_scan ()} 122 @item same as @code{mu_mbox_scan ()}
123 @end table 123 @end table
124 @end deftypefun 124 @end deftypefun
125 125
126 @deftypefun int mbox_uidvalidity (mbox_t, unsigned long *@var{uidvalidity}) 126 @deftypefun int mu_mbox_uidvalidity (mu_mbox_t, unsigned long *@var{uidvalidity})
127 127
128 Return the uidvalidity, if the @var{mbox_t} was not scan @code{mbox_scan ()} 128 Return the uidvalidity, if the @var{mu_mbox_t} was not scan @code{mu_mbox_scan ()}
129 is called first. 129 is called first.
130 130
131 @table @code 131 @table @code
132 @item MU_ERROR_INVALID_PARAMETER 132 @item MU_ERROR_INVALID_PARAMETER
133 @item same as @code{mbox_scan ()} 133 @item same as @code{mu_mbox_scan ()}
134 @end table 134 @end table
135 @end deftypefun 135 @end deftypefun
136 136
137 @deftypefun int mbox_get_uid (mbox_t, unsigned int @var{msgno}, unsigned long *@var{uid}) 137 @deftypefun int mu_mbox_get_uid (mu_mbox_t, unsigned int @var{msgno}, unsigned long *@var{uid})
138 138
139 Return the @var{uid} of the message @var{msgno}. 139 Return the @var{uid} of the message @var{msgno}.
140 140
...@@ -143,7 +143,7 @@ Return the @var{uid} of the message @var{msgno}. ...@@ -143,7 +143,7 @@ Return the @var{uid} of the message @var{msgno}.
143 @end table 143 @end table
144 @end deftypefun 144 @end deftypefun
145 145
146 @deftypefun int mbox_get_attribute (mbox_t, unsigned int @var{msgno}, attribute_t *@var{attribute}) 146 @deftypefun int mu_mbox_get_attribute (mu_mbox_t, unsigned int @var{msgno}, attribute_t *@var{attribute})
147 147
148 Return an @var{attribute} to indicate the status of message number @var{msgno}. 148 Return an @var{attribute} to indicate the status of message number @var{msgno}.
149 149
...@@ -153,7 +153,7 @@ Return an @var{attribute} to indicate the status of message number @var{msgno}. ...@@ -153,7 +153,7 @@ Return an @var{attribute} to indicate the status of message number @var{msgno}.
153 @end table 153 @end table
154 @end deftypefun 154 @end deftypefun
155 155
156 @deftypefun int mbox_get_separator (mbox_t, unsigned int @var{msgno}, char **@var{sep}) 156 @deftypefun int mu_mbox_get_separator (mu_mbox_t, unsigned int @var{msgno}, char **@var{sep})
157 157
158 Return an allocated string in @var{sep} containing the value "From " separating 158 Return an allocated string in @var{sep} containing the value "From " separating
159 each message in Unix mbox format. The string should be @code{free ()}ed by 159 each message in Unix mbox format. The string should be @code{free ()}ed by
...@@ -165,7 +165,7 @@ the caller. ...@@ -165,7 +165,7 @@ the caller.
165 @end table 165 @end table
166 @end deftypefun 166 @end deftypefun
167 167
168 @deftypefun int mbox_set_separator (mbox_t, unsigned int @var{msgno}, const char *@var{sep}) 168 @deftypefun int mu_mbox_set_separator (mu_mbox_t, unsigned int @var{msgno}, const char *@var{sep})
169 169
170 The variable @var{sep} should contain a valid "From " separator that will be use 170 The variable @var{sep} should contain a valid "From " separator that will be use
171 when the expunging. 171 when the expunging.
...@@ -176,7 +176,7 @@ when the expunging. ...@@ -176,7 +176,7 @@ when the expunging.
176 @end table 176 @end table
177 @end deftypefun 177 @end deftypefun
178 178
179 @deftypefun int mbox_get_hstream (mbox_t, unsigned int @var{msgno}, stream_t *@var{stream}) 179 @deftypefun int mu_mbox_get_hstream (mu_mbox_t, unsigned int @var{msgno}, stream_t *@var{stream})
180 180
181 Return a @var{stream} to read the header of message @var{msgno}. The 181 Return a @var{stream} to read the header of message @var{msgno}. The
182 @var{stream} should be destroy after usage. 182 @var{stream} should be destroy after usage.
...@@ -187,7 +187,7 @@ Return a @var{stream} to read the header of message @var{msgno}. The ...@@ -187,7 +187,7 @@ Return a @var{stream} to read the header of message @var{msgno}. The
187 @end table 187 @end table
188 @end deftypefun 188 @end deftypefun
189 189
190 @deftypefun int mbox_set_hstream (mbox_t, unsigned int @var{msgno}, stream_t @var{stream}) 190 @deftypefun int mu_mbox_set_hstream (mu_mbox_t, unsigned int @var{msgno}, stream_t @var{stream})
191 191
192 Use @var{stream} when expunging for message @var{msgno}. 192 Use @var{stream} when expunging for message @var{msgno}.
193 193
...@@ -196,7 +196,7 @@ Use @var{stream} when expunging for message @var{msgno}. ...@@ -196,7 +196,7 @@ Use @var{stream} when expunging for message @var{msgno}.
196 @end table 196 @end table
197 @end deftypefun 197 @end deftypefun
198 198
199 @deftypefun int mbox_set_hsize (mbox_t, unsigned int @var{msgno}, unsigned int *@var{size}) 199 @deftypefun int mu_mbox_set_hsize (mu_mbox_t, unsigned int @var{msgno}, unsigned int *@var{size})
200 200
201 Return the @var{size} of message @var{msgno}. 201 Return the @var{size} of message @var{msgno}.
202 202
...@@ -205,7 +205,7 @@ Return the @var{size} of message @var{msgno}. ...@@ -205,7 +205,7 @@ Return the @var{size} of message @var{msgno}.
205 @end table 205 @end table
206 @end deftypefun 206 @end deftypefun
207 207
208 @deftypefun int mbox_set_hlines (mbox_t, unsigned int @var{msgno}, unsigned int *@var{size}) 208 @deftypefun int mu_mbox_set_hlines (mu_mbox_t, unsigned int @var{msgno}, unsigned int *@var{size})
209 209
210 Return the number of @var{lines} of message @var{msgno}. 210 Return the number of @var{lines} of message @var{msgno}.
211 211
...@@ -214,7 +214,7 @@ Return the number of @var{lines} of message @var{msgno}. ...@@ -214,7 +214,7 @@ Return the number of @var{lines} of message @var{msgno}.
214 @end table 214 @end table
215 @end deftypefun 215 @end deftypefun
216 216
217 @deftypefun int mbox_get_bstream (mbox_t, unsigned int @var{msgno}, stream_t *@var{stream}) 217 @deftypefun int mu_mbox_get_bstream (mu_mbox_t, unsigned int @var{msgno}, stream_t *@var{stream})
218 218
219 Return a @var{stream} to read the body of message @var{msgno}. The 219 Return a @var{stream} to read the body of message @var{msgno}. The
220 @var{stream} should be destroy after usage. 220 @var{stream} should be destroy after usage.
...@@ -225,7 +225,7 @@ Return a @var{stream} to read the body of message @var{msgno}. The ...@@ -225,7 +225,7 @@ Return a @var{stream} to read the body of message @var{msgno}. The
225 @end table 225 @end table
226 @end deftypefun 226 @end deftypefun
227 227
228 @deftypefun int mbox_set_bstream (mbox_t, unsigned int @var{msgno}, stream_t @var{stream}) 228 @deftypefun int mu_mbox_set_bstream (mu_mbox_t, unsigned int @var{msgno}, stream_t @var{stream})
229 229
230 Use @var{stream} when expunging for message @var{msgno}. 230 Use @var{stream} when expunging for message @var{msgno}.
231 231
...@@ -234,7 +234,7 @@ Use @var{stream} when expunging for message @var{msgno}. ...@@ -234,7 +234,7 @@ Use @var{stream} when expunging for message @var{msgno}.
234 @end table 234 @end table
235 @end deftypefun 235 @end deftypefun
236 236
237 @deftypefun int mbox_set_bsize (mbox_t, unsigned int @var{msgno}, unsigned int *@var{size}) 237 @deftypefun int mu_mbox_set_bsize (mu_mbox_t, unsigned int @var{msgno}, unsigned int *@var{size})
238 238
239 Return the @var{size} of message @var{msgno}. 239 Return the @var{size} of message @var{msgno}.
240 240
...@@ -243,7 +243,7 @@ Return the @var{size} of message @var{msgno}. ...@@ -243,7 +243,7 @@ Return the @var{size} of message @var{msgno}.
243 @end table 243 @end table
244 @end deftypefun 244 @end deftypefun
245 245
246 @deftypefun int mbox_set_blines (mbox_t, unsigned int @var{msgno}, unsigned int *@var{size}) 246 @deftypefun int mu_mbox_set_blines (mu_mbox_t, unsigned int @var{msgno}, unsigned int *@var{size})
247 247
248 Return the number of @var{lines} of message @var{msgno}. 248 Return the number of @var{lines} of message @var{msgno}.
249 249
...@@ -252,7 +252,7 @@ Return the number of @var{lines} of message @var{msgno}. ...@@ -252,7 +252,7 @@ Return the number of @var{lines} of message @var{msgno}.
252 @end table 252 @end table
253 @end deftypefun 253 @end deftypefun
254 254
255 @deftypefun int mbox_get_size (mbox_t, unsigned int *@var{size}) 255 @deftypefun int mu_mbox_get_size (mu_mbox_t, unsigned int *@var{size})
256 256
257 Return the @var{size} of mailbox. 257 Return the @var{size} of mailbox.
258 258
...@@ -261,7 +261,7 @@ Return the @var{size} of mailbox. ...@@ -261,7 +261,7 @@ Return the @var{size} of mailbox.
261 @end table 261 @end table
262 @end deftypefun 262 @end deftypefun
263 263
264 @deftypefun int mbox_set_hcache (mbox_t, const char **@var{array}, size_t @var{len}) 264 @deftypefun int mu_mbox_set_hcache (mu_mbox_t, const char **@var{array}, size_t @var{len})
265 265
266 Set the @var{array} of fields as the header to cache when doing the scanning. 266 Set the @var{array} of fields as the header to cache when doing the scanning.
267 If @var{array} is NULL the header cache is emptied. 267 If @var{array} is NULL the header cache is emptied.
...@@ -272,7 +272,7 @@ If @var{array} is NULL the header cache is emptied. ...@@ -272,7 +272,7 @@ If @var{array} is NULL the header cache is emptied.
272 @end table 272 @end table
273 @end deftypefun 273 @end deftypefun
274 274
275 @deftypefun int mbox_add_hcache (mbox_t, const char **@var{array}, size_t @var{len}) 275 @deftypefun int mu_mbox_add_hcache (mu_mbox_t, const char **@var{array}, size_t @var{len})
276 276
277 Add to the current cache for the scan, the fields in @var{array}. 277 Add to the current cache for the scan, the fields in @var{array}.
278 278
...@@ -282,7 +282,7 @@ Add to the current cache for the scan, the fields in @var{array}. ...@@ -282,7 +282,7 @@ Add to the current cache for the scan, the fields in @var{array}.
282 @end table 282 @end table
283 @end deftypefun 283 @end deftypefun
284 284
285 @deftypefun int mbox_value_hcache (mbox_t, unsigned int @var{msgno}, const char *@var{field}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{writen}) 285 @deftypefun int mu_mbox_value_hcache (mu_mbox_t, unsigned int @var{msgno}, const char *@var{field}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{writen})
286 286
287 Get the value of @var{field} in the header cache for @var{msgno}. The 287 Get the value of @var{field} in the header cache for @var{msgno}. The
288 result is copied in a @var{buffer} of @var{buflen} and @var{writen} is set 288 result is copied in a @var{buffer} of @var{buflen} and @var{writen} is set
...@@ -294,7 +294,7 @@ to the number of byte put in @var{buffer}. ...@@ -294,7 +294,7 @@ to the number of byte put in @var{buffer}.
294 @end table 294 @end table
295 @end deftypefun 295 @end deftypefun
296 296
297 @deftypefun int mbox_save (mbox_t) 297 @deftypefun int mu_mbox_save (mu_mbox_t)
298 298
299 Save the changes to the messages back to the mailbox, but do not 299 Save the changes to the messages back to the mailbox, but do not
300 remove messages mark for deletion in the process. 300 remove messages mark for deletion in the process.
...@@ -304,7 +304,7 @@ remove messages mark for deletion in the process. ...@@ -304,7 +304,7 @@ remove messages mark for deletion in the process.
304 @end table 304 @end table
305 @end deftypefun 305 @end deftypefun
306 306
307 @deftypefun int mbox_expunge (mbox_t) 307 @deftypefun int mu_mbox_expunge (mu_mbox_t)
308 308
309 Save the changes to the mailbox and in the process remove all messages 309 Save the changes to the mailbox and in the process remove all messages
310 marked for deletion. 310 marked for deletion.
...@@ -314,7 +314,7 @@ marked for deletion. ...@@ -314,7 +314,7 @@ marked for deletion.
314 @end table 314 @end table
315 @end deftypefun 315 @end deftypefun
316 316
317 @deftypefun int mbox_append (mbox_t, const char *@var{sep}, stream_t @var{stream}) 317 @deftypefun int mu_mbox_append (mu_mbox_t, const char *@var{sep}, stream_t @var{stream})
318 318
319 Append to the mailbox an rfc822 message represented by @var{stream}. 319 Append to the mailbox an rfc822 message represented by @var{stream}.
320 The variable @var{sep} should contain a valid "From " separator or 320 The variable @var{sep} should contain a valid "From " separator or
...@@ -325,7 +325,7 @@ NULL to get the default. ...@@ -325,7 +325,7 @@ NULL to get the default.
325 @end table 325 @end table
326 @end deftypefun 326 @end deftypefun
327 327
328 @deftypefun int mbox_append_hb (mbox_t, const char *@var{sep}, stream_t @var{hstream}, stream_t @var{bstream}) 328 @deftypefun int mu_mbox_append_hb (mu_mbox_t, const char *@var{sep}, stream_t @var{hstream}, stream_t @var{bstream})
329 329
330 Append to the mailbox an rfc822 message represented by a header, @var{hstream}, 330 Append to the mailbox an rfc822 message represented by a header, @var{hstream},
331 and a body, @var{bstream}. The variable @var{sep} should contain a valid 331 and a body, @var{bstream}. The variable @var{sep} should contain a valid
...@@ -336,12 +336,12 @@ and a body, @var{bstream}. The variable @var{sep} should contain a valid ...@@ -336,12 +336,12 @@ and a body, @var{bstream}. The variable @var{sep} should contain a valid
336 @end table 336 @end table
337 @end deftypefun 337 @end deftypefun
338 338
339 @deftypefun int mbox_scan (mbox_t, unsigned int @var{start}, unsigned int *@var{count}) 339 @deftypefun int mu_mbox_scan (mu_mbox_t, unsigned int @var{start}, unsigned int *@var{count})
340 340
341 Start scanning the mailbox for new messages. The variable @var{start} can be 341 Start scanning the mailbox for new messages. The variable @var{start} can be
342 a message number starting point. The result of the scanning will be in 342 a message number starting point. The result of the scanning will be in
343 @var{count}. The scanning will trigger the @code{mbox_newmsg_cb()} callback 343 @var{count}. The scanning will trigger the @code{mu_mbox_newmsg_cb()} callback
344 for each new message and @code{mbox_progress_cb ()} at different interval 344 for each new message and @code{mu_mbox_progress_cb ()} at different interval
345 to notify progression. The return values of the those callback should be 345 to notify progression. The return values of the those callback should be
346 0 is different then 0 the scanning will be stop an the function returns 346 0 is different then 0 the scanning will be stop an the function returns
347 MU_ERROR_INTERRUPTED. 347 MU_ERROR_INTERRUPTED.
...@@ -353,12 +353,12 @@ MU_ERROR_INTERRUPTED. ...@@ -353,12 +353,12 @@ MU_ERROR_INTERRUPTED.
353 @end table 353 @end table
354 @end deftypefun 354 @end deftypefun
355 355
356 @deftypefun int mbox_count (mbox_t, unsigned int *@var{count}) 356 @deftypefun int mu_mbox_count (mu_mbox_t, unsigned int *@var{count})
357 357
358 Same as @code{mbox_scan ()} but does not call the callbacks. 358 Same as @code{mu_mbox_scan ()} but does not call the callbacks.
359 359
360 @end deftypefun 360 @end deftypefun
361 @deftypefun int mbox_set_progress_cb (mbox_t, int (*@var{callback}) (int @var{percentage}, void *)), void *@var{arg}) 361 @deftypefun int mu_mbox_set_progress_cb (mu_mbox_t, int (*@var{callback}) (int @var{percentage}, void *)), void *@var{arg})
362 362
363 Set the callback function for progress. The variable @var{arg} will be pass 363 Set the callback function for progress. The variable @var{arg} will be pass
364 back in the callback as the second argument. The first argument of the 364 back in the callback as the second argument. The first argument of the
...@@ -369,7 +369,7 @@ callback represents a @var{percentage} of the scanning progress. ...@@ -369,7 +369,7 @@ callback represents a @var{percentage} of the scanning progress.
369 @end table 369 @end table
370 @end deftypefun 370 @end deftypefun
371 371
372 @deftypefun int mbox_set_newmsg_cb (mbox_t, int (*@var{callback}) (int @var{count}, void *)), void *@var{arg}) 372 @deftypefun int mu_mbox_set_newmsg_cb (mu_mbox_t, int (*@var{callback}) (int @var{count}, void *)), void *@var{arg})
373 373
374 Set the callback function for new messages. The variable @var{arg} will be 374 Set the callback function for new messages. The variable @var{arg} will be
375 pass back in the callback as the second argument. The first argument 375 pass back in the callback as the second argument. The first argument
...@@ -380,7 +380,7 @@ is the total of messages found. ...@@ -380,7 +380,7 @@ is the total of messages found.
380 @end table 380 @end table
381 @end deftypefun 381 @end deftypefun
382 382
383 @deftypefun int mbox_set_error_cb (mbox_t, int (*@var{callback}) (int, void *)), void *@var{arg}) 383 @deftypefun int mu_mbox_set_error_cb (mu_mbox_t, int (*@var{callback}) (int, void *)), void *@var{arg})
384 384
385 Set the callback function for errors. The variable @var{arg} will be 385 Set the callback function for errors. The variable @var{arg} will be
386 pass back in the callback as the second argument. 386 pass back in the callback as the second argument.
...@@ -389,7 +389,7 @@ pass back in the callback as the second argument. ...@@ -389,7 +389,7 @@ pass back in the callback as the second argument.
389 @item MU_ERROR_INVALID_PARAMETER 389 @item MU_ERROR_INVALID_PARAMETER
390 @end table 390 @end table
391 @end deftypefun 391 @end deftypefun
392 @deftypefun int mbox_has_newmail (mbox_t) 392 @deftypefun int mu_mbox_has_newmail (mu_mbox_t)
393 393
394 Return nonzero if there is new mail append to the mbox_t. 394 Return nonzero if there is new mail append to the mu_mbox_t.
395 @end deftypefun 395 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{message_} is reserved. */} 7 @code{/* Prefix @emph{mu_message_} is reserved. */}
8 @code{#include <mailutils/message.h>} 8 @code{#include <mailutils/message.h>}
9 9
10 @end smallexample 10 @end smallexample
11 11
12 The @code{message_t} object is a convenient way to manipulate messages. It 12 The @code{mu_message_t} object is a convenient way to manipulate messages. It
13 encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}. 13 encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}.
14 14
15 @smallexample 15 @smallexample
16 @group 16 @group
17 mailbox_t 17 mailbox_t
18 ---------- message_t 18 ---------- mu_message_t
19 (message[1]) +------>+--------------------+ 19 (message[1]) +------>+--------------------+
20 ---------- | | envelope_t | 20 ---------- | | mu_envelope_t |
21 (message[2]) | |--------------------| 21 (message[2]) | |--------------------|
22 ---------- | | header_t | 22 ---------- | | mu_header_t |
23 (message[3])--------+ |--------------------| 23 (message[3])--------+ |--------------------|
24 ---------- | body_t | 24 ---------- | mu_body_t |
25 (message[n]) |--------------------| 25 (message[n]) |--------------------|
26 ---------- | attribute_t | 26 ---------- | mu_attribute_t |
27 |--------------------| 27 |--------------------|
28 | stream_t | 28 | mu_stream_t |
29 +--------------------+ 29 +--------------------+
30 @end group 30 @end group
31 @end smallexample 31 @end smallexample
...@@ -34,136 +34,136 @@ encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}. ...@@ -34,136 +34,136 @@ encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}.
34 @c Basic. 34 @c Basic.
35 @c 35 @c
36 36
37 @deftypefun void message_create (message_t *@var{msg}, void *@var{owner}) 37 @deftypefun void mu_message_create (mu_message_t *@var{msg}, void *@var{owner})
38 @end deftypefun 38 @end deftypefun
39 39
40 @deftypefun void message_destroy (message_t *@var{msg}, void *@var{owner}) 40 @deftypefun void mu_message_destroy (mu_message_t *@var{msg}, void *@var{owner})
41 The resources allocate for @var{msg} are freed. 41 The resources allocate for @var{msg} are freed.
42 @end deftypefun 42 @end deftypefun
43 43
44 @deftypefun int message_create_copy (message_t *@var{to}, message_t *@var{from}) 44 @deftypefun int mu_message_create_copy (mu_message_t *@var{to}, mu_message_t *@var{from})
45 @end deftypefun 45 @end deftypefun
46 46
47 @deftypefun void* message_get_owner (message_t @var{msg}) 47 @deftypefun void* mu_message_get_owner (mu_message_t @var{msg})
48 @end deftypefun 48 @end deftypefun
49 49
50 @deftypefun int message_is_modified (message_t @var{msg}) 50 @deftypefun int mu_message_is_modified (mu_message_t @var{msg})
51 @end deftypefun 51 @end deftypefun
52 52
53 @deftypefun int message_clear_modified (message_t @var{msg}) 53 @deftypefun int mu_message_clear_modified (mu_message_t @var{msg})
54 @end deftypefun 54 @end deftypefun
55 55
56 @deftypefun int message_get_mailbox (message_t @var{msg}, mailbox_t *@var{mbox}) 56 @deftypefun int mu_message_get_mailbox (mu_message_t @var{msg}, mu_mailbox_t *@var{mbox})
57 @end deftypefun 57 @end deftypefun
58 58
59 @deftypefun int message_set_mailbox (message_t @var{msg}, mailbox_t @var{mbox}, void *@var{owner}) 59 @deftypefun int mu_message_set_mailbox (mu_message_t @var{msg}, mu_mailbox_t @var{mbox}, void *@var{owner})
60 @end deftypefun 60 @end deftypefun
61 61
62 @c 62 @c
63 @c ------------ 63 @c ------------
64 @c 64 @c
65 65
66 @deftypefun int message_ref (message_t @var{msg}) 66 @deftypefun int mu_message_ref (mu_message_t @var{msg})
67 @end deftypefun 67 @end deftypefun
68 68
69 @deftypefun int message_get_envelope (message_t @var{msg}, envelope_t *@var{envelope}) 69 @deftypefun int mu_message_get_envelope (mu_message_t @var{msg}, mu_envelope_t *@var{envelope})
70 @end deftypefun 70 @end deftypefun
71 71
72 @deftypefun int message_set_envelope (message_t @var{msg}, envelope_t @var{envelope}, void *@var{owner}) 72 @deftypefun int mu_message_set_envelope (mu_message_t @var{msg}, mu_envelope_t @var{envelope}, void *@var{owner})
73 @end deftypefun 73 @end deftypefun
74 74
75 @deftypefun int message_get_header (message_t @var{msg}, header_t *@var{header}) 75 @deftypefun int mu_message_get_header (mu_message_t @var{msg}, mu_header_t *@var{header})
76 Retrieve @var{msg} header. 76 Retrieve @var{msg} header.
77 @end deftypefun 77 @end deftypefun
78 78
79 @deftypefun int message_set_header (message_t @var{msg}, header_t @var{header}, void *@var{owner}) 79 @deftypefun int mu_message_set_header (mu_message_t @var{msg}, mu_header_t @var{header}, void *@var{owner})
80 @end deftypefun 80 @end deftypefun
81 81
82 @deftypefun int message_get_body (message_t @var{msg}, body_t *@var{body}) 82 @deftypefun int mu_message_get_body (mu_message_t @var{msg}, mu_body_t *@var{body})
83 @end deftypefun 83 @end deftypefun
84 84
85 @deftypefun int message_set_body (message_t @var{msg}, body_t @var{body}, void *@var{owner}) 85 @deftypefun int mu_message_set_body (mu_message_t @var{msg}, mu_body_t @var{body}, void *@var{owner})
86 @end deftypefun 86 @end deftypefun
87 87
88 @deftypefun int message_get_stream (message_t @var{msg}, stream_t *@var{stream}) 88 @deftypefun int mu_message_get_stream (mu_message_t @var{msg}, mu_stream_t *@var{stream})
89 @end deftypefun 89 @end deftypefun
90 90
91 @deftypefun int message_set_stream (message_t @var{msg}, stream_t @var{stream}, void *@var{owner}) 91 @deftypefun int mu_message_set_stream (mu_message_t @var{msg}, mu_stream_t @var{stream}, void *@var{owner})
92 @end deftypefun 92 @end deftypefun
93 93
94 @deftypefun int message_get_attribute (message_t @var{msg}, attribute_t *@var{attribute}) 94 @deftypefun int mu_message_get_attribute (mu_message_t @var{msg}, mu_attribute_t *@var{attribute})
95 @end deftypefun 95 @end deftypefun
96 96
97 @deftypefun int message_set_attribute (message_t @var{msg}, attribute_t @var{attribute}, void *@var{owner}) 97 @deftypefun int mu_message_set_attribute (mu_message_t @var{msg}, mu_attribute_t @var{attribute}, void *@var{owner})
98 @end deftypefun 98 @end deftypefun
99 99
100 @deftypefun int message_get_observable (message_t @var{msg}, observable_t *@var{observable}) 100 @deftypefun int mu_message_get_observable (mu_message_t @var{msg}, mu_observable_t *@var{observable})
101 @end deftypefun 101 @end deftypefun
102 102
103 @c 103 @c
104 @c ------------ 104 @c ------------
105 @c 105 @c
106 106
107 @deftypefun int message_is_multipart (message_t @var{msg}, int *@var{multi}) 107 @deftypefun int mu_message_is_multipart (mu_message_t @var{msg}, int *@var{multi})
108 Set *@var{multi} to non-zero value if @var{msg} is multi-part. 108 Set *@var{multi} to non-zero value if @var{msg} is multi-part.
109 @end deftypefun 109 @end deftypefun
110 110
111 @deftypefun int message_set_is_multipart (message_t @var{msg}, int (*@var{_is_multipart}) (message_t, int *), void *); 111 @deftypefun int mu_message_set_is_multipart (mu_message_t @var{msg}, int (*@var{_is_multipart}) (mu_message_t, int *), void *);
112 @end deftypefun 112 @end deftypefun
113 113
114 @deftypefun int message_size (message_t @var{msg}, size_t *@var{size}) 114 @deftypefun int mu_message_size (mu_message_t @var{msg}, size_t *@var{size})
115 @end deftypefun 115 @end deftypefun
116 116
117 @deftypefun int message_set_size (message_t @var{msg}, int (*@var{_size}) (message_t, size_t *), void *@var{owner}) 117 @deftypefun int mu_message_set_size (mu_message_t @var{msg}, int (*@var{_size}) (mu_message_t, size_t *), void *@var{owner})
118 @end deftypefun 118 @end deftypefun
119 119
120 @deftypefun int message_lines (message_t @var{msg}, size_t *@var{size}) 120 @deftypefun int mu_message_lines (mu_message_t @var{msg}, size_t *@var{size})
121 @end deftypefun 121 @end deftypefun
122 122
123 @deftypefun int message_set_lines (message_t @var{msg}, int (*@var{_lines}) (message_t, size_t *), void *@var{owner}) 123 @deftypefun int mu_message_set_lines (mu_message_t @var{msg}, int (*@var{_lines}) (mu_message_t, size_t *), void *@var{owner})
124 @end deftypefun 124 @end deftypefun
125 125
126 @deftypefun int message_get_num_parts (message_t @var{msg}, size_t *@var{nparts}) 126 @deftypefun int mu_message_get_num_parts (mu_message_t @var{msg}, size_t *@var{nparts})
127 @end deftypefun 127 @end deftypefun
128 128
129 @deftypefun int message_set_get_num_parts (message_t @var{msg}, int (*@var{_get_num_parts}) (message_t, size_t *), void *@var{owner}) 129 @deftypefun int mu_message_set_get_num_parts (mu_message_t @var{msg}, int (*@var{_get_num_parts}) (mu_message_t, size_t *), void *@var{owner})
130 @end deftypefun 130 @end deftypefun
131 131
132 @deftypefun int message_get_part (message_t @var{msg}, size_t @var{part}, message_t *@var{msg}) 132 @deftypefun int mu_message_get_part (mu_message_t @var{msg}, size_t @var{part}, mu_message_t *@var{msg})
133 @end deftypefun 133 @end deftypefun
134 134
135 @deftypefun int message_set_get_part (message_t @var{msg}, int (*@var{_get_part}) (message_t, size_t, message_t *), void *@var{owner}) 135 @deftypefun int mu_message_set_get_part (mu_message_t @var{msg}, int (*@var{_get_part}) (mu_message_t, size_t, mu_message_t *), void *@var{owner})
136 @end deftypefun 136 @end deftypefun
137 137
138 @deftypefun int message_get_uidl (message_t @var{msg}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{writen}) 138 @deftypefun int mu_message_get_uidl (mu_message_t @var{msg}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{writen})
139 @end deftypefun 139 @end deftypefun
140 140
141 @deftypefun int message_set_uidl (message_t @var{msg}, int (*@var{_get_uidl}) (message_t, char *, size_t, size_t *), void *@var{owner}) 141 @deftypefun int mu_message_set_uidl (mu_message_t @var{msg}, int (*@var{_get_uidl}) (mu_message_t, char *, size_t, size_t *), void *@var{owner})
142 @end deftypefun 142 @end deftypefun
143 143
144 @deftypefun int message_get_uid (message_t @var{msg}, size_t *@var{uid}) 144 @deftypefun int mu_message_get_uid (mu_message_t @var{msg}, size_t *@var{uid})
145 @end deftypefun 145 @end deftypefun
146 146
147 @deftypefun int message_set_uid (message_t @var{msg}, int (*@var{_get_uid}) (message_t, size_t *), void *@var{owner}) 147 @deftypefun int mu_message_set_uid (mu_message_t @var{msg}, int (*@var{_get_uid}) (mu_message_t, size_t *), void *@var{owner})
148 @end deftypefun 148 @end deftypefun
149 149
150 @deftypefun int message_create_attachment (const char *@var{content_type}, const char *@var{encoding}, const char *@var{filename}, message_t *@var{newmsg}) 150 @deftypefun int mu_message_create_attachment (const char *@var{content_type}, const char *@var{encoding}, const char *@var{filename}, mu_message_t *@var{newmsg})
151 @end deftypefun 151 @end deftypefun
152 152
153 @deftypefun int message_save_attachment (message_t @var{msg}, const char *@var{filename}, void **@var{data}) 153 @deftypefun int mu_message_save_attachment (mu_message_t @var{msg}, const char *@var{filename}, void **@var{data})
154 @end deftypefun 154 @end deftypefun
155 155
156 @deftypefun int message_encapsulate (message_t @var{msg}, message_t *@var{newmsg}, void **@var{data}) 156 @deftypefun int mu_message_encapsulate (mu_message_t @var{msg}, mu_message_t *@var{newmsg}, void **@var{data})
157 @end deftypefun 157 @end deftypefun
158 158
159 @deftypefun int message_unencapsulate (message_t @var{msg}, message_t *@var{newmsg}, void **@var{data}); 159 @deftypefun int mu_message_unencapsulate (mu_message_t @var{msg}, mu_message_t *@var{newmsg}, void **@var{data});
160 @end deftypefun 160 @end deftypefun
161 161
162 @deftypefun int message_get_attachment_name (message_t @var{msg}, char *@var{name}, size_t @var{bufsize}, size_t *@var{size}); 162 @deftypefun int mu_message_get_attachment_name (mu_message_t @var{msg}, char *@var{name}, size_t @var{bufsize}, size_t *@var{size});
163 @end deftypefun 163 @end deftypefun
164 164
165 @deftypefun int message_aget_attachment_name (message_t @var{msg}, char **@var{name}); 165 @deftypefun int mu_message_aget_attachment_name (mu_message_t @var{msg}, char **@var{name});
166 @end deftypefun 166 @end deftypefun
167 167
168 @deftypefun int message_save_to_mailbox (message_t @var{msg}, ticket_t @var{ticket}, mu_debug_t @var{debug}, const char *@var{toname}); 168 @deftypefun int mu_message_save_to_mailbox (mu_message_t @var{msg}, mu_ticket_t @var{ticket}, mu_debug_t @var{debug}, const char *@var{toname});
169 @end deftypefun 169 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{pop3_} is reserve */} 7 @code{/* Prefix @emph{mu_mime_} is reserved */}
8 @code{#include <mailutils/pop3.h>} 8 @code{#include <mailutils/mime.h>}
9 9
10 @end smallexample 10 @end smallexample
11 11
12 Multipurpose Internet Mail Extensions (MIME). 12 Multipurpose Internet Mail Extensions (MIME).
13 13
14 @deftypefun int mime_create (mime_t *pmime, message_t msg, int flags) 14 @deftypefun int mu_mime_create (mu_mime_t *pmime, mu_message_t msg, int flags)
15 @end deftypefun 15 @end deftypefun
16 16
17 @deftypefun void mime_destroy (mime_t *pmime) 17 @deftypefun void mu_mime_destroy (mu_mime_t *pmime)
18 @end deftypefun 18 @end deftypefun
19 19
20 @deftypefun int mime_is_multipart (mime_t mime) 20 @deftypefun int mu_mime_is_multipart (mu_mime_t mime)
21 @end deftypefun 21 @end deftypefun
22 22
23 @deftypefun int mime_get_num_parts (mime_t mime, size_t *nparts) 23 @deftypefun int mu_mime_get_num_parts (mu_mime_t mime, size_t *nparts)
24 @end deftypefun 24 @end deftypefun
25 25
26 @deftypefun int mime_get_part (mime_t mime, size_t part, message_t *msg) 26 @deftypefun int mu_mime_get_part (mu_mime_t mime, size_t part, mu_message_t *msg)
27 @end deftypefun 27 @end deftypefun
28 28
29 @deftypefun int mime_add_part (mime_t mime, message_t msg) 29 @deftypefun int mu_mime_add_part (mu_mime_t mime, mu_message_t msg)
30 @end deftypefun 30 @end deftypefun
31 31
32 @deftypefun int mime_get_message (mime_t mime, message_t *msg) 32 @deftypefun int mu_mime_get_message (mu_mime_t mime, mu_message_t *msg)
33 @end deftypefun 33 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{nntp_} is reserved */} 7 @code{/* Prefix @emph{mu_nntp_} is reserved */}
8 @code{#include <mailutils/nntp.h>} 8 @code{#include <mailutils/nntp.h>}
9 9
10 @end smallexample 10 @end smallexample
...@@ -15,86 +15,86 @@ Network News Transfer Protocol. Not implemented. ...@@ -15,86 +15,86 @@ Network News Transfer Protocol. Not implemented.
15 15
16 @subsubsection Initialization 16 @subsubsection Initialization
17 @cindex NNTP Initialization 17 @cindex NNTP Initialization
18 @deftypefun int nntp_create (nnpt_t *) 18 @deftypefun int mu_nntp_create (mu_nntp_t *)
19 @end deftypefun 19 @end deftypefun
20 20
21 @deftypefun int nntp_destroy (nnpt_t *) 21 @deftypefun int mu_nntp_destroy (mu_nntp_t *)
22 @end deftypefun 22 @end deftypefun
23 23
24 @deftypefun int nntp_open (nnpt_t) 24 @deftypefun int mu_nntp_open (nnpt_t)
25 @end deftypefun 25 @end deftypefun
26 26
27 @subsubsection Article 27 @subsubsection Article
28 @cindex NNTP Article 28 @cindex NNTP Article
29 @deftypefun int nntp_article (nnpt_t) 29 @deftypefun int mu_nntp_article (nnpt_t)
30 @end deftypefun 30 @end deftypefun
31 31
32 @subsubsection Body 32 @subsubsection Body
33 @cindex NNTP Body 33 @cindex NNTP Body
34 @deftypefun int nntp_body (nntp_t) 34 @deftypefun int mu_nntp_body (mu_nntp_t)
35 @end deftypefun 35 @end deftypefun
36 36
37 @subsubsection Group 37 @subsubsection Group
38 @cindex NNTP Group 38 @cindex NNTP Group
39 @deftypefun int nntp_group (nntp_t) 39 @deftypefun int mu_nntp_group (mu_nntp_t)
40 @end deftypefun 40 @end deftypefun
41 41
42 @subsubsection Head 42 @subsubsection Head
43 @cindex NNTP Head 43 @cindex NNTP Head
44 @deftypefun int nntp_head (nntp_t) 44 @deftypefun int mu_nntp_head (mu_nntp_t)
45 @end deftypefun 45 @end deftypefun
46 46
47 @subsubsection Help 47 @subsubsection Help
48 @cindex NNTP Help 48 @cindex NNTP Help
49 @deftypefun int nntp_help (nntp_t) 49 @deftypefun int mu_nntp_help (mu_nntp_t)
50 @end deftypefun 50 @end deftypefun
51 51
52 @subsubsection IHave 52 @subsubsection IHave
53 @cindex NNTP IHave 53 @cindex NNTP IHave
54 @deftypefun int nntp_ihave (nntp_t) 54 @deftypefun int mu_nntp_ihave (mu_nntp_t)
55 @end deftypefun 55 @end deftypefun
56 56
57 @subsubsection Last 57 @subsubsection Last
58 @cindex NNTP Last 58 @cindex NNTP Last
59 @deftypefun int nntp_last (nntp_t) 59 @deftypefun int mu_nntp_last (mu_nntp_t)
60 @end deftypefun 60 @end deftypefun
61 61
62 @subsubsection List 62 @subsubsection List
63 @cindex NNTP List 63 @cindex NNTP List
64 @deftypefun int nntp_list (nntp_t) 64 @deftypefun int mu_nntp_list (mu_nntp_t)
65 @end deftypefun 65 @end deftypefun
66 66
67 @subsubsection NewGroups 67 @subsubsection NewGroups
68 @cindex NNTP NewGroups 68 @cindex NNTP NewGroups
69 @deftypefun int nntp_newgroups (nntp_t) 69 @deftypefun int mu_nntp_newgroups (mu_nntp_t)
70 @end deftypefun 70 @end deftypefun
71 71
72 @subsubsection NewNews 72 @subsubsection NewNews
73 @cindex NNTP NewNews 73 @cindex NNTP NewNews
74 @deftypefun int nntp_newnews (nntp_t) 74 @deftypefun int mu_nntp_newnews (mu_nntp_t)
75 @end deftypefun 75 @end deftypefun
76 76
77 @subsubsection Next 77 @subsubsection Next
78 @cindex NNTP Next 78 @cindex NNTP Next
79 @deftypefun int nntp_next (nntp_t) 79 @deftypefun int mu_nntp_next (mu_nntp_t)
80 @end deftypefun 80 @end deftypefun
81 81
82 @subsubsection Post 82 @subsubsection Post
83 @cindex NNTP Post 83 @cindex NNTP Post
84 @deftypefun int nntp_post (nntp_t) 84 @deftypefun int mu_nntp_post (mu_nntp_t)
85 @end deftypefun 85 @end deftypefun
86 86
87 @subsubsection Quit 87 @subsubsection Quit
88 @cindex NNTP Quit 88 @cindex NNTP Quit
89 @deftypefun int nntp_quit (nntp_t) 89 @deftypefun int mu_nntp_quit (mu_nntp_t)
90 @end deftypefun 90 @end deftypefun
91 91
92 @subsubsection Slave 92 @subsubsection Slave
93 @cindex NNTP Slave 93 @cindex NNTP Slave
94 @deftypefun int nntp_slave (nntp_t) 94 @deftypefun int mu_nntp_slave (mu_nntp_t)
95 @end deftypefun 95 @end deftypefun
96 96
97 @subsubsection Stat 97 @subsubsection Stat
98 @cindex NNTP Stat 98 @cindex NNTP Stat
99 @deftypefun int nntp_stat (nntp_t) 99 @deftypefun int mu_nntp_stat (mu_nntp_t)
100 @end deftypefun 100 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 3 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 4 @comment *******************************************************************
5 5
6 @smallexample 6 @smallexample
7 @code{/* Prefix @emph{parse822_} is reserved. */} 7 @code{/* Prefix @emph{mu_parse822_} is reserved. */}
8 @code{#include <mailutils/parse822.h>} 8 @code{#include <mailutils/parse822.h>}
9 9
10 @end smallexample 10 @end smallexample
11 11
12 @deftypefun int parse822_is_char (char @var{c}) 12 @deftypefun int mu_parse822_is_char (char @var{c})
13 @end deftypefun 13 @end deftypefun
14 14
15 @deftypefun int parse822_is_digit (char @var{c}) 15 @deftypefun int mu_parse822_is_digit (char @var{c})
16 @end deftypefun 16 @end deftypefun
17 17
18 @deftypefun int parse822_is_ctl (char @var{c}) 18 @deftypefun int mu_parse822_is_ctl (char @var{c})
19 @end deftypefun 19 @end deftypefun
20 20
21 @deftypefun int parse822_is_space (char @var{c}) 21 @deftypefun int mu_parse822_is_space (char @var{c})
22 @end deftypefun 22 @end deftypefun
23 23
24 @deftypefun int parse822_is_htab (char @var{c}) 24 @deftypefun int mu_parse822_is_htab (char @var{c})
25 @end deftypefun 25 @end deftypefun
26 26
27 @deftypefun int parse822_is_lwsp_char (char @var{c}) 27 @deftypefun int mu_parse822_is_lwsp_char (char @var{c})
28 @end deftypefun 28 @end deftypefun
29 29
30 @deftypefun int parse822_is_special (char @var{c}) 30 @deftypefun int mu_parse822_is_special (char @var{c})
31 @end deftypefun 31 @end deftypefun
32 32
33 @deftypefun int parse822_is_atom_char (char @var{c}) 33 @deftypefun int mu_parse822_is_atom_char (char @var{c})
34 @end deftypefun 34 @end deftypefun
35 35
36 @deftypefun int parse822_is_q_text (char @var{c}) 36 @deftypefun int mu_parse822_is_q_text (char @var{c})
37 @end deftypefun 37 @end deftypefun
38 38
39 @deftypefun int parse822_is_d_text (char @var{c}) 39 @deftypefun int mu_parse822_is_d_text (char @var{c})
40 @end deftypefun 40 @end deftypefun
41 41
42 @deftypefun int parse822_is_smtp_q (char @var{c}) 42 @deftypefun int mu_parse822_is_smtp_q (char @var{c})
43 @end deftypefun 43 @end deftypefun
44 44
45 @deftypefun int parse822_skip_crlf (const char **@var{p}, const char *@var{e}) 45 @deftypefun int mu_parse822_skip_crlf (const char **@var{p}, const char *@var{e})
46 @end deftypefun 46 @end deftypefun
47 47
48 @deftypefun int parse822_skip_lwsp_char (const char **@var{p}, const char *@var{e}) 48 @deftypefun int mu_parse822_skip_lwsp_char (const char **@var{p}, const char *@var{e})
49 @end deftypefun 49 @end deftypefun
50 50
51 @deftypefun int parse822_skip_lwsp (const char **@var{p}, const char *@var{e}) 51 @deftypefun int mu_parse822_skip_lwsp (const char **@var{p}, const char *@var{e})
52 @end deftypefun 52 @end deftypefun
53 53
54 @deftypefun int parse822_skip_comments (const char **@var{p}, const char *@var{e}) 54 @deftypefun int mu_parse822_skip_comments (const char **@var{p}, const char *@var{e})
55 @end deftypefun 55 @end deftypefun
56 56
57 @deftypefun int parse822_skip_nl (const char **@var{p}, const char *@var{e}) 57 @deftypefun int mu_parse822_skip_nl (const char **@var{p}, const char *@var{e})
58 @end deftypefun 58 @end deftypefun
59 59
60 @deftypefun int parse822_digits (const char **@var{p}, const char *@var{e}, int @var{min}, int @var{max}, int *@var{digits}) 60 @deftypefun int mu_parse822_digits (const char **@var{p}, const char *@var{e}, int @var{min}, int @var{max}, int *@var{digits})
61 @end deftypefun 61 @end deftypefun
62 62
63 @deftypefun int parse822_special (const char **@var{p}, const char *@var{e}, char @var{c}) 63 @deftypefun int mu_parse822_special (const char **@var{p}, const char *@var{e}, char @var{c})
64 @end deftypefun 64 @end deftypefun
65 65
66 @deftypefun int parse822_comment (const char **@var{p}, const char *@var{e}, char **@var{comment}) 66 @deftypefun int mu_parse822_comment (const char **@var{p}, const char *@var{e}, char **@var{comment})
67 @end deftypefun 67 @end deftypefun
68 68
69 @deftypefun int parse822_atom (const char **@var{p}, const char *@var{e}, char **@var{atom}) 69 @deftypefun int mu_parse822_atom (const char **@var{p}, const char *@var{e}, char **@var{atom})
70 @end deftypefun 70 @end deftypefun
71 71
72 @deftypefun int parse822_quoted_pair (const char **@var{p}, const char *@var{e}, char **@var{qpair}) 72 @deftypefun int mu_parse822_quoted_pair (const char **@var{p}, const char *@var{e}, char **@var{qpair})
73 @end deftypefun 73 @end deftypefun
74 74
75 @deftypefun int parse822_quoted_string (const char **@var{p}, const char *@var{e}, char **@var{qstr}) 75 @deftypefun int mu_parse822_quoted_string (const char **@var{p}, const char *@var{e}, char **@var{qstr})
76 @end deftypefun 76 @end deftypefun
77 77
78 @deftypefun int parse822_word (const char **@var{p}, const char *@var{e}, char **@var{word}) 78 @deftypefun int mu_parse822_word (const char **@var{p}, const char *@var{e}, char **@var{word})
79 @end deftypefun 79 @end deftypefun
80 80
81 @deftypefun int parse822_phrase (const char **@var{p}, const char *@var{e}, char **@var{phrase}) 81 @deftypefun int mu_parse822_phrase (const char **@var{p}, const char *@var{e}, char **@var{phrase})
82 @end deftypefun 82 @end deftypefun
83 83
84 @deftypefun int parse822_d_text (const char **@var{p}, const char *@var{e}, char **@var{dtext}) 84 @deftypefun int mu_parse822_d_text (const char **@var{p}, const char *@var{e}, char **@var{dtext})
85 @end deftypefun 85 @end deftypefun
86 86
87 @c 87 @c
88 @c From RFC 822, 6.1 Address Specification Syntax 88 @c From RFC 822, 6.1 Address Specification Syntax
89 @c 89 @c
90 90
91 @deftypefun int parse822_address_list (address_t *@var{a}, const char *@var{s}) 91 @deftypefun int mu_parse822_address_list (mu_address_t *@var{a}, const char *@var{s})
92 @end deftypefun 92 @end deftypefun
93 93
94 @deftypefun int parse822_mail_box (const char **@var{p}, const char *@var{e}, address_t *@var{a}) 94 @deftypefun int mu_parse822_mail_box (const char **@var{p}, const char *@var{e}, mu_address_t *@var{a})
95 @end deftypefun 95 @end deftypefun
96 96
97 @deftypefun int parse822_group (const char **@var{p}, const char *@var{e}, address_t *@var{a}) 97 @deftypefun int mu_parse822_group (const char **@var{p}, const char *@var{e}, mu_address_t *@var{a})
98 @end deftypefun 98 @end deftypefun
99 99
100 @deftypefun int parse822_address (const char **@var{p}, const char *@var{e}, address_t *@var{a}) 100 @deftypefun int mu_parse822_address (const char **@var{p}, const char *@var{e}, mu_address_t *@var{a})
101 @end deftypefun 101 @end deftypefun
102 102
103 @deftypefun int parse822_route_addr (const char **@var{p}, const char *@var{e}, address_t *@var{a}) 103 @deftypefun int mu_parse822_route_addr (const char **@var{p}, const char *@var{e}, mu_address_t *@var{a})
104 @end deftypefun 104 @end deftypefun
105 105
106 @deftypefun int parse822_route (const char **@var{p}, const char *@var{e}, char **@var{route}) 106 @deftypefun int mu_parse822_route (const char **@var{p}, const char *@var{e}, char **@var{route})
107 @end deftypefun 107 @end deftypefun
108 108
109 @deftypefun int parse822_addr_spec (const char **@var{p}, const char *@var{e}, address_t *@var{a}) 109 @deftypefun int mu_parse822_addr_spec (const char **@var{p}, const char *@var{e}, mu_address_t *@var{a})
110 @end deftypefun 110 @end deftypefun
111 111
112 @deftypefun int parse822_unix_mbox (const char **@var{p}, const char *@var{e}, address_t *@var{a}) 112 @deftypefun int mu_parse822_unix_mbox (const char **@var{p}, const char *@var{e}, mu_address_t *@var{a})
113 @end deftypefun 113 @end deftypefun
114 114
115 @deftypefun int parse822_local_part (const char **@var{p}, const char *@var{e}, char **@var{local_part}) 115 @deftypefun int mu_parse822_local_part (const char **@var{p}, const char *@var{e}, char **@var{local_part})
116 @end deftypefun 116 @end deftypefun
117 117
118 @deftypefun int parse822_domain (const char **@var{p}, const char *@var{e}, char **@var{domain}) 118 @deftypefun int mu_parse822_domain (const char **@var{p}, const char *@var{e}, char **@var{domain})
119 @end deftypefun 119 @end deftypefun
120 120
121 @deftypefun int parse822_sub_domain (const char **@var{p}, const char *@var{e}, char **@var{sub_domain}) 121 @deftypefun int mu_parse822_sub_domain (const char **@var{p}, const char *@var{e}, char **@var{sub_domain})
122 @end deftypefun 122 @end deftypefun
123 123
124 @deftypefun int parse822_domain_ref (const char **@var{p}, const char *@var{e}, char **@var{domain_ref}) 124 @deftypefun int mu_parse822_domain_ref (const char **@var{p}, const char *@var{e}, char **@var{domain_ref})
125 @end deftypefun 125 @end deftypefun
126 126
127 @deftypefun int parse822_domain_literal (const char **@var{p}, const char *@var{e}, char **@var{domain_literal}) 127 @deftypefun int mu_parse822_domain_literal (const char **@var{p}, const char *@var{e}, char **@var{domain_literal})
128 @end deftypefun 128 @end deftypefun
129 129
130 @c 130 @c
131 @c RFC 822 Quoting Functions 131 @c RFC 822 Quoting Functions
132 @c 132 @c
133 133
134 @deftypefun int parse822_quote_string (char **@var{quoted}, const char *@var{raw}) 134 @deftypefun int mu_parse822_quote_string (char **@var{quoted}, const char *@var{raw})
135 @end deftypefun 135 @end deftypefun
136 136
137 @deftypefun int parse822_quote_local_part (char **@var{quoted}, const char *@var{raw}) 137 @deftypefun int mu_parse822_quote_local_part (char **@var{quoted}, const char *@var{raw})
138 @end deftypefun 138 @end deftypefun
139 139
140 @deftypefun int parse822_field_body (const char **@var{p}, const char *@var{e}, char **@var{fieldbody}) 140 @deftypefun int mu_parse822_field_body (const char **@var{p}, const char *@var{e}, char **@var{fieldbody})
141 @end deftypefun 141 @end deftypefun
142 142
143 @deftypefun int parse822_field_name (const char **@var{p}, const char *@var{e}, char **@var{fieldname}) 143 @deftypefun int mu_parse822_field_name (const char **@var{p}, const char *@var{e}, char **@var{fieldname})
144 @end deftypefun 144 @end deftypefun
145 145
146 @c 146 @c
147 @c From RFC 822, 5.1 Date and Time Specification Syntax 147 @c From RFC 822, 5.1 Date and Time Specification Syntax
148 @c 148 @c
149 149
150 @deftypefun int parse822_day (const char **@var{p}, const char *@var{e}, int *@var{day}) 150 @deftypefun int mu_parse822_day (const char **@var{p}, const char *@var{e}, int *@var{day})
151 @end deftypefun 151 @end deftypefun
152 152
153 @deftypefun int parse822_date (const char **@var{p}, const char *@var{e}, int *@var{day}, int *@var{mon}, int *@var{year}) 153 @deftypefun int mu_parse822_date (const char **@var{p}, const char *@var{e}, int *@var{day}, int *@var{mon}, int *@var{year})
154 @end deftypefun 154 @end deftypefun
155 155
156 @deftypefun int parse822_time (const char **@var{p}, const char *@var{e}, int *@var{h}, int *@var{m}, int *@var{s}, int *@var{tz}, const char **@var{tz_name}) 156 @deftypefun int mu_parse822_time (const char **@var{p}, const char *@var{e}, int *@var{h}, int *@var{m}, int *@var{s}, int *@var{tz}, const char **@var{tz_name})
157 @end deftypefun 157 @end deftypefun
158 158
159 @deftypefun int parse822_date_time (const char **@var{p}, const char *@var{e}, struct tm *@var{tm}, mu_timezone *@var{tz}) 159 @deftypefun int mu_parse822_date_time (const char **@var{p}, const char *@var{e}, struct tm *@var{tm}, mu_timezone *@var{tz})
160 @end deftypefun 160 @end deftypefun
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
4 @finalout 4 @finalout
5 5
6 @comment This is part of the GNU Mailutils manual. 6 @comment This is part of the GNU Mailutils manual.
7 @comment Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 7 @comment Copyright (C) 1999,2000,2001,2002,2003,2004,2006
8 @comment Free Software Foundation, Inc.
8 @comment See file mailutils.texi for copying conditions. 9 @comment See file mailutils.texi for copying conditions.
9 @comment ******************************************************************* 10 @comment *******************************************************************
10 11
...@@ -80,7 +81,7 @@ default timeout to be ten minutes, many servers have shorter idle period, care s ...@@ -80,7 +81,7 @@ default timeout to be ten minutes, many servers have shorter idle period, care s
80 @code{mu_pop3_connect()}, two built-ins authentications are provided @code{mu_pop3_apop ()} or 81 @code{mu_pop3_connect()}, two built-ins authentications are provided @code{mu_pop3_apop ()} or
81 @code{mu_pop3_user()}/@code{mu_pop3_pass()}. The @code{mu_pop3_stat()} and @code{mu_pop3_list ()} functions can be use to 82 @code{mu_pop3_user()}/@code{mu_pop3_pass()}. The @code{mu_pop3_stat()} and @code{mu_pop3_list ()} functions can be use to
82 get the number and size of messages. The functions @code{mu_pop3_list_all()}, @code{mu_pop3_uidl_all ()} and 83 get the number and size of messages. The functions @code{mu_pop3_list_all()}, @code{mu_pop3_uidl_all ()} and
83 @code{mu_pop3_capa()} save the information in an @code{iterator_t}. Downloading of messages is done 84 @code{mu_pop3_capa()} save the information in an @code{mu_iterator_t}. Downloading of messages is done
84 via a two methods @code{mu_pop3_retr()} or @code{mu_pop3_top()}; 85 via a two methods @code{mu_pop3_retr()} or @code{mu_pop3_top()};
85 @strong{Caution: Some Internet Service Providers do not permit to leave mail on server and the message will be 86 @strong{Caution: Some Internet Service Providers do not permit to leave mail on server and the message will be
86 deleted once downloaded}. 87 deleted once downloaded}.
...@@ -174,7 +175,7 @@ Errors: ...@@ -174,7 +175,7 @@ Errors:
174 175
175 @cindex POP3 carrier 176 @cindex POP3 carrier
176 177
177 @deftypefun int mu_pop3_set_carrier (mu_pop3_t @var{pop3}, stream_t @var{carrier}) 178 @deftypefun int mu_pop3_set_carrier (mu_pop3_t @var{pop3}, mu_stream_t @var{carrier})
178 179
179 Set the stream to be use as the carrier to the server , for example tcp_stream. 180 Set the stream to be use as the carrier to the server , for example tcp_stream.
180 181
...@@ -225,7 +226,7 @@ Errors: ...@@ -225,7 +226,7 @@ Errors:
225 226
226 @cindex POP3 CAPA 227 @cindex POP3 CAPA
227 228
228 @deftypefun int mu_pop3_capa (mu_pop3_t @var{pop3}, iterator_t *@var{iterator}) 229 @deftypefun int mu_pop3_capa (mu_pop3_t @var{pop3}, mu_iterator_t *@var{iterator})
229 230
230 The CAPA command is send to the server and the list of capabilities is retrieve by going through 231 The CAPA command is send to the server and the list of capabilities is retrieve by going through
231 the iterator, when done the user should call @code{iterator_destroy()}. 232 the iterator, when done the user should call @code{iterator_destroy()}.
...@@ -287,7 +288,7 @@ Errors: ...@@ -287,7 +288,7 @@ Errors:
287 288
288 @cindex POP3 RETR 289 @cindex POP3 RETR
289 290
290 @deftypefun int mu_pop3_retr (mu_pop3_t @var{pop3}, unsigned @var{msgno}, stream_t *@var{stream}) 291 @deftypefun int mu_pop3_retr (mu_pop3_t @var{pop3}, unsigned @var{msgno}, mu_stream_t *@var{stream})
291 292
292 If successful @code{stream} should be call to download the message, byte-stuff lines or handle internally, CRLFs are 293 If successful @code{stream} should be call to download the message, byte-stuff lines or handle internally, CRLFs are
293 converted to LF. All other operations will fail until the downloaded is complete by the caller. 294 converted to LF. All other operations will fail until the downloaded is complete by the caller.
...@@ -308,13 +309,15 @@ Errors: ...@@ -308,13 +309,15 @@ Errors:
308 int 309 int
309 print_message (mu_pop3_t pop3, unsigned int msgno) 310 print_message (mu_pop3_t pop3, unsigned int msgno)
310 @{ 311 @{
311 stream_t stream; 312 mu_stream_t stream;
312 int status = mu_pop3_retr (pop3, msgno, &stream); 313 int status = mu_pop3_retr (pop3, msgno, &stream);
313 if (status == 0) 314 if (status == 0)
314 @{ 315 @{
315 size_t n = 0; 316 size_t n = 0;
316 char buf[128]; 317 char buf[128];
317 while ((status = stream_readline (stream, buf, sizeof buf, &n)) == 0) && n > 0) 318 while ((status = mu_stream_readline (stream,
319 buf, sizeof buf, &n)) == 0)
320 && n > 0)
318 @{ 321 @{
319 printf ("%s", buf); 322 printf ("%s", buf);
320 @} 323 @}
...@@ -325,7 +328,7 @@ print_message (mu_pop3_t pop3, unsigned int msgno) ...@@ -325,7 +328,7 @@ print_message (mu_pop3_t pop3, unsigned int msgno)
325 328
326 @cindex POP3 TOP 329 @cindex POP3 TOP
327 330
328 @deftypefun int mu_pop3_top (mu_pop3_t @var{pop3}, unsigned int @var{msgno}, unsigned int @var{lines}, stream_t *@var{stream}) 331 @deftypefun int mu_pop3_top (mu_pop3_t @var{pop3}, unsigned int @var{msgno}, unsigned int @var{lines}, mu_stream_t *@var{stream})
329 332
330 If successful @code{stream} should be call to download the header, byte-stuff lines or handle internally, CRLFs are 333 If successful @code{stream} should be call to download the header, byte-stuff lines or handle internally, CRLFs are
331 converted to LF. All other operations will failed until the operation is completed by the caller. 334 converted to LF. All other operations will failed until the operation is completed by the caller.
...@@ -345,13 +348,15 @@ Errors: ...@@ -345,13 +348,15 @@ Errors:
345 int 348 int
346 print_top (mu_pop3_t pop3, unsigned int msgno, unsigned int lines) 349 print_top (mu_pop3_t pop3, unsigned int msgno, unsigned int lines)
347 @{ 350 @{
348 stream_t stream; 351 mu_stream_t stream;
349 int status = mu_pop3_top (pop3, msgno, lines, &stream); 352 int status = mu_pop3_top (pop3, msgno, lines, &stream);
350 if (status == 0) 353 if (status == 0)
351 @{ 354 @{
352 size_t n = 0; 355 size_t n = 0;
353 char buf[128]; 356 char buf[128];
354 while ((status = stream_readline (stream, buf, sizeof buf, &n)) == 0) && n > 0) 357 while ((status = mu_stream_readline (stream, buf,
358 sizeof buf, &n)) == 0)
359 && n > 0)
355 printf ("%s", buf); 360 printf ("%s", buf);
356 @} 361 @}
357 return status; 362 return status;
...@@ -403,7 +408,7 @@ Errors: ...@@ -403,7 +408,7 @@ Errors:
403 @end table 408 @end table
404 @end deftypefun 409 @end deftypefun
405 410
406 @deftypefun int mu_pop3_uidl_all (mu_pop3_t @var{pop3}, iterator_t *@var{iterator}) 411 @deftypefun int mu_pop3_uidl_all (mu_pop3_t @var{pop3}, mu_iterator_t *@var{iterator})
407 412
408 A UIDL command is executed. The call should iterate through the @code{iterator} to fetch the response. 413 A UIDL command is executed. The call should iterate through the @code{iterator} to fetch the response.
409 414
...@@ -422,22 +427,24 @@ Errors: ...@@ -422,22 +427,24 @@ Errors:
422 427
423 void print_uidl (mu_pop3_t pop3) 428 void print_uidl (mu_pop3_t pop3)
424 @{ 429 @{
425 iterator_t itr; 430 mu_iterator_t itr;
426 status = mu_pop3_uidl_all (pop3, &itr); 431 status = mu_pop3_uidl_all (pop3, &itr);
427 if (status == 0) 432 if (status == 0)
428 @{ 433 @{
429 int rc; 434 int rc;
430 435
431 for (iterator_first (itr); !iterator_is_done (itr); iterator_next (itr)) 436 for (mu_iterator_first (itr);
437 !mu_iterator_is_done (itr);
438 mu_iterator_next (itr))
432 @{ 439 @{
433 char *text; 440 char *text;
434 441
435 rc = iterator_current (itr, (void**) &text); 442 rc = mu_iterator_current (itr, (void**) &text);
436 if (rc) 443 if (rc)
437 lperror ("iterator_current", rc); 444 lperror ("iterator_current", rc);
438 printf ("%s\n", text); 445 printf ("%s\n", text);
439 @} 446 @}
440 iterator_destroy (&itr); 447 mu_iterator_destroy (&itr);
441 @} 448 @}
442 449
443 @} 450 @}
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006
3 @c Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 4 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 5 @comment *******************************************************************
5 6
6 @smallexample 7 @smallexample
7 @code{/* Prefix @emph{smtp_} is reserved */} 8 @code{/* Prefix @emph{mu_smtp_} is reserved */}
8 @code{#include <mailutils/smtp.h>} 9 @code{#include <mailutils/smtp.h>}
9 10
10 @end smallexample 11 @end smallexample
...@@ -12,86 +13,86 @@ ...@@ -12,86 +13,86 @@
12 Simple Mail Transfer Protocol. Not implemented. 13 Simple Mail Transfer Protocol. Not implemented.
13 14
14 @subsection Commands 15 @subsection Commands
15 @cindex smtp_t 16 @cindex mu_smtp_t
16 17
17 @subsubsection Initialization 18 @subsubsection Initialization
18 @cindex SMTP Initialization 19 @cindex SMTP Initialization
19 @deftypefun int smtp_create (smtp_t *) 20 @deftypefun int mu_smtp_create (mu_smtp_t *)
20 @end deftypefun 21 @end deftypefun
21 22
22 @deftypefun void smtp_destroy (smtp_t *) 23 @deftypefun void mu_smtp_destroy (mu_smtp_t *)
23 @end deftypefun 24 @end deftypefun
24 25
25 @deftypefun int smtp_open (smtp_t, const char *@var{host}, unsigned int @var{port}, int @var{flags}) 26 @deftypefun int mu_smtp_open (mu_smtp_t, const char *@var{host}, unsigned int @var{port}, int @var{flags})
26 @end deftypefun 27 @end deftypefun
27 28
28 29
29 @subsubsection Data 30 @subsubsection Data
30 @cindex SMTP Data 31 @cindex SMTP Data
31 @deftypefun int smtp_data (smtp_t, stream_t @var{stream}) 32 @deftypefun int mu_smtp_data (mu_smtp_t, stream_t @var{stream})
32 @end deftypefun 33 @end deftypefun
33 34
34 @subsubsection Helo 35 @subsubsection Helo
35 @cindex SMTP Helo 36 @cindex SMTP Helo
36 @deftypefun int smtp_helo (smtp_t, const char *@var{domain}) 37 @deftypefun int mu_smtp_helo (mu_smtp_t, const char *@var{domain})
37 @end deftypefun 38 @end deftypefun
38 39
39 @deftypefun int smtp_ehlo (smtp_t, const char *@var{domain}) 40 @deftypefun int mu_smtp_ehlo (mu_smtp_t, const char *@var{domain})
40 @end deftypefun 41 @end deftypefun
41 42
42 @subsubsection Expn 43 @subsubsection Expn
43 @cindex SMTP Expn 44 @cindex SMTP Expn
44 @deftypefun int smtp_expn (smtp_t, const char *@var{list}, iterator_t *) 45 @deftypefun int mu_smtp_expn (mu_smtp_t, const char *@var{list}, iterator_t *)
45 @end deftypefun 46 @end deftypefun
46 47
47 @subsubsection Help 48 @subsubsection Help
48 @cindex SMTP Help 49 @cindex SMTP Help
49 @deftypefun int smtp_help (smtp_t, const char *@var{help}, iterator_t *) 50 @deftypefun int mu_smtp_help (mu_smtp_t, const char *@var{help}, iterator_t *)
50 @end deftypefun 51 @end deftypefun
51 52
52 @subsubsection Mail From 53 @subsubsection Mail From
53 @cindex SMTP Mail From 54 @cindex SMTP Mail From
54 @deftypefun int smtp_mail_from (smtp_t, const char *@var{address}, const char *@var{param}) 55 @deftypefun int mu_smtp_mail_from (mu_smtp_t, const char *@var{address}, const char *@var{param})
55 @end deftypefun 56 @end deftypefun
56 57
57 @subsubsection Noop 58 @subsubsection Noop
58 @cindex SMTP Noop 59 @cindex SMTP Noop
59 @deftypefun int smtp_noop (smtp_t) 60 @deftypefun int mu_smtp_noop (mu_smtp_t)
60 @end deftypefun 61 @end deftypefun
61 62
62 @subsubsection Quit 63 @subsubsection Quit
63 @cindex SMTP Quit 64 @cindex SMTP Quit
64 @deftypefun int smtp_quit (smtp_t) 65 @deftypefun int mu_smtp_quit (mu_smtp_t)
65 @end deftypefun 66 @end deftypefun
66 67
67 @subsubsection Recpt To 68 @subsubsection Recpt To
68 @cindex SMTP Recpt To 69 @cindex SMTP Recpt To
69 @deftypefun int smtp_rcpt_to (smtp_t, const char *@var{address}, const char *@var{param}) 70 @deftypefun int mu_smtp_rcpt_to (mu_smtp_t, const char *@var{address}, const char *@var{param})
70 @end deftypefun 71 @end deftypefun
71 72
72 @subsubsection Reset 73 @subsubsection Reset
73 @cindex SMTP Reset 74 @cindex SMTP Reset
74 @deftypefun int smtp_reset (smtp_t) 75 @deftypefun int mu_smtp_reset (mu_smtp_t)
75 @end deftypefun 76 @end deftypefun
76 77
77 @subsubsection Verify 78 @subsubsection Verify
78 @cindex SMTP Verify 79 @cindex SMTP Verify
79 @deftypefun int smtp_verify (smtp_t, const char *@var{user}) 80 @deftypefun int mu_smtp_verify (mu_smtp_t, const char *@var{user})
80 @end deftypefun 81 @end deftypefun
81 82
82 @subsubsection Help functions 83 @subsubsection Help functions
83 @cindex SMTP Help functions 84 @cindex SMTP Help functions
84 @deftypefun extern int smtp_readline (smtp_t, char *@var{buffer}, size_t @var{len}, size_t *@var{len}) 85 @deftypefun extern int mu_smtp_readline (mu_smtp_t, char *@var{buffer}, size_t @var{len}, size_t *@var{len})
85 @end deftypefun 86 @end deftypefun
86 87
87 @deftypefun extern int smtp_response (smtp_t, char *@var{buffer}, size_t @var{len}, size_t *@var{len}) 88 @deftypefun extern int mu_smtp_response (mu_smtp_t, char *@var{buffer}, size_t @var{len}, size_t *@var{len})
88 @end deftypefun 89 @end deftypefun
89 90
90 @deftypefun extern int smtp_writeline (smtp_t, const char *@var{format}, @var{...}) 91 @deftypefun extern int mu_smtp_writeline (mu_smtp_t, const char *@var{format}, @var{...})
91 @end deftypefun 92 @end deftypefun
92 93
93 @deftypefun extern int smtp_sendline (smtp_t, const char *@var{line}) 94 @deftypefun extern int mu_smtp_sendline (mu_smtp_t, const char *@var{line})
94 @end deftypefun 95 @end deftypefun
95 96
96 @deftypefun extern int smtp_send (smtp_t 97 @deftypefun extern int mu_smtp_send (mu_smtp_t)
97 @end deftypefun 98 @end deftypefun
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006
3 @c Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 4 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 5 @comment *******************************************************************
5 6
...@@ -44,163 +45,163 @@ Stream doesn't close it's underlying resource when it is closed or destroyed. ...@@ -44,163 +45,163 @@ Stream doesn't close it's underlying resource when it is closed or destroyed.
44 45
45 @end table 46 @end table
46 47
47 @deftypefun int file_stream_create (stream_t *@var{stream}, const char *@var{filename}, int @var{flags}) 48 @deftypefun int mu_file_stream_create (mu_stream_t *@var{stream}, const char *@var{filename}, int @var{flags})
48 @end deftypefun 49 @end deftypefun
49 50
50 @deftypefun int tcp_stream_create (stream_t *@var{stream}, const char *@var{host}, int @var{port}, int @var{flags}) 51 @deftypefun int mu_tcp_stream_create (mu_stream_t *@var{stream}, const char *@var{host}, int @var{port}, int @var{flags})
51 @end deftypefun 52 @end deftypefun
52 53
53 @deftypefun int mapfile_stream_create (stream_t *@var{stream}, const char *@var{filename}, int @var{flags}) 54 @deftypefun int mu_mapfile_stream_create (mu_stream_t *@var{stream}, const char *@var{filename}, int @var{flags})
54 @end deftypefun 55 @end deftypefun
55 56
56 @deftypefun int memory_stream_create (stream_t *@var{stream}, const char *@var{filename}, int @var{flags}) 57 @deftypefun int mu_memory_stream_create (mu_stream_t *@var{stream}, const char *@var{filename}, int @var{flags})
57 @end deftypefun 58 @end deftypefun
58 59
59 @deftypefun int encoder_stream_create (stream_t *@var{stream}, stream_t @var{iostream}, const char *@var{encoding}) 60 @deftypefun int mu_encoder_stream_create (mu_stream_t *@var{stream}, mu_stream_t @var{iostream}, const char *@var{encoding})
60 @end deftypefun 61 @end deftypefun
61 62
62 @deftypefun int decoder_stream_create (stream_t *@var{stream}, stream_t @var{iostream}, const char *@var{encoding}) 63 @deftypefun int mu_decoder_stream_create (mu_stream_t *@var{stream}, mu_stream_t @var{iostream}, const char *@var{encoding})
63 @end deftypefun 64 @end deftypefun
64 65
65 @deftypefun int stdio_stream_create (stream_t *@var{stream}, FILE *@var{stdio}, int @var{flags}) 66 @deftypefun int mu_stdio_stream_create (mu_stream_t *@var{stream}, FILE *@var{stdio}, int @var{flags})
66 If @code{MU_STREAM_NO_CLOSE} is specified, @code{fclose()} will not be called on 67 If @code{MU_STREAM_NO_CLOSE} is specified, @code{fclose()} will not be called on
67 @var{stdio} when the stream is closed. 68 @var{stdio} when the stream is closed.
68 @end deftypefun 69 @end deftypefun
69 70
70 @deftypefun int prog_stream_create (stream_t *@var{stream}, const char *@var{progname}, int @var{flags}) 71 @deftypefun int mu_prog_stream_create (mu_stream_t *@var{stream}, const char *@var{progname}, int @var{flags})
71 @end deftypefun 72 @end deftypefun
72 73
73 @deftypefun int filter_prog_stream_create (stream_t *@var{stream}, const char *@var{progname}, stream_t @var{input}) 74 @deftypefun int mu_filter_prog_stream_create (mu_stream_t *@var{stream}, const char *@var{progname}, mu_stream_t @var{input})
74 @end deftypefun 75 @end deftypefun
75 76
76 @deftypefun void stream_destroy (stream_t *@var{stream}, void *@var{owner}) 77 @deftypefun void mu_stream_destroy (mu_stream_t *@var{stream}, void *@var{owner})
77 @end deftypefun 78 @end deftypefun
78 79
79 @c 80 @c
80 @c --------- 81 @c ---------
81 @c 82 @c
82 83
83 @deftypefun int stream_open (stream_t @var{stream}) 84 @deftypefun int mu_stream_open (mu_stream_t @var{stream})
84 @end deftypefun 85 @end deftypefun
85 86
86 @deftypefun int stream_close (stream_t @var{stream}) 87 @deftypefun int mu_stream_close (mu_stream_t @var{stream})
87 @end deftypefun 88 @end deftypefun
88 89
89 @deftypefun int stream_is_seekable (stream_t @var{stream}) 90 @deftypefun int mu_stream_is_seekable (mu_stream_t @var{stream})
90 @end deftypefun 91 @end deftypefun
91 92
92 @deftypefun int stream_get_fd (stream_t @var{stream}, int *@var{fd}) 93 @deftypefun int mu_stream_get_fd (mu_stream_t @var{stream}, int *@var{fd})
93 @end deftypefun 94 @end deftypefun
94 95
95 @deftypefun int stream_get_fd2 (stream_t @var{stream}, int *@var{fd1}, int *@var{fd2}) 96 @deftypefun int mu_stream_get_fd2 (mu_stream_t @var{stream}, int *@var{fd1}, int *@var{fd2})
96 @end deftypefun 97 @end deftypefun
97 98
98 @deftypefun int stream_read (stream_t @var{stream}, char *@var{buffer}, size_t @var{buflen}, off_t @var{offset}, size_t *@var{writen}) 99 @deftypefun int mu_stream_read (mu_stream_t @var{stream}, char *@var{buffer}, size_t @var{buflen}, mu_off_t @var{offset}, size_t *@var{writen})
99 @end deftypefun 100 @end deftypefun
100 101
101 @deftypefun int stream_readline (stream_t @var{stream}, char *@var{buffer}, size_t @var{buflen}, off_t @var{offset}, size_t *@var{writen}) 102 @deftypefun int mu_stream_readline (mu_stream_t @var{stream}, char *@var{buffer}, size_t @var{buflen}, mu_off_t @var{offset}, size_t *@var{writen})
102 @end deftypefun 103 @end deftypefun
103 104
104 @deftypefun int stream_size (stream_t @var{stream}, off_t *@var{size}) 105 @deftypefun int mu_stream_size (mu_stream_t @var{stream}, mu_off_t *@var{size})
105 @end deftypefun 106 @end deftypefun
106 107
107 @deftypefun n int stream_truncate (stream_t @var{stream}, off_t @var{size}) 108 @deftypefun n int mu_stream_truncate (mu_stream_t @var{stream}, mu_off_t @var{size})
108 @end deftypefun 109 @end deftypefun
109 110
110 @deftypefun int stream_write (stream_t @var{stream}, const char *@var{buffer}, size_t @var{buflen}, off_t @var{offset}, size_t *@var{writen}) 111 @deftypefun int mu_stream_write (mu_stream_t @var{stream}, const char *@var{buffer}, size_t @var{buflen}, mu_off_t @var{offset}, size_t *@var{writen})
111 @end deftypefun 112 @end deftypefun
112 113
113 @deftypefun int stream_setbufsiz (stream_t @var{stream}, size_t @var{size}) 114 @deftypefun int mu_stream_setbufsiz (mu_stream_t @var{stream}, size_t @var{size})
114 @end deftypefun 115 @end deftypefun
115 116
116 @deftypefun int stream_flush (stream_t @var{stream}) 117 @deftypefun int mu_stream_flush (mu_stream_t @var{stream})
117 @end deftypefun 118 @end deftypefun
118 119
119 @c 120 @c
120 @c These functions will typically only be useful to implementors of streams. 121 @c These functions will typically only be useful to implementors of streams.
121 @c 122 @c
122 123
123 @deftypefun int stream_create (stream_t *@var{stream}, int @var{flags}, void *@var{owner}) 124 @deftypefun int mu_stream_create (mu_stream_t *@var{stream}, int @var{flags}, void *@var{owner})
124 Used to implement a new kind of stream. 125 Used to implement a new kind of stream.
125 @end deftypefun 126 @end deftypefun
126 127
127 @deftypefun void* stream_get_owner (stream_t @var{stream}) 128 @deftypefun void* mu_stream_get_owner (mu_stream_t @var{stream})
128 @end deftypefun 129 @end deftypefun
129 130
130 @deftypefun void stream_set_owner (stream_t @var{stream}, void *@var{owner}) 131 @deftypefun void mu_stream_set_owner (mu_stream_t @var{stream}, void *@var{owner})
131 @end deftypefun 132 @end deftypefun
132 133
133 @deftypefun int stream_get_flags (stream_t @var{stream}, int *@var{flags}) 134 @deftypefun int mu_stream_get_flags (mu_stream_t @var{stream}, int *@var{flags})
134 @end deftypefun 135 @end deftypefun
135 136
136 @deftypefun int stream_set_flags (stream_t @var{stream}, int @var{flags}) 137 @deftypefun int mu_stream_set_flags (mu_stream_t @var{stream}, int @var{flags})
137 @end deftypefun 138 @end deftypefun
138 139
139 @deftypefun int stream_get_property (stream_t @var{stream}, property_t *) 140 @deftypefun int mu_stream_get_property (mu_stream_t @var{stream}, property_t *)
140 @end deftypefun 141 @end deftypefun
141 142
142 @deftypefun int stream_set_property (stream_t @var{stream}, property_t, void *) 143 @deftypefun int mu_stream_set_property (mu_stream_t @var{stream}, property_t, void *)
143 @end deftypefun 144 @end deftypefun
144 145
145 @deftypefun int stream_get_state (stream_t @var{stream}, int *@var{state}) 146 @deftypefun int mu_stream_get_state (mu_stream_t @var{stream}, int *@var{state})
146 @table @code 147 @table @code
147 @item MU_STREAM_STATE_OPEN 148 @item MU_STREAM_STATE_OPEN
148 Last action was @code{stream_open}. 149 Last action was @code{mu_stream_open}.
149 @item MU_STREAM_STATE_READ 150 @item MU_STREAM_STATE_READ
150 Last action was @code{stream_read} or @code{stream_readline}. 151 Last action was @code{mu_stream_read} or @code{mu_stream_readline}.
151 @item MU_STREAM_STATE_WRITE 152 @item MU_STREAM_STATE_WRITE
152 Last action was @code{stream_write}. 153 Last action was @code{mu_stream_write}.
153 @item MU_STREAM_STATE_CLOSE 154 @item MU_STREAM_STATE_CLOSE
154 Last action was @code{stream_close}. 155 Last action was @code{mu_stream_close}.
155 @end table 156 @end table
156 @end deftypefun 157 @end deftypefun
157 158
158 @deftypefun int stream_set_destroy (stream_t @var{stream}, void (*@var{_destroy}) (stream_t), void *@var{owner}) 159 @deftypefun int mu_stream_set_destroy (mu_stream_t @var{stream}, void (*@var{_destroy}) (mu_stream_t), void *@var{owner})
159 @end deftypefun 160 @end deftypefun
160 161
161 @deftypefun int stream_set_open (stream_t @var{stream}, int (*@var{_open}) (stream_t), void *@var{owner}) 162 @deftypefun int mu_stream_set_open (mu_stream_t @var{stream}, int (*@var{_open}) (mu_stream_t), void *@var{owner})
162 @end deftypefun 163 @end deftypefun
163 164
164 @deftypefun int stream_set_close (stream_t @var{stream}, int (*@var{_close}) (stream_t), void *@var{owner}) 165 @deftypefun int mu_stream_set_close (mu_stream_t @var{stream}, int (*@var{_close}) (mu_stream_t), void *@var{owner})
165 @end deftypefun 166 @end deftypefun
166 167
167 @deftypefun int stream_set_fd (stream_t @var{stream}, int (*@var{_get_fd}) (stream_t, int *, int *), void *@var{owner}) 168 @deftypefun int mu_stream_set_fd (mu_stream_t @var{stream}, int (*@var{_get_fd}) (mu_stream_t, int *, int *), void *@var{owner})
168 @end deftypefun 169 @end deftypefun
169 170
170 @deftypefun int stream_set_read (stream_t @var{stream}, int (*@var{_read}) (stream_t, char *, size_t, off_t, size_t *), void *@var{owner}) 171 @deftypefun int mu_stream_set_read (mu_stream_t @var{stream}, int (*@var{_read}) (mu_stream_t, char *, size_t, mu_off_t, size_t *), void *@var{owner})
171 @end deftypefun 172 @end deftypefun
172 173
173 @deftypefun int stream_set_readline (stream_t @var{stream}, int (*@var{_readline}) (stream_t, char *, size_t, off_t, size_t *), void *@var{owner}) 174 @deftypefun int mu_stream_set_readline (mu_stream_t @var{stream}, int (*@var{_readline}) (mu_stream_t, char *, size_t, mu_off_t, size_t *), void *@var{owner})
174 @end deftypefun 175 @end deftypefun
175 176
176 @deftypefun int stream_set_size (stream_t @var{stream}, int (*@var{_size}) (stream_t, off_t *), void *@var{owner}) 177 @deftypefun int mu_stream_set_size (mu_stream_t @var{stream}, int (*@var{_size}) (mu_stream_t, mu_off_t *), void *@var{owner})
177 @end deftypefun 178 @end deftypefun
178 179
179 @deftypefun int stream_set_truncate (stream_t @var{stream}, int (*@var{_truncate}) (stream_t, off_t), void *@var{owner}) 180 @deftypefun int mu_stream_set_truncate (mu_stream_t @var{stream}, int (*@var{_truncate}) (mu_stream_t, mu_off_t), void *@var{owner})
180 @end deftypefun 181 @end deftypefun
181 182
182 @deftypefun int stream_set_write (stream_t @var{stream}, int (*@var{_write}) (stream_t, const char *, size_t, off_t, size_t *), void *@var{owner}) 183 @deftypefun int mu_stream_set_write (mu_stream_t @var{stream}, int (*@var{_write}) (mu_stream_t, const char *, size_t, mu_off_t, size_t *), void *@var{owner})
183 @end deftypefun 184 @end deftypefun
184 185
185 @deftypefun int stream_set_flush (stream_t @var{stream}, int (*@var{_flush}) (stream_t), void *@var{owner}) 186 @deftypefun int mu_stream_set_flush (mu_stream_t @var{stream}, int (*@var{_flush}) (mu_stream_t), void *@var{owner})
186 @end deftypefun 187 @end deftypefun
187 188
188 @deftypefun int stream_set_strerror (stream_t @var{stream}, int (*@var{_fp}) (stream_t, char **), void *@var{owner}) 189 @deftypefun int mu_stream_set_strerror (mu_stream_t @var{stream}, int (*@var{_fp}) (mu_stream_t, char **), void *@var{owner})
189 @end deftypefun 190 @end deftypefun
190 191
191 @deftypefun int stream_sequential_readline (stream_ts @var{stream}, char *@var{buf}, size_t @var{size}, size_t *@var{nbytes}) 192 @deftypefun int mu_stream_sequential_readline (mu_stream_ts @var{stream}, char *@var{buf}, size_t @var{size}, size_t *@var{nbytes})
192 @end deftypefun 193 @end deftypefun
193 194
194 @deftypefun int stream_sequential_write (stream_t @var{stream}, char *@var{buf}, size_t @var{size}) 195 @deftypefun int mu_stream_sequential_write (mu_stream_t @var{stream}, char *@var{buf}, size_t @var{size})
195 @end deftypefun 196 @end deftypefun
196 197
197 @deftypefun int stream_seek (stream_t @var{stream}, off_t @var{off}, int @var{whence}) 198 @deftypefun int mu_stream_seek (mu_stream_t @var{stream}, mu_off_t @var{off}, int @var{whence})
198 @end deftypefun 199 @end deftypefun
199 200
200 @deftypefun int stream_strerror (stream_t @var{stream}, char **@var{p}) 201 @deftypefun int mu_stream_strerror (mu_stream_t @var{stream}, char **@var{p})
201 @end deftypefun 202 @end deftypefun
202 203
203 An example using @code{tcp_stream_create()} to make a simple web client: 204 An example using @code{mu_tcp_stream_create()} to make a simple web client:
204 205
205 @smallexample 206 @smallexample
206 @include http.inc 207 @include http.inc
......
1 @c This is part of the GNU Mailutils manual. 1 @c This is part of the GNU Mailutils manual.
2 @c Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. 2 @c Copyright (C) 1999,2000,2001,2002,2003,2004,2006
3 @c Free Software Foundation, Inc.
3 @c See file mailutils.texi for copying conditions. 4 @c See file mailutils.texi for copying conditions.
4 @comment ******************************************************************* 5 @comment *******************************************************************
5 6
...@@ -111,15 +112,15 @@ For more complete information see @cite{RFC 2368}. ...@@ -111,15 +112,15 @@ For more complete information see @cite{RFC 2368}.
111 112
112 Helper functions are provided to retrieve and set the @emph{URL} fields. 113 Helper functions are provided to retrieve and set the @emph{URL} fields.
113 114
114 @deftypefun int url_create (url_t *@var{url}, const char *@var{name}) 115 @deftypefun int mu_url_create (mu_url_t *@var{url}, const char *@var{name})
115 Create the url data structure, but do not parse it. 116 Create the url data structure, but do not parse it.
116 @end deftypefun 117 @end deftypefun
117 118
118 @deftypefun void url_destroy (url_t *@var{url}) 119 @deftypefun void mu_url_destroy (mu_url_t *@var{url})
119 Destroy the url and free its resources. 120 Destroy the url and free its resources.
120 @end deftypefun 121 @end deftypefun
121 122
122 @deftypefun int url_parse (url_t) 123 @deftypefun int mu_url_parse (mu_url_t)
123 Parses the url, after calling this the get functions can be called. 124 Parses the url, after calling this the get functions can be called.
124 125
125 The syntax, condensed from @cite{RFC 1738}, and extended with the ;auth= 126 The syntax, condensed from @cite{RFC 1738}, and extended with the ;auth=
...@@ -142,58 +143,58 @@ This is a generalized URL syntax, and may not be exactly appropriate ...@@ -142,58 +143,58 @@ This is a generalized URL syntax, and may not be exactly appropriate
142 for any particular scheme. 143 for any particular scheme.
143 @end deftypefun 144 @end deftypefun
144 145
145 @deftypefun int url_get_scheme (const url_t, char *, size_t, size_t *) 146 @deftypefun int mu_url_get_scheme (const mu_url_t, char *, size_t, size_t *)
146 @end deftypefun 147 @end deftypefun
147 148
148 @deftypefun int url_get_user (const url_t, char *, size_t, size_t *) 149 @deftypefun int mu_url_get_user (const mu_url_t, char *, size_t, size_t *)
149 @end deftypefun 150 @end deftypefun
150 151
151 @deftypefun int url_get_passwd (const url_t, char *, size_t, size_t *) 152 @deftypefun int mu_url_get_passwd (const mu_url_t, char *, size_t, size_t *)
152 @end deftypefun 153 @end deftypefun
153 154
154 @deftypefun int url_get_auth (const url_t, char *, size_t, size_t *) 155 @deftypefun int mu_url_get_auth (const mu_url_t, char *, size_t, size_t *)
155 @end deftypefun 156 @end deftypefun
156 157
157 @deftypefun int url_get_host (const url_t, char *, size_t, size_t *) 158 @deftypefun int mu_url_get_host (const mu_url_t, char *, size_t, size_t *)
158 @end deftypefun 159 @end deftypefun
159 160
160 @deftypefun int url_get_port (const url_t, long *) 161 @deftypefun int mu_url_get_port (const mu_url_t, long *)
161 @end deftypefun 162 @end deftypefun
162 163
163 @deftypefun int url_get_path (const url_t, char *, size_t, size_t *) 164 @deftypefun int mu_url_get_path (const mu_url_t, char *, size_t, size_t *)
164 @end deftypefun 165 @end deftypefun
165 166
166 @deftypefun int url_get_query (const url_t, char *, size_t, size_t *) 167 @deftypefun int mu_url_get_query (const mu_url_t, char *, size_t, size_t *)
167 @end deftypefun 168 @end deftypefun
168 169
169 @deftypefun {const char*} url_to_string (const url_t) 170 @deftypefun {const char*} mu_url_to_string (const mu_url_t)
170 @end deftypefun 171 @end deftypefun
171 172
172 @deftypefun int url_is_scheme (url_t, const char *@var{scheme}) 173 @deftypefun int mu_url_is_scheme (mu_url_t, const char *@var{scheme})
173 @end deftypefun 174 @end deftypefun
174 175
175 @deftypefun int url_is_same_scheme (url_t, url_t) 176 @deftypefun int mu_url_is_same_scheme (mu_url_t, mu_url_t)
176 @end deftypefun 177 @end deftypefun
177 178
178 @deftypefun int url_is_same_user (url_t, url_t) 179 @deftypefun int mu_url_is_same_user (mu_url_t, mu_url_t)
179 @end deftypefun 180 @end deftypefun
180 181
181 @deftypefun int url_is_same_path (url_t, url_t) 182 @deftypefun int mu_url_is_same_path (mu_url_t, mu_url_t)
182 @end deftypefun 183 @end deftypefun
183 184
184 @deftypefun int url_is_same_host (url_t, url_t) 185 @deftypefun int mu_url_is_same_host (mu_url_t, mu_url_t)
185 @end deftypefun 186 @end deftypefun
186 187
187 @deftypefun int url_is_same_port (url_t, url_t) 188 @deftypefun int mu_url_is_same_port (mu_url_t, mu_url_t)
188 @end deftypefun 189 @end deftypefun
189 190
190 @deftypefun char* url_decode (const char *@var{string}) 191 @deftypefun {char *} mu_url_decode (const char *@var{string})
191 Decodes an @cite{RFC 1738} encoded string, returning the decoded string 192 Decodes an @cite{RFC 1738} encoded string, returning the decoded string
192 in allocated memory. If the string is not encoded, this degenerates to 193 in allocated memory. If the string is not encoded, this degenerates to
193 a @code{strdup()}. 194 a @code{strdup()}.
194 @end deftypefun 195 @end deftypefun
195 196
196 @deftypefun int url_is_ticket (url_t @var{ticket}, url_t @var{url}) 197 @deftypefun int mu_url_is_ticket (mu_url_t @var{ticket}, mu_url_t @var{url})
197 @end deftypefun 198 @end deftypefun
198 199
199 @subsubheading Example 200 @subsubheading Example
......