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.
----------- |-----------------| |
( sean ) | locker_t | | auth_t
---------- |-----------------| +-->/----------\
| url_t | | user |
| ... | | user |
|-----------------| | passwd |
| message[0] | \----------/
| message[1] | \----------/
| ...... |
| message[n] |
\-----------------/
@end group
@end example
@deftypefun int mailbox_create (mailbox_t *@var{pmbox}, const char *@var{name}, int @var{id})
@deftypefun int mailbox_create (mailbox_t *@var{pmbox}, const char *@var{name})
The function @code{mailbox_create} allocates and initializes @var{pmbox}.
The validation is based on the scheme of the url @var{name} or @var{id}.
The concrete mailbox type instanciate is based on the scheme of the url @var{name}.
The return value is @code{0} on success and a code number on error conditions:
@table @code
......@@ -40,7 +40,7 @@ Not enough memory to allocate resources.
@deftypefun int mailbox_create_default (mailbox_t *@var{pmbox}, const char *@var{user})
The environment variable @emph{$MAIL} or the string formed by
@emph{$MAILDIR}/@var{user}" or @emph{$LOGNAME} if @var{user} is null,
@emph{_PATH_MAILDIR}/@var{user}" or @emph{$LOGNAME} if @var{user} is null,
for a default mailbox and calls @code{mailbox_create}.
@end deftypefun
......@@ -121,7 +121,47 @@ The return value is @code{0} on success and a code number on error conditions:
@end deftypefun
@deftypefun int mailbox_messages_count (mailbox_t @var{mbox}, size_t *@var{pnumber});
Give the number of messaged in @var{mbox}.
Give the number of messages in @var{mbox}.
The return value is @code{0} on success and a code number on error conditions:
@table @code
@item EINVAL
@var{mbox} is null.
@end table
@end deftypefun
@deftypefun int mailbox_messages_recent (mailbox_t @var{mbox}, size_t *@var{pnumber});
Give the number of recent messages in @var{mbox}.
The return value is @code{0} on success and a code number on error conditions:
@table @code
@item EINVAL
@var{mbox} is null.
@end table
@end deftypefun
@deftypefun int mailbox_message_unseen (mailbox_t @var{mbox}, size_t *@var{pnumber});
Give the number of first unseen message in @var{mbox}.
The return value is @code{0} on success and a code number on error conditions:
@table @code
@item EINVAL
@var{mbox} is null.
@end table
@end deftypefun
@deftypefun int mailbox_uidvalidity (mailbox_t @var{mbox}, size_t *@var{pnumber});
Give the uid validity of @var{mbox}.
The return value is @code{0} on success and a code number on error conditions:
@table @code
@item EINVAL
@var{mbox} is null.
@end table
@end deftypefun
@deftypefun int mailbox_uidnext (mailbox_t @var{mbox}, size_t *@var{pnumber});
Give the next predicted uid for @var{mbox}.
The return value is @code{0} on success and a code number on error conditions:
@table @code
......
......@@ -68,7 +68,7 @@ by the Foundation.
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1999, 2000 Free Software Foundation, Inc.
Copyright @copyright{} 1999, 2000, 2001 Free Software Foundation, Inc.
@sp 2
Published by the Free Software Foundation, @*
......@@ -145,14 +145,12 @@ mailers.
| | user |
message_t | | passwd |
+--------------+<------+ header_t +----------+
| header_t *-|-----------------------+-->+---------------+
+--------------+ body_t | | name/val[0] |
| body_t[0] *-|----->+-------------+ | | ... |
| body_t[1] | | header_t *-|--+ +---------------+
| ... | +-------------+
+--------------+ | content |
| next_body |
+-------------+
| header_t *-|------------>+---------------+
+--------------+ | (name:val)[0] |
| body_t | | ... |
+--------------+ +---------------+
@end group
@end example
......
......@@ -19,6 +19,8 @@ encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}.
|-----------------------|
| size |
|-----------------------|
| uid |
+-----------------------+
| uidl |
+-----------------------+
@end group
......@@ -84,6 +86,9 @@ Return non-zero value if message is multi-part.
@deftypefun int message_set_envelope (message_t @var{msg}, envelope_t envelope, void *@var{owner})
@end deftypefun
@deftypefun int message_get_uid (message_t @var{msg}, size_t *@var{uid})
@end deftypefun
@deftypefun int message_get_uidl (message_t @var{msg}, char *@var{buffer}, size_t @var{buflen}, size_t *@var{pwriten})
@end deftypefun
......