Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
a90e3486
...
a90e3486d097e6047074757d0b305c9c9ac8d86e
authored
2001-04-05 04:20:16 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Light update. filter_t, auth_t, property_t not yet documented.
1 parent
56b6db20
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
34 deletions
doc/mailbox.texi
doc/mailutils.texi
doc/message.texi
doc/sfrom.c.texi
doc/mailbox.texi
View file @
a90e348
...
...
@@ -15,11 +15,11 @@ data structure to the user. Functions are provided to retrieve the information.
-----------
|-----------------|
|
(
sean
)
|
locker_t
|
|
auth_t
----------
|-----------------|
+-->/----------
\
|
...
|
|
user
|
|
message_t
(
1
)
|
|
user
|
|-----------------|
|
passwd
|
|
message
[
1
]
|
\
----------/
|
message
_t
(
2
)
|
\
----------/
|
......
|
|
message
[
n
]
|
|
message
_t
(
n
)
|
\
-----------------/
@end
group
@end
example
...
...
@@ -220,6 +220,26 @@ The return value is @code{0} on success and a code number on error conditions:
@end table
@end deftypefun
@deftypefun int mailbox_set_ticket (mailbox_t @var{mbox}, ticket_t @var{ticket})
The @var{ticket} will be set on the @code{auth_t} object on creation.
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_get_ticket (mailbox_t @var{mbox}, ticket_t @var{ticket})
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_is_updated (mailbox_t @var{mbox})
Check if the mailbox is up-to-date.
...
...
@@ -242,7 +262,7 @@ Not enough memory.
@end table
@end deftypefun
@deftypefun int mailbox_size (mailbox_t @var{mbox}, off_t *@var{psize})
@deftypefun int mailbox_
get_
size (mailbox_t @var{mbox}, off_t *@var{psize})
Gives the @var{mbox} size.
The return value is @code{0} on success and a code number on error conditions:
...
...
@@ -276,6 +296,16 @@ Not enough memory.
@end table
@end deftypefun
@deftypefun int mailbox_get_property (mailbox_t @var{mbox}, property_t *@var{property})
Get the property object.
The return value is @code{0} on success and a code number on error conditions:
@table @code
@item EINVAL
@var{mbox} is null.
@item ENOMEM
@end table
@end deftypefun
@deftypefun int mailbox_get_debug (mailbox_t @var{mbox}, debug_t *@var{debug})
Get a debug object.
The return value is @code{0} on success and a code number on error conditions:
...
...
doc/mailutils.texi
View file @
a90e348
...
...
@@ -133,25 +133,28 @@ mailers.
@example
@group
mailbox_t
url_t
-/
var
/
mail
-
+---
//---->+-----------------+ +-->+-----------+
(
alain
)
|
|
url_t
*-|----+
|
port
|
-----------
|
+-----------------+
|
hostname
|
(
jakob
*-
)
----+
|
auth_t
*-|----+
|
file
|
-----------
+-----------------+
|
|
...
|
(
jeff
)
+---|-*
message_t
[
0
]
|
|
+-----------+
-----------
|
|
message_t
[
1
]
|
|
(
shaleh
)
|
|
...
|
|
auth_t
----------
|
+-----------------+
+-->+----------+
|
|
user
|
message_t
|
|
passwd
|
+--------------+<------+
header_t
+----------+
|
header_t
*-|------------>+---------------+
+--------------+
|
(
name
:
val
)[
0
]
|
|
body_t
|
|
...
|
+--------------+
+---------------+
mailbox_t
url_t
-/
var
/
mail
-
+---
//---->+-----------------+ +-->+------------+
(
alain
)
|
|
url_t
*-|----+
|
port
|
-----------
|
|-----------------|
|
hostname
|
(
jakob
*-
)
----+
|
auth_t
*-|----+
|
file
|
-----------
|-----------------|
|
|
...
|
(
jeff
)
|
locker_t
*-|--+
|
+------------+
-----------
|-----------------|
|
|
(
shaleh
)
|
stream_t
|
|
|
auth_t
----------
|-----------------|
|
+-->+------------+
+---|-*
message_t
[]
|
|
|
ticket_t
|
message_t
|
+-----------------+
|
+------------+
+----------------+<----+
|
|
envelope_t
|
|
|----------------|
header_t
|
locker_t
|
header_t
*-|------------>+--------------+
+---->+------+
|----------------|
|
stream_t
|
+------+
|
body_t
*-|----+
+--------------+
+----------------+
|
body_t
+---+--------------+
|
stream_t
|
+--------------+
@end
group
@end
example
...
...
doc/message.texi
View file @
a90e348
...
...
@@ -5,6 +5,7 @@ encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}.
@example
@group
mailbox_t
__________
message_t
(
message
[
1
])
+------>+-----------------------+
----------
|
|
envelope_t
|
...
...
@@ -16,12 +17,6 @@ encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}.
----------
|
attribute_t
|
|-----------------------|
|
stream_t
|
|-----------------------|
|
size
|
|-----------------------|
|
uid
|
+-----------------------+
|
uidl
|
+-----------------------+
@end
group
@end
example
...
...
doc/sfrom.c.texi
View file @
a90e348
...
...
@@ -3,7 +3,9 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <mailutils.h>
#include <mailutils/registrar.h>
#include <mailutils/list.h>
#include <mailutils/mailbox.h>
#define BUFFER_SIZE 64
int
...
...
@@ -26,17 +28,18 @@ main (int argc, const char **argv)
list_append
(
registrar
,
path_record
)
;
list_append
(
registrar
,
pop_record
)
;
@
}
status
=
mailbox_create
(
&
mbox
,
mail
,
0
)
;
status
=
mailbox_create
(
&
mbox
,
mail
)
;
if
(
status
!=
0
)
@{
fprintf
(
stderr
,
"mailbox_create:
failed
\n
"
)
fprintf
(
stderr
,
"mailbox_create:
%s
\n
"
,
strerror
(
status
))
;
exit
(
EXIT_FAILURE
)
;
@
}
status
=
mailbox_open
(
mbox
,
MU_STREAM_READ
)
;
if
(
status
!=
0
)
@{
fprintf
(
stderr
,
"mailbox_open:
failed
\n
"
)
;
fprintf
(
stderr
,
"mailbox_open:
%s
\n
"
,
strerror
(
status
)
)
;
exit
(
EXIT_FAILURE
)
;
@
}
...
...
@@ -50,7 +53,7 @@ main (int argc, const char **argv)
if
((
status
=
mailbox_get_message
(
mbox
,
msgno
,
&
msg
))
!=
0
||
(
status
=
message_get_header
(
msg
,
&
hdr
))
!=
0
)
@{
fprintf
(
stderr
,
"Error
retrieving headers
\n
"
)
;
fprintf
(
stderr
,
"Error
message:%s
\n
"
,
strerror
(
status
)
)
;
exit
(
EXIT_FAILURE
)
;
@
}
...
...
Please
register
or
sign in
to post a comment