Commit 3f429269 3f429269a48d5d6c2fdad6d1312b906eb3f9ccec by Alain Magloire

Light editing.

1 parent 074390c0
...@@ -15,18 +15,18 @@ data structure to the user. Functions are provided to retrieve the information. ...@@ -15,18 +15,18 @@ data structure to the user. Functions are provided to retrieve the information.
15 ----------- |-----------------| | 15 ----------- |-----------------| |
16 ( sean ) | locker_t | | auth_t 16 ( sean ) | locker_t | | auth_t
17 ---------- |-----------------| +-->/----------\ 17 ---------- |-----------------| +-->/----------\
18 | url_t | | user | 18 | ... | | user |
19 |-----------------| | passwd | 19 |-----------------| | passwd |
20 | message[0] | \----------/ 20 | message[1] | \----------/
21 | ...... | 21 | ...... |
22 | message[n] | 22 | message[n] |
23 \-----------------/ 23 \-----------------/
24 @end group 24 @end group
25 @end example 25 @end example
26 26
27 @deftypefun int mailbox_create (mailbox_t *@var{pmbox}, const char *@var{name}, int @var{id}) 27 @deftypefun int mailbox_create (mailbox_t *@var{pmbox}, const char *@var{name})
28 The function @code{mailbox_create} allocates and initializes @var{pmbox}. 28 The function @code{mailbox_create} allocates and initializes @var{pmbox}.
29 The validation is based on the scheme of the url @var{name} or @var{id}. 29 The concrete mailbox type instanciate is based on the scheme of the url @var{name}.
30 30
31 The return value is @code{0} on success and a code number on error conditions: 31 The return value is @code{0} on success and a code number on error conditions:
32 @table @code 32 @table @code
...@@ -40,7 +40,7 @@ Not enough memory to allocate resources. ...@@ -40,7 +40,7 @@ Not enough memory to allocate resources.
40 40
41 @deftypefun int mailbox_create_default (mailbox_t *@var{pmbox}, const char *@var{user}) 41 @deftypefun int mailbox_create_default (mailbox_t *@var{pmbox}, const char *@var{user})
42 The environment variable @emph{$MAIL} or the string formed by 42 The environment variable @emph{$MAIL} or the string formed by
43 @emph{$MAILDIR}/@var{user}" or @emph{$LOGNAME} if @var{user} is null, 43 @emph{_PATH_MAILDIR}/@var{user}" or @emph{$LOGNAME} if @var{user} is null,
44 for a default mailbox and calls @code{mailbox_create}. 44 for a default mailbox and calls @code{mailbox_create}.
45 @end deftypefun 45 @end deftypefun
46 46
...@@ -121,7 +121,47 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -121,7 +121,47 @@ The return value is @code{0} on success and a code number on error conditions:
121 @end deftypefun 121 @end deftypefun
122 122
123 @deftypefun int mailbox_messages_count (mailbox_t @var{mbox}, size_t *@var{pnumber}); 123 @deftypefun int mailbox_messages_count (mailbox_t @var{mbox}, size_t *@var{pnumber});
124 Give the number of messaged in @var{mbox}. 124 Give the number of messages in @var{mbox}.
125
126 The return value is @code{0} on success and a code number on error conditions:
127 @table @code
128 @item EINVAL
129 @var{mbox} is null.
130 @end table
131 @end deftypefun
132
133 @deftypefun int mailbox_messages_recent (mailbox_t @var{mbox}, size_t *@var{pnumber});
134 Give the number of recent messages in @var{mbox}.
135
136 The return value is @code{0} on success and a code number on error conditions:
137 @table @code
138 @item EINVAL
139 @var{mbox} is null.
140 @end table
141 @end deftypefun
142
143 @deftypefun int mailbox_message_unseen (mailbox_t @var{mbox}, size_t *@var{pnumber});
144 Give the number of first unseen message in @var{mbox}.
145
146 The return value is @code{0} on success and a code number on error conditions:
147 @table @code
148 @item EINVAL
149 @var{mbox} is null.
150 @end table
151 @end deftypefun
152
153 @deftypefun int mailbox_uidvalidity (mailbox_t @var{mbox}, size_t *@var{pnumber});
154 Give the uid validity of @var{mbox}.
155
156 The return value is @code{0} on success and a code number on error conditions:
157 @table @code
158 @item EINVAL
159 @var{mbox} is null.
160 @end table
161 @end deftypefun
162
163 @deftypefun int mailbox_uidnext (mailbox_t @var{mbox}, size_t *@var{pnumber});
164 Give the next predicted uid for @var{mbox}.
125 165
126 The return value is @code{0} on success and a code number on error conditions: 166 The return value is @code{0} on success and a code number on error conditions:
127 @table @code 167 @table @code
......
...@@ -68,7 +68,7 @@ by the Foundation. ...@@ -68,7 +68,7 @@ by the Foundation.
68 68
69 @page 69 @page
70 @vskip 0pt plus 1filll 70 @vskip 0pt plus 1filll
71 Copyright @copyright{} 1999, 2000 Free Software Foundation, Inc. 71 Copyright @copyright{} 1999, 2000, 2001 Free Software Foundation, Inc.
72 72
73 @sp 2 73 @sp 2
74 Published by the Free Software Foundation, @* 74 Published by the Free Software Foundation, @*
...@@ -145,18 +145,16 @@ mailers. ...@@ -145,18 +145,16 @@ mailers.
145 | | user | 145 | | user |
146 message_t | | passwd | 146 message_t | | passwd |
147 +--------------+<------+ header_t +----------+ 147 +--------------+<------+ header_t +----------+
148 | header_t *-|-----------------------+-->+---------------+ 148 | header_t *-|------------>+---------------+
149 +--------------+ body_t | | name/val[0] | 149 +--------------+ | (name:val)[0] |
150 | body_t[0] *-|----->+-------------+ | | ... | 150 | body_t | | ... |
151 | body_t[1] | | header_t *-|--+ +---------------+ 151 +--------------+ +---------------+
152 | ... | +-------------+ 152
153 +--------------+ | content | 153
154 | next_body |
155 +-------------+
156 @end group 154 @end group
157 @end example 155 @end example
158 156
159 For example writing a simple @command{from} command that will list the 157 For example writing a simple @command{from} command that will list the
160 @emph{From} and @emph{Subject} headers of every mail in a folder. 158 @emph{From} and @emph{Subject} headers of every mail in a folder.
161 159
162 @example 160 @example
......
...@@ -19,6 +19,8 @@ encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}. ...@@ -19,6 +19,8 @@ encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}.
19 |-----------------------| 19 |-----------------------|
20 | size | 20 | size |
21 |-----------------------| 21 |-----------------------|
22 | uid |
23 +-----------------------+
22 | uidl | 24 | uidl |
23 +-----------------------+ 25 +-----------------------+
24 @end group 26 @end group
...@@ -84,6 +86,9 @@ Return non-zero value if message is multi-part. ...@@ -84,6 +86,9 @@ Return non-zero value if message is multi-part.
84 @deftypefun int message_set_envelope (message_t @var{msg}, envelope_t envelope, void *@var{owner}) 86 @deftypefun int message_set_envelope (message_t @var{msg}, envelope_t envelope, void *@var{owner})
85 @end deftypefun 87 @end deftypefun
86 88
89 @deftypefun int message_get_uid (message_t @var{msg}, size_t *@var{uid})
90 @end deftypefun
91
87 @deftypefun int message_get_uidl (message_t @var{msg}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{pwriten}) 92 @deftypefun int message_get_uidl (message_t @var{msg}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{pwriten})
88 @end deftypefun 93 @end deftypefun
89 94
......