summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlain Magloire <alainm@gnu.org>2004-07-01 04:08:00 +0000
committerAlain Magloire <alainm@gnu.org>2004-07-01 04:08:00 +0000
commitcb55489c800e4706b1b0f070d6f4d91e13f20733 (patch)
tree400a3d264105b94ff673c83aca8363a06f39dbf9 /include
parent337ccc5af1e697e7af44a6a4836a710876cbb460 (diff)
downloadmailutils-cb55489c800e4706b1b0f070d6f4d91e13f20733.tar.gz
mailutils-cb55489c800e4706b1b0f070d6f4d91e13f20733.tar.bz2
Now part of the distribution.
Diffstat (limited to 'include')
-rw-r--r--include/mailutils/Makefile.am1
-rw-r--r--include/mailutils/nntp.h32
-rw-r--r--include/mailutils/pop3.h24
-rw-r--r--include/mailutils/sys/Makefile.am3
-rw-r--r--include/mailutils/sys/nntp.h1
-rw-r--r--include/mailutils/sys/pop3.h3
6 files changed, 34 insertions, 30 deletions
diff --git a/include/mailutils/Makefile.am b/include/mailutils/Makefile.am
index a1609fd29..043c1d9ac 100644
--- a/include/mailutils/Makefile.am
+++ b/include/mailutils/Makefile.am
@@ -45,12 +45,13 @@ pkginclude_HEADERS = \
message.h \
mime.h \
monitor.h \
mu_auth.h \
mutil.h \
nls.h \
+ nntp.h \
observer.h \
parse822.h \
pop3.h \
property.h \
refcount.h \
registrar.h \
diff --git a/include/mailutils/nntp.h b/include/mailutils/nntp.h
index 4b2ff027a..3f943fb59 100644
--- a/include/mailutils/nntp.h
+++ b/include/mailutils/nntp.h
@@ -44,15 +44,15 @@ extern int mu_nntp_set_debug (mu_nntp_t nntp, mu_debug_t debug);
extern int mu_nntp_stls (mu_nntp_t nntp);
extern int mu_nntp_mode_reader (mu_nntp_t nntp);
-/* A list is return with the multi-line answer. It is the responsability of
- the caller to call list_destroy() to dispose of the list. */
-extern int mu_nntp_list_extensions (mu_nntp_t nntp, list_t *plist);
+/* An iterator is return with the multi-line answer. It is the responsability of
+ the caller to call iterator_destroy() to dispose of the iterator. */
+extern int mu_nntp_list_extensions (mu_nntp_t nntp, iterator_t *iterator);
extern int mu_nntp_quit (mu_nntp_t nntp);
/* The argument name is allocated with malloc(3). The caller is responsable to call free(3) */
extern int mu_nntp_group (mu_nntp_t nntp, const char *group, unsigned long *total, unsigned long *first,
unsigned long *last, char **name);
@@ -78,32 +78,32 @@ extern int mu_nntp_date (mu_nntp_t nntp, unsigned int *year, unsigne
unsigned int *hour, unsigned int *minute, unsigned int *second);
/* The caller must call stream_destoy() when done, no other commands are permitted until the stream is destroyed. */
extern int mu_nntp_help (mu_nntp_t nntp, stream_t *stream);
-/* A list is return with the multi-line answer. It is the responsability of
- the caller to call list_destroy() to dispose of the list. */
+/* An iterator is return with the multi-line answer. It is the responsability of
+ the caller to call iterator_destroy() to dispose of the iterator. */
extern int mu_nntp_newgroups (mu_nntp_t nntp, unsigned int year, unsigned int month, unsigned int day,
- unsigned int hour, unsigned int minute, unsigned int second, int is_gmt, list_t *plist);
-/* A list is return with the multi-line answer. It is the responsability of
- the caller to call list_destroy() to dispose of the list. */
+ unsigned int hour, unsigned int minute, unsigned int second, int is_gmt, iterator_t *iterator);
+/* A iterator is return with the multi-line answer. It is the responsability of
+ the caller to call iterator_destroy() to dispose of the iterator. */
extern int mu_nntp_newnews (mu_nntp_t nntp, const char *wildmat, unsigned int year, unsigned int month, unsigned int day,
- unsigned int hour, unsigned int minute, unsigned int second, int is_gmt, list_t *plist);
+ unsigned int hour, unsigned int minute, unsigned int second, int is_gmt, iterator_t *iterator);
extern int mu_nntp_post (mu_nntp_t nntp, stream_t stream);
extern int mu_nntp_ihave (mu_nntp_t nntp, const char *mid, stream_t stream);
-/* A list is return with the multi-line answer. It is the responsability of
- the caller to call list_destroy() to dispose of the list. */
-extern int mu_nntp_list_active (mu_nntp_t nntp, const char *wildmat, list_t *plist);
-extern int mu_nntp_list_active_times (mu_nntp_t nntp, const char *wildmat, list_t *plist);
-extern int mu_nntp_list_distributions (mu_nntp_t nntp, const char *wildmat, list_t *plist);
-extern int mu_nntp_list_distrib_pats (mu_nntp_t nntp, list_t *plist);
-extern int mu_nntp_list_newsgroups (mu_nntp_t nntp, const char *wildmat, list_t *plist);
+/* A iterator is return with the multi-line answer. It is the responsability of
+ the caller to call iterator_destroy() to dispose of the iterator. */
+extern int mu_nntp_list_active (mu_nntp_t nntp, const char *wildmat, iterator_t *iterator);
+extern int mu_nntp_list_active_times (mu_nntp_t nntp, const char *wildmat, iterator_t *iterator);
+extern int mu_nntp_list_distributions (mu_nntp_t nntp, const char *wildmat, iterator_t *iterator);
+extern int mu_nntp_list_distrib_pats (mu_nntp_t nntp, iterator_t *iterator);
+extern int mu_nntp_list_newsgroups (mu_nntp_t nntp, const char *wildmat, iterator_t *iterator);
/* Parse the list active response.
"group high low status"
group: is the name of the group
high: high wather mark
diff --git a/include/mailutils/pop3.h b/include/mailutils/pop3.h
index 013d8c7d4..e9785c404 100644
--- a/include/mailutils/pop3.h
+++ b/include/mailutils/pop3.h
@@ -1,8 +1,8 @@
/* GNU Mailutils -- a suite of utilities for electronic mail
- Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
@@ -15,13 +15,13 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef _MAILUTILS_POP3_H
#define _MAILUTILS_POP3_H
-#include <mailutils/list.h>
+#include <mailutils/iterator.h>
#include <mailutils/debug.h>
#include <mailutils/stream.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -44,24 +44,24 @@ extern int mu_pop3_get_timeout (mu_pop3_t pop3, int *timeout);
extern int mu_pop3_set_debug (mu_pop3_t pop3, mu_debug_t debug);
extern int mu_pop3_apop (mu_pop3_t pop3, const char *name, const char *digest);
extern int mu_pop3_stls (mu_pop3_t pop3);
-/* It is the responsability of the caller to call list_destroy() when done
- with the list. The item in the list is of type "const char *",
+/* It is the responsability of the caller to call iterator_destroy() when done
+ with the iterator. The items return by the iterator are of type "const char *",
no processing is done on the item except the removal of the trailing newline. */
-extern int mu_pop3_capa (mu_pop3_t pop3, list_t *plist);
+extern int mu_pop3_capa (mu_pop3_t pop3, iterator_t *iterator);
extern int mu_pop3_dele (mu_pop3_t pop3, unsigned int mesgno);
extern int mu_pop3_list (mu_pop3_t pop3, unsigned int mesgno, size_t *mesg_octet);
-/* A list is return with the multi-line answer. It is the responsability of
- the caller to call list_destroy() to dipose of the list. */
-extern int mu_pop3_list_all (mu_pop3_t pop3, list_t *plist);
+/* An iterator is return with the multi-line answer. It is the responsability of
+ the caller to call iterator_destroy() to dispose of the iterator. */
+extern int mu_pop3_list_all (mu_pop3_t pop3, iterator_t *piterator);
extern int mu_pop3_noop (mu_pop3_t pop3);
extern int mu_pop3_pass (mu_pop3_t pop3, const char *pass);
extern int mu_pop3_quit (mu_pop3_t pop3);
@@ -78,15 +78,15 @@ extern int mu_pop3_stat (mu_pop3_t pop3, unsigned int *count, size_t *o
the caller to call stream_destroy() to dipose of the stream. */
extern int mu_pop3_top (mu_pop3_t pop3, unsigned int mesgno, unsigned int lines, stream_t *pstream);
/* The uidl is malloc and return in puidl, it is the responsability of caller
to free() the uild when done. */
extern int mu_pop3_uidl (mu_pop3_t pop3, unsigned int mesgno, char **puidl);
-/* A list is return with the multi-line answer. It is the responsability of
- the caller to call list_destroy() to dipose of the list. */
-extern int mu_pop3_uidl_all (mu_pop3_t pop3, list_t *plist);
+/* An iterator is return with the multi-line answer. It is the responsability of
+ the caller to call iterator_destroy() to dispose of the iterator. */
+extern int mu_pop3_uidl_all (mu_pop3_t pop3, iterator_t *piterator);
extern int mu_pop3_user (mu_pop3_t pop3, const char *user);
/* Reads the multi-line response of the server, nread will be 0 when the termination octets
are detected. Clients should not use this function unless they are sending direct command. */
@@ -94,13 +94,13 @@ extern int mu_pop3_readline (mu_pop3_t pop3, char *buffer, size_t buflen, s
/* Returns the last command acknowledge. If the server supports RESP-CODE, the message
could be retrieve, but it is up the caller to do the parsing. */
extern int mu_pop3_response (mu_pop3_t pop3, char *buffer, size_t buflen, size_t *nread);
/* pop3_writeline copies the line in the internal buffer, a mu_pop3_send() is
- needed to do the actual transmission. */
+ needed to do the actual transmission. */
extern int mu_pop3_writeline (mu_pop3_t pop3, const char *format, ...);
/* mu_pop3_sendline() is equivalent to:
mu_pop3_writeline (pop3, line);
mu_pop3_send (pop3);
*/
diff --git a/include/mailutils/sys/Makefile.am b/include/mailutils/sys/Makefile.am
index 2f5e30999..db89086e9 100644
--- a/include/mailutils/sys/Makefile.am
+++ b/include/mailutils/sys/Makefile.am
@@ -15,7 +15,8 @@
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
pkginclude_HEADERS = \
- pop3.h
+ pop3.h \
+ nntp.h
diff --git a/include/mailutils/sys/nntp.h b/include/mailutils/sys/nntp.h
index ba3da718f..0f98dd20b 100644
--- a/include/mailutils/sys/nntp.h
+++ b/include/mailutils/sys/nntp.h
@@ -147,12 +147,13 @@ struct _mu_nntp
stream_t carrier; /* TCP Connection. */
};
extern int mu_nntp_debug_cmd (mu_nntp_t);
extern int mu_nntp_debug_ack (mu_nntp_t);
+extern int mu_nntp_iterator_create (mu_nntp_t, iterator_t *iterator);
extern int mu_nntp_stream_create (mu_nntp_t nntp, stream_t *pstream);
extern int mu_nntp_carrier_is_ready (stream_t carrier, int flag, int timeout);
extern int mu_nntp_parse_article (mu_nntp_t nntp, int code, unsigned long *pnum, char **mid);
/* Check for non recoverable error.
diff --git a/include/mailutils/sys/pop3.h b/include/mailutils/sys/pop3.h
index 0ba218ce1..5785c7076 100644
--- a/include/mailutils/sys/pop3.h
+++ b/include/mailutils/sys/pop3.h
@@ -1,8 +1,8 @@
/* GNU Mailutils -- a suite of utilities for electronic mail
- Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
@@ -87,12 +87,13 @@ struct _mu_pop3
stream_t carrier; /* TCP Connection. */
};
extern int mu_pop3_debug_cmd (mu_pop3_t);
extern int mu_pop3_debug_ack (mu_pop3_t);
+extern int mu_pop3_iterator_create (mu_pop3_t pop3, iterator_t *piterator);
extern int mu_pop3_stream_create (mu_pop3_t pop3, stream_t *pstream);
extern int mu_pop3_carrier_is_ready (stream_t carrier, int flag, int timeout);
/* Check for non recoverable error.
The error is consider not recoverable if not part of the signal set:
EAGAIN, EINPROGRESS, EINTR.

Return to:

Send suggestions and report system problems to the System administrator.