summaryrefslogtreecommitdiffabout
path: root/include
authorAlain Magloire <alainm@gnu.org>2004-07-01 04:08:00 (GMT)
committer Alain Magloire <alainm@gnu.org>2004-07-01 04:08:00 (GMT)
commitcb55489c800e4706b1b0f070d6f4d91e13f20733 (patch) (side-by-side diff)
tree400a3d264105b94ff673c83aca8363a06f39dbf9 /include
parent337ccc5af1e697e7af44a6a4836a710876cbb460 (diff)
downloadmailutils-cb55489c800e4706b1b0f070d6f4d91e13f20733.tar.gz
mailutils-cb55489c800e4706b1b0f070d6f4d91e13f20733.tar.bz2
Now part of the distribution.
Diffstat (limited to 'include') (more/less context) (ignore whitespace changes)
-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 a1609fd..043c1d9 100644
--- a/include/mailutils/Makefile.am
+++ b/include/mailutils/Makefile.am
@@ -48,6 +48,7 @@ pkginclude_HEADERS = \
mu_auth.h \
mutil.h \
nls.h \
+ nntp.h \
observer.h \
parse822.h \
pop3.h \
diff --git a/include/mailutils/nntp.h b/include/mailutils/nntp.h
index 4b2ff02..3f943fb 100644
--- a/include/mailutils/nntp.h
+++ b/include/mailutils/nntp.h
@@ -47,9 +47,9 @@ 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);
@@ -81,26 +81,26 @@ extern int mu_nntp_date (mu_nntp_t nntp, unsigned int *year, unsigne
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.
diff --git a/include/mailutils/pop3.h b/include/mailutils/pop3.h
index 013d8c7..e9785c4 100644
--- a/include/mailutils/pop3.h
+++ b/include/mailutils/pop3.h
@@ -1,5 +1,5 @@
/* 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
@@ -18,7 +18,7 @@
#ifndef _MAILUTILS_POP3_H
#define _MAILUTILS_POP3_H
-#include <mailutils/list.h>
+#include <mailutils/iterator.h>
#include <mailutils/debug.h>
#include <mailutils/stream.h>
@@ -47,18 +47,18 @@ extern int mu_pop3_apop (mu_pop3_t pop3, const char *name, const char *
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);
@@ -81,9 +81,9 @@ extern int mu_pop3_top (mu_pop3_t pop3, unsigned int mesgno, unsigned
/* 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);
@@ -97,7 +97,7 @@ extern int mu_pop3_readline (mu_pop3_t pop3, char *buffer, size_t buflen, s
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:
diff --git a/include/mailutils/sys/Makefile.am b/include/mailutils/sys/Makefile.am
index 2f5e309..db89086 100644
--- a/include/mailutils/sys/Makefile.am
+++ b/include/mailutils/sys/Makefile.am
@@ -18,4 +18,5 @@
## 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 ba3da71..0f98dd2 100644
--- a/include/mailutils/sys/nntp.h
+++ b/include/mailutils/sys/nntp.h
@@ -150,6 +150,7 @@ struct _mu_nntp
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);
diff --git a/include/mailutils/sys/pop3.h b/include/mailutils/sys/pop3.h
index 0ba218c..5785c70 100644
--- a/include/mailutils/sys/pop3.h
+++ b/include/mailutils/sys/pop3.h
@@ -1,5 +1,5 @@
/* 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
@@ -90,6 +90,7 @@ struct _mu_pop3
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);

Return to:

Send suggestions and report system problems to the System administrator.