Commit c97b96ae c97b96ae673278d60906314001aec978bdcf4485 by Sergey Poznyakoff

Reorganize directory tree.

Move libproto/include/(*)0.h to include/mailutils/sys/\1.h
Remove libproto/include.
1 parent 81166ab6
Showing 73 changed files with 324 additions and 485 deletions
......@@ -69,7 +69,7 @@ AC_SUBST(MU_APP_LIBRARIES,'../libmu_argp/libmu_argp.a ../libmu_cfg/libmu_cfg.la
# header files. There are two exceptions, though. See NOTE before the
# AC_CONFIG_LINKS statements, below.
AC_SUBST(MU_LIB_COMMON_INCLUDES,'-I${top_builddir} -I${top_srcdir}/include -I${top_builddir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/libproto/include')
AC_SUBST(MU_LIB_COMMON_INCLUDES,'-I${top_builddir} -I${top_srcdir}/include -I${top_builddir}/include -I${top_srcdir}/mailbox')
AC_SUBST(MU_APP_COMMON_INCLUDES,'-I${srcdir} -I${top_srcdir}/include -I${top_srcdir}/lib -I${top_builddir}/lib -I${top_builddir} -I${top_builddir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/libmu_argp -I${top_srcdir}/libmu_cfg')
......@@ -1350,7 +1350,6 @@ AC_CONFIG_FILES([
libproto/pop/Makefile
libproto/nntp/Makefile
libproto/imap/Makefile
libproto/include/Makefile
maidag/Makefile
mail/Makefile
mail/testsuite/Makefile
......
......@@ -19,25 +19,42 @@
sysincludedir=$(pkgincludedir)/sys
sysinclude_HEADERS = \
amd.h\
attribute.h\
auth.h\
body.h\
dbgstream.h\
debug.h\
envelope.h\
file_stream.h\
filter.h\
folder.h\
gsasl-stream.h\
header_stream.h\
header.h\
imap.h\
iterator.h\
iostream.h\
list.h\
mailbox.h\
mailer.h\
mapfile_stream.h\
memory_stream.h\
message_stream.h\
message.h\
mime.h\
monitor.h\
nntp.h\
observer.h\
pop3.h\
prog_stream.h\
property.h\
registrar.h\
socket_stream.h\
stdio_stream.h\
streamref.h\
streamtrans.h\
stream.h\
tls-stream.h\
pop3.h\
nntp.h\
url.h\
xscript-stream.h
......
......@@ -17,10 +17,12 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#define MAX_OPEN_STREAMS 16
#ifndef _MAILUTILS_SYS_AMD_H
# define _MAILUTILS_SYS_AMD_H
# define MAX_OPEN_STREAMS 16
/* Notifications ADD_MESG. */
#define DISPATCH_ADD_MSG(mbox,mhd,n) \
# define DISPATCH_ADD_MSG(mbox,mhd,n) \
do \
{ \
int bailing = 0; \
......@@ -42,7 +44,7 @@
mu_monitor_wrlock (mbox->monitor); \
} while (0);
#define MU_AMD_SIZE_FILE_NAME ".mu-size"
# define MU_AMD_SIZE_FILE_NAME ".mu-size"
struct _amd_data;
struct _amd_message
......@@ -110,3 +112,5 @@ void amd_cleanup (void *arg);
struct _amd_message *_amd_get_message (struct _amd_data *amd, size_t msgno);
int amd_msg_lookup (struct _amd_data *amd, struct _amd_message *msg,
size_t *pret);
#endif
......
......@@ -17,12 +17,8 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _ATTRIBUTE0_H
# define _ATTRIBUTE0_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
#ifndef _MAILUTILS_SYS_ATTRIBUTE_H
# define _MAILUTILS_SYS_ATTRIBUTE_H
#include <mailutils/attribute.h>
......@@ -46,4 +42,4 @@ struct _mu_attribute
}
#endif
#endif /* _ATTRIBUTE0_H */
#endif /* _MAILUTILS_SYS_ATTRIBUTE_H */
......
......@@ -17,16 +17,12 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _AUTH0_H
#define _AUTH0_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
#ifndef _MAILUTILS_SYS_AUTH_H
# define _MAILUTILS_SYS_AUTH_H
#include <sys/types.h>
#include <mailutils/auth.h>
#include <mailutils/list.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
......@@ -67,4 +63,4 @@ struct _mu_wicket
}
#endif
#endif /* _AUTH0_H */
#endif /* _MAILUTILS_SYS_AUTH_H */
......
......@@ -17,12 +17,8 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _BODY0_H
#define _BODY0_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
#ifndef _MAILUTILS_SYS_BODY_H
# define _MAILUTILS_SYS_BODY_H
#include <mailutils/stream.h>
#include <mailutils/body.h>
......@@ -50,4 +46,4 @@ struct _mu_body
}
#endif
#endif /* _BODY0_H */
#endif /* _MAILUTILS_SYS_BODY_H */
......
......@@ -17,12 +17,8 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _DEBUG0_H
#define _DEBUG0_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
#ifndef _MAILUTILS_SYS_DEBUG_H
# define _MAILUTILS_SYS_DEBUG_H
#include <mailutils/debug.h>
#include <mailutils/stream.h>
......@@ -47,4 +43,4 @@ struct _mu_debug
}
#endif
#endif /* _DEBUG0_H */
#endif /* _MAILUTILS_SYS_DEBUG_H */
......
......@@ -17,12 +17,8 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _ENVELOPE0_H
#define _ENVELOPE0_H
#ifdef DMALLOC
#include <dmalloc.h>
#endif
#ifndef _MAILUTILS_SYS_ENVELOPE_H
# define _MAILUTILS_SYS_ENVELOPE_H
#include <mailutils/envelope.h>
......@@ -44,4 +40,4 @@ struct _mu_envelope
}
#endif
#endif /* _ENVELOPE0_H */
#endif /* _MAILUTILS_SYS_ENVELOPE_H */
......
......@@ -17,25 +17,21 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _FOLDER0_H
#define _FOLDER0_H
#ifndef _MAILUTILS_SYS_FOLDER_H
# define _MAILUTILS_SYS_FOLDER_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# include <sys/types.h>
# include <stdio.h>
#include <sys/types.h>
#include <stdio.h>
# include <mailutils/monitor.h>
# include <mailutils/folder.h>
#include <mailutils/monitor.h>
#include <mailutils/folder.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
#define MU_FOLDER_LIST 0
#define MU_FOLDER_ENUM 1
# define MU_FOLDER_LIST 0
# define MU_FOLDER_ENUM 1
struct _mu_folder
{
......@@ -70,8 +66,8 @@ struct _mu_folder
int (*_unsubscribe) (mu_folder_t, const char *);
};
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* _FOLDER0_H */
#endif /* _MAILUTILS_SYS_FOLDER_H */
......
......@@ -17,65 +17,60 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _IMAP0_H
#define _IMAP0_H
#ifndef _MAILUTILS_SYS_IMAP_H
# define _MAILUTILS_SYS_IMAP_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# include <mailutils/sys/folder.h>
# include <mailutils/sys/mailbox.h>
# include <mailutils/sys/registrar.h>
# include <mailutils/sys/auth.h>
#include <folder0.h>
#include <mailbox0.h>
#include <registrar0.h>
#include <auth0.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
#define CLEAR_STATE(f_imap) \
# define CLEAR_STATE(f_imap) \
f_imap->selected = NULL, f_imap->state = IMAP_NO_STATE
/* Clear the state and close the stream. */
#define CHECK_ERROR_CLOSE(folder, f_imap, status) \
do \
{ \
if (status != 0) \
{ \
mu_stream_close (folder->stream); \
CLEAR_STATE (f_imap); \
return status; \
} \
} \
while (0)
# define CHECK_ERROR_CLOSE(folder, f_imap, status) \
do \
{ \
if (status != 0) \
{ \
mu_stream_close (folder->stream); \
CLEAR_STATE (f_imap); \
return status; \
} \
} \
while (0)
/* Clear the state. */
#define CHECK_ERROR(f_imap, status) \
do \
{ \
if (status != 0) \
{ \
CLEAR_STATE (f_imap); \
return status; \
} \
} \
# define CHECK_ERROR(f_imap, status) \
do \
{ \
if (status != 0) \
{ \
CLEAR_STATE (f_imap); \
return status; \
} \
} \
while (0)
/* Clear the state for non recoverable error. */
#define CHECK_EAGAIN(f_imap, status) \
do \
{ \
if (status != 0) \
{ \
if (status != EAGAIN && status != EINPROGRESS && status != EINTR) \
{ \
CLEAR_STATE (f_imap); \
} \
return status; \
} \
} \
while (0)
# define CHECK_EAGAIN(f_imap, status) \
do \
{ \
if (status != 0) \
{ \
if (status != EAGAIN && status != EINPROGRESS && status != EINTR) \
{ \
CLEAR_STATE (f_imap); \
} \
return status; \
} \
} \
while (0)
struct _f_imap;
struct _m_imap;
......@@ -234,8 +229,8 @@ int imap_parse (f_imap_t);
int imap_readline (f_imap_t);
char *section_name (msg_imap_t);
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* _IMAP0_H */
#endif /* _MAILUTILS_SYS_IMAP_H */
......
......@@ -17,18 +17,14 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _ITERATOR0_H
#define _ITERATOR0_H
#ifndef _MAILUTILS_SYS_ITERATOR_H
# define _MAILUTILS_SYS_ITERATOR_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# include <mailutils/iterator.h>
#include <mailutils/iterator.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
struct _mu_iterator
{
......@@ -46,8 +42,8 @@ struct _mu_iterator
int (*itrctl) (void *owner, enum mu_itrctl_req req, void *arg);
};
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* _ITERATOR0_H */
#endif /* _MAILUTILS_SYS_ITERATOR_H */
......
......@@ -17,22 +17,18 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _LIST0_H
#define _LIST0_H
#ifndef _MAILUTILS_SYS_LIST_H
# define _MAILUTILS_SYS_LIST_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# include <sys/types.h>
#include <sys/types.h>
# include <mailutils/list.h>
# include <mailutils/monitor.h>
# include <mailutils/iterator.h>
#include <mailutils/list.h>
#include <mailutils/monitor.h>
#include <mailutils/iterator.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
struct list_data
{
......@@ -59,8 +55,8 @@ extern void _mu_list_insert_sublist (mu_list_t list,
size_t count,
int insert_before);
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* _LIST0_H */
#endif /* _MAILUTILS_SYS_LIST_H */
......
......@@ -17,23 +17,19 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _MAILBOX0_H
#define _MAILBOX0_H
#ifndef _MAILUTILS_SYS_MAILBOX_H
# define _MAILUTILS_SYS_MAILBOX_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# include <sys/types.h>
# include <stdio.h>
#include <sys/types.h>
#include <stdio.h>
# include <mailutils/monitor.h>
# include <mailutils/mailbox.h>
# include <mailutils/iterator.h>
#include <mailutils/monitor.h>
#include <mailutils/mailbox.h>
#include <mailutils/iterator.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
struct _mu_mailbox
{
......@@ -80,8 +76,8 @@ struct _mu_mailbox
int (*_get_uidls) (mu_mailbox_t, mu_list_t);
};
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* _MAILBOX0_H */
#endif /* _MAILUTILS_SYS_MAILBOX_H */
......
......@@ -17,26 +17,22 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _MAILER0_H
#define _MAILER0_H
#ifndef _MAILUTILS_SYS_MAILER_H
# define _MAILUTILS_SYS_MAILER_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# include <sys/types.h>
# include <mailutils/mailer.h>
# include <mailutils/monitor.h>
#include <sys/types.h>
#include <mailutils/mailer.h>
#include <mailutils/monitor.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
/* Default mailer URL. */
#define MAILER_URL_DEFAULT "sendmail:"
# define MAILER_URL_DEFAULT "sendmail:"
#define MAILER_LINE_BUF_SIZE 1000
# define MAILER_LINE_BUF_SIZE 1000
struct _mu_mailer
{
......@@ -61,11 +57,11 @@ struct _mu_mailer
int _mu_mailer_mailbox_init (mu_mailbox_t mailbox);
int _mu_mailer_folder_init (mu_folder_t folder MU_ARG_UNUSED);
#define MAILER_NOTIFY(mailer, type) \
# define MAILER_NOTIFY(mailer, type) \
if (mailer->observer) observer_notify (mailer->observer, type)
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* MAILER0_H */
#endif /* _MAILUTILS_SYS_MAILER_H */
......
......@@ -16,26 +16,22 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _MONITOR0_H
#define _MONITOR0_H
#ifndef _MAILUTILS_SYS_MONITOR_H
# define _MAILUTILS_SYS_MONITOR_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# include <sys/types.h>
# include <mailutils/monitor.h>
#include <sys/types.h>
#include <mailutils/monitor.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
/* FIXME: any protos? */
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* _MONITOR0_H */
......
......@@ -17,18 +17,14 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _OBSERVER0_H
#define _OBSERVER0_H
#ifndef _MAILUTILS_SYS_OBSERVER_H
# define _MAILUTILS_SYS_OBSERVER_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# include <mailutils/observer.h>
#include <mailutils/observer.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
struct _mu_observer
{
......@@ -53,10 +49,8 @@ struct _event
typedef struct _event *event_t;
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* _OBSERVER0_H */
#endif /* _MAILUTILS_SYS_OBSERVER_H */
......
......@@ -17,24 +17,20 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _PROPERTY0_H
#define _PROPERTY0_H
#ifndef _MAILUTILS_SYS_PROPERTY_H
# define _MAILUTILS_SYS_PROPERTY_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# include <errno.h>
# include <stdlib.h>
# include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
# include <mailutils/property.h>
# include <mailutils/monitor.h>
# include <mailutils/assoc.h>
#include <mailutils/property.h>
#include <mailutils/monitor.h>
#include <mailutils/assoc.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
struct property_item
{
......@@ -48,8 +44,8 @@ struct _mu_property
mu_monitor_t lock;
};
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* _PROPERTY0_H */
#endif /* _MAILUTILS_SYS_PROPERTY_H */
......
......@@ -17,14 +17,14 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _REGISTRAR0_H
#define _REGISTRAR0_H
#ifndef _MAILUTILS_SYS_REGISTRAR_H
# define _MAILUTILS_SYS_REGISTRAR_H
#include <mailutils/registrar.h>
# include <mailutils/registrar.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
/* The pop and imap defines are all wrong now, since they seem intertwined
with the old url parsing code. Also, "pop://" is not the POP scheme,
......@@ -32,67 +32,67 @@ extern "C" {
Perhaps they can be changed?
*/
#define MU_POP_PORT 110
#define MU_POP_SCHEME "pop"
#define MU_POP_SCHEME_LEN (sizeof (MU_POP_SCHEME) - 1)
# define MU_POP_PORT 110
# define MU_POP_SCHEME "pop"
# define MU_POP_SCHEME_LEN (sizeof (MU_POP_SCHEME) - 1)
extern int _url_pop_init (mu_url_t);
extern int _mailbox_pop_init (mu_mailbox_t);
extern int _folder_pop_init (mu_folder_t);
#define MU_POPS_PORT 995
#define MU_POPS_SCHEME "pops"
#define MU_POPS_SCHEME_LEN (sizeof (MU_POPS_SCHEME) - 1)
# define MU_POPS_PORT 995
# define MU_POPS_SCHEME "pops"
# define MU_POPS_SCHEME_LEN (sizeof (MU_POPS_SCHEME) - 1)
extern int _url_pops_init (mu_url_t);
extern int _mailbox_pops_init (mu_mailbox_t);
#define MU_IMAP_PORT 143
#define MU_IMAP_SCHEME "imap"
#define MU_IMAP_SCHEME_LEN (sizeof (MU_IMAP_SCHEME) - 1)
# define MU_IMAP_PORT 143
# define MU_IMAP_SCHEME "imap"
# define MU_IMAP_SCHEME_LEN (sizeof (MU_IMAP_SCHEME) - 1)
extern int _url_imap_init (mu_url_t);
extern int _mailbox_imap_init (mu_mailbox_t);
extern int _folder_imap_init (mu_folder_t);
#define MU_IMAPS_PORT 993
#define MU_IMAPS_SCHEME "imaps"
#define MU_IMAPS_SCHEME_LEN (sizeof (MU_IMAPS_SCHEME) - 1)
# define MU_IMAPS_PORT 993
# define MU_IMAPS_SCHEME "imaps"
# define MU_IMAPS_SCHEME_LEN (sizeof (MU_IMAPS_SCHEME) - 1)
extern int _url_imaps_init (mu_url_t);
extern int _mailbox_imaps_init (mu_mailbox_t);
#define MU_MBOX_SCHEME "mbox"
#define MU_MBOX_SCHEME_LEN (sizeof (MU_MBOX_SCHEME) - 1)
# define MU_MBOX_SCHEME "mbox"
# define MU_MBOX_SCHEME_LEN (sizeof (MU_MBOX_SCHEME) - 1)
extern int _mailbox_mbox_init (mu_mailbox_t);
extern int _folder_mbox_init (mu_folder_t);
#define MU_FILE_SCHEME "file"
#define MU_FILE_SCHEME_LEN (sizeof (MU_FILE_SCHEME) - 1)
# define MU_FILE_SCHEME "file"
# define MU_FILE_SCHEME_LEN (sizeof (MU_FILE_SCHEME) - 1)
#define MU_PATH_SCHEME "/"
#define MU_PATH_SCHEME_LEN (sizeof (MU_PATH_SCHEME) - 1)
# define MU_PATH_SCHEME "/"
# define MU_PATH_SCHEME_LEN (sizeof (MU_PATH_SCHEME) - 1)
extern int _mailbox_path_init (mu_mailbox_t);
extern int _folder_path_init (mu_folder_t);
#define MU_SMTP_SCHEME "smtp"
#define MU_SMTP_SCHEME_LEN (sizeof (MU_SMTP_SCHEME) - 1)
#define MU_SMTP_PORT 25
# define MU_SMTP_SCHEME "smtp"
# define MU_SMTP_SCHEME_LEN (sizeof (MU_SMTP_SCHEME) - 1)
# define MU_SMTP_PORT 25
#define MU_SENDMAIL_SCHEME "sendmail"
#define MU_SENDMAIL_SCHEME_LEN (sizeof (MU_SENDMAIL_SCHEME) - 1)
# define MU_SENDMAIL_SCHEME "sendmail"
# define MU_SENDMAIL_SCHEME_LEN (sizeof (MU_SENDMAIL_SCHEME) - 1)
extern int _mu_mailer_sendmail_init (mu_mailer_t mailer);
#define MU_PROG_SCHEME "prog"
#define MU_PROG_SCHEME_LEN (sizeof (MU_PROG_SCHEME) - 1)
extern int _mu_mailer_prog_init (mu_mailer_t);
# define MU_PROG_SCHEME "prog"
# define MU_PROG_SCHEME_LEN (sizeof (MU_PROG_SCHEME) - 1)
extern int _mu_mailer_prog_init (mu_mailer_t);
#define MU_MH_SCHEME "mh"
#define MU_MH_SCHEME_LEN (sizeof (MU_MH_SCHEME) - 1)
# define MU_MH_SCHEME "mh"
# define MU_MH_SCHEME_LEN (sizeof (MU_MH_SCHEME) - 1)
extern int _mailbox_mh_init (mu_mailbox_t mailbox);
#define MU_MAILDIR_SCHEME "maildir"
#define MU_MAILDIR_SCHEME_LEN (sizeof (MU_MAILDIR_SCHEME) - 1)
# define MU_MAILDIR_SCHEME "maildir"
# define MU_MAILDIR_SCHEME_LEN (sizeof (MU_MAILDIR_SCHEME) - 1)
extern int _mailbox_maildir_init (mu_mailbox_t mailbox);
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* _REGISTRAR0_H */
#endif /* _MAILUTILS_SYS_REGISTRAR_H */
......
......@@ -17,18 +17,14 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _URL0_H
#define _URL0_H 1
#ifndef _MAILUTILS_SYS_URL_H
# define _MAILUTILS_SYS_URL_H
#ifdef DMALLOC
# include <dmalloc.h>
#endif
# include <mailutils/url.h>
#include <mailutils/url.h>
#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif
struct _mu_url
{
......@@ -63,9 +59,8 @@ struct _mu_url
int (*_uplevel) (const mu_url_t, mu_url_t *);
};
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif
#endif /* URL_H */
#endif /* _MAILUTILS_SYS_URL_H */
......
......@@ -37,5 +37,5 @@ if MU_COND_SUPPORT_MAILDIR
MAILDIR_DIR = maildir
endif
SUBDIRS = include mbox $(POP_DIR) $(NNTP_DIR) $(IMAP_DIR) $(MH_DIR) $(MAILDIR_DIR) mailer
SUBDIRS = mbox $(POP_DIR) $(NNTP_DIR) $(IMAP_DIR) $(MH_DIR) $(MAILDIR_DIR) mailer
......
......@@ -18,7 +18,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
INCLUDES = @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/libproto/include
INCLUDES = @MU_LIB_COMMON_INCLUDES@
lib_LTLIBRARIES = libmu_imap.la
libmu_imap_la_LDFLAGS=-version-info @VI_CURRENT@:@VI_REVISION@:@VI_AGE@
......
......@@ -34,8 +34,8 @@
# include <strings.h>
#endif
#include <imap0.h>
#include <url0.h>
#include <mailutils/sys/imap.h>
#include <mailutils/sys/url.h>
#include <mailutils/auth.h>
#include <mailutils/attribute.h>
......@@ -2612,7 +2612,7 @@ imap_parse (f_imap_t f_imap)
#else
#include <stdio.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
mu_record_t mu_imap_record = NULL;
mu_record_t mu_imaps_record = NULL;
#endif /* ENABLE_IMAP */
......
......@@ -47,10 +47,10 @@
#include <mailutils/stream.h>
#include <mailutils/io.h>
#include <imap0.h>
#include <mailbox0.h>
#include <registrar0.h>
#include <url0.h>
#include <mailutils/sys/imap.h>
#include <mailutils/sys/mailbox.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/sys/url.h>
#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
......
......@@ -31,8 +31,8 @@
# include <strings.h>
#endif
#include <registrar0.h>
#include <url0.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/sys/url.h>
static void url_imap_destroy (mu_url_t url);
......
## Process this file with GNU Automake to create Makefile.in
## Copyright (C) 2000, 2001, 2002, 2007, 2009, 2010 Free Software
## Foundation, Inc.
##
## GNU Mailutils is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 3, or (at
## your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## 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. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
noinst_HEADERS = \
attribute0.h \
amd.h \
auth0.h \
body0.h \
debug0.h \
envelope0.h \
folder0.h \
iterator0.h \
imap0.h \
list0.h \
mailbox0.h \
mailer0.h \
monitor0.h \
observer0.h \
property0.h \
registrar0.h \
stream0.h \
url0.h
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2005, 2007, 2010 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 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _STREAM0_H
#define _STREAM0_H
#include <mailutils/stream.h>
#ifdef DMALLOC
#include <dmalloc.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Read buffer */
struct rbuffer
{
char *base;
char *ptr;
size_t count;
size_t bufsiz;
mu_off_t offset;
};
struct _mu_stream
{
void *owner;
mu_property_t property;
int flags;
int state;
/* Read space */
struct rbuffer rbuffer;
/* Stream pointer for sequential offset. */
mu_off_t offset;
void (*_destroy) (mu_stream_t);
int (*_open) (mu_stream_t);
int (*_close) (mu_stream_t);
int (*_get_transport2) (mu_stream_t, mu_transport_t *, mu_transport_t *);
int (*_read) (mu_stream_t, char *, size_t, mu_off_t, size_t *);
int (*_readline) (mu_stream_t, char *, size_t, mu_off_t, size_t *);
int (*_write) (mu_stream_t, const char *, size_t, mu_off_t, size_t *);
int (*_truncate) (mu_stream_t, mu_off_t);
int (*_size) (mu_stream_t, mu_off_t *);
int (*_flush) (mu_stream_t);
int (*_setbufsiz)(mu_stream_t, size_t);
int (*_strerror) (mu_stream_t, const char **);
int (*_wait) (mu_stream_t, int *pflags, struct timeval *tvp);
int (*_shutdown) (mu_stream_t, int how);
};
#ifdef __cplusplus
}
#endif
#endif /* _STREAM0_H */
......@@ -18,7 +18,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
INCLUDES = @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/libproto/include
INCLUDES = @MU_LIB_COMMON_INCLUDES@
lib_LTLIBRARIES = libmu_maildir.la
libmu_maildir_la_LDFLAGS=-version-info @VI_CURRENT@:@VI_REVISION@:@VI_AGE@
......
......@@ -28,13 +28,13 @@
#include <string.h>
#include <errno.h>
#include <folder0.h>
#include <registrar0.h>
#include <mailutils/sys/folder.h>
#include <mailutils/sys/registrar.h>
#include <maildir.h>
#include <mailutils/mutil.h>
#include <mailutils/url.h>
#include <amd.h>
#include <mailutils/sys/amd.h>
static int
_maildir_folder_init (mu_folder_t folder MU_ARG_UNUSED)
......@@ -115,6 +115,6 @@ mu_record_t mu_maildir_record = &_maildir_record;
#else
#include <stdio.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
mu_record_t mu_maildir_record = NULL;
#endif
......
......@@ -66,9 +66,9 @@
#include <mailutils/observer.h>
#include <mailutils/errno.h>
#include <mailutils/locker.h>
#include <mailbox0.h>
#include <registrar0.h>
#include <amd.h>
#include <mailutils/sys/mailbox.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/sys/amd.h>
#include <maildir.h>
#ifndef PATH_MAX
......
......@@ -17,7 +17,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
INCLUDES = @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/libproto/include
INCLUDES = @MU_LIB_COMMON_INCLUDES@
lib_LTLIBRARIES = libmu_mailer.la
libmu_mailer_la_LDFLAGS=-version-info @VI_CURRENT@:@VI_REVISION@:@VI_AGE@
......
......@@ -30,8 +30,8 @@
#include <mailutils/mailer.h>
#include <mailutils/url.h>
#include <mailutils/mutil.h>
#include <mailbox0.h>
#include <mailer0.h>
#include <mailutils/sys/mailbox.h>
#include <mailutils/sys/mailer.h>
struct remote_mbox_data
{
......
......@@ -34,9 +34,9 @@
#include <mailutils/progmailer.h>
#include <mailutils/vartab.h>
#include <url0.h>
#include <mailer0.h>
#include <registrar0.h>
#include <mailutils/sys/url.h>
#include <mailutils/sys/mailer.h>
#include <mailutils/sys/registrar.h>
static int _url_prog_init (mu_url_t);
......@@ -379,6 +379,6 @@ prog_send_message (mu_mailer_t mailer, mu_message_t msg, mu_address_t from,
#else
#include <stdio.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
mu_record_t mu_prog_record = NULL;
#endif
......
......@@ -34,9 +34,9 @@
#include <mailutils/error.h>
#include <mailutils/diag.h>
#include <url0.h>
#include <mailer0.h>
#include <registrar0.h>
#include <mailutils/sys/url.h>
#include <mailutils/sys/mailer.h>
#include <mailutils/sys/registrar.h>
#ifdef ENABLE_SMTP
......
......@@ -40,9 +40,9 @@
#include <mailutils/errno.h>
#include <mailutils/progmailer.h>
#include <url0.h>
#include <mailer0.h>
#include <registrar0.h>
#include <mailutils/sys/url.h>
#include <mailutils/sys/mailer.h>
#include <mailutils/sys/registrar.h>
static void sendmail_destroy (mu_mailer_t);
static int sendmail_open (mu_mailer_t, int);
......@@ -293,6 +293,6 @@ mu_record_t mu_sendmail_record = &_sendmail_record;
#else
#include <stdio.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
mu_record_t mu_sendmail_record = NULL;
#endif
......
......@@ -55,9 +55,9 @@
#include <mailutils/cctype.h>
#include <mailutils/cstr.h>
#include <mailer0.h>
#include <url0.h>
#include <registrar0.h>
#include <mailutils/sys/mailer.h>
#include <mailutils/sys/url.h>
#include <mailutils/sys/registrar.h>
static int _mailer_smtp_init (mu_mailer_t);
......@@ -1513,7 +1513,7 @@ smtp_readline (smtp_t smtp)
#else
#include <stdio.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
mu_record_t mu_smtp_record = NULL;
mu_record_t mu_remote_smtp_record = NULL;
#endif
......
......@@ -18,7 +18,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
INCLUDES = @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/libproto/include
INCLUDES = @MU_LIB_COMMON_INCLUDES@
lib_LTLIBRARIES = libmu_mbox.la
libmu_mbox_la_LDFLAGS=-version-info @VI_CURRENT@:@VI_REVISION@:@VI_AGE@
......
......@@ -33,8 +33,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <folder0.h>
#include <registrar0.h>
#include <mailutils/sys/folder.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/auth.h>
#include <mailutils/url.h>
......
......@@ -42,8 +42,8 @@
# include <strings.h>
#endif
#include <mailbox0.h>
#include <registrar0.h>
#include <mailutils/sys/mailbox.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/address.h>
#include <mailutils/attribute.h>
......
......@@ -18,7 +18,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
INCLUDES = @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/libproto/include
INCLUDES = @MU_LIB_COMMON_INCLUDES@
lib_LTLIBRARIES = libmu_mh.la
libmu_mh_la_LDFLAGS=-version-info @VI_CURRENT@:@VI_REVISION@:@VI_AGE@
......
......@@ -31,10 +31,10 @@
#include <unistd.h>
#include <dirent.h>
#include <url0.h>
#include <folder0.h>
#include <registrar0.h>
#include <amd.h>
#include <mailutils/sys/url.h>
#include <mailutils/sys/folder.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/sys/amd.h>
#include <mailutils/mutil.h>
#include <mailutils/cctype.h>
......@@ -155,6 +155,6 @@ mu_record_t mu_mh_record = &_mh_record;
#else
#include <stdio.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
mu_record_t mu_mh_record = NULL;
#endif
......
......@@ -64,9 +64,9 @@
#include <mailutils/observer.h>
#include <mailutils/io.h>
#include <mailutils/cctype.h>
#include <mailbox0.h>
#include <registrar0.h>
#include <amd.h>
#include <mailutils/sys/mailbox.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/sys/amd.h>
struct _mh_message
{
......
......@@ -18,7 +18,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
INCLUDES = @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/libproto/include
INCLUDES = @MU_LIB_COMMON_INCLUDES@
lib_LTLIBRARIES = libmu_nntp.la
libmu_nntp_la_LDFLAGS=-version-info @VI_CURRENT@:@VI_REVISION@:@VI_AGE@
......
......@@ -36,8 +36,8 @@
#include <mailutils/registrar.h>
#include <mailutils/url.h>
#include <folder0.h>
#include "nntp0.h"
#include <mailutils/sys/folder.h>
#include "mailutils/sys/nntp.h"
/* We export url parsing and the initialisation of
the mailbox, via the register entry/record. */
......@@ -194,6 +194,6 @@ nntp_folder_list (mu_folder_t folder, const char *ref, void *pat, int flags,
}
#else
#include <stdio.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
mu_record_t mu_nntp_record = NULL;
#endif
......
......@@ -51,9 +51,9 @@
#include <mailutils/url.h>
#include <mailutils/nntp.h>
#include <folder0.h>
#include <mailbox0.h>
#include "nntp0.h"
#include <mailutils/sys/folder.h>
#include <mailutils/sys/mailbox.h>
#include "mailutils/sys/nntp.h"
/* Functions/Methods that implements the mu_mailbox_t API. */
......
......@@ -32,7 +32,7 @@
#include <mailutils/nntp.h>
#include <url0.h>
#include <mailutils/sys/url.h>
static void url_nntp_destroy (mu_url_t url);
......
......@@ -18,7 +18,7 @@
## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
INCLUDES = @MU_LIB_COMMON_INCLUDES@ -I${top_srcdir}/libproto/include
INCLUDES = @MU_LIB_COMMON_INCLUDES@
lib_LTLIBRARIES = libmu_pop.la
libmu_pop_la_LDFLAGS=-version-info @VI_CURRENT@:@VI_REVISION@:@VI_AGE@
......
......@@ -37,9 +37,9 @@
#include <mailutils/cstr.h>
#include <mailutils/cctype.h>
#include <folder0.h>
#include <registrar0.h>
#include <url0.h>
#include <mailutils/sys/folder.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/sys/url.h>
/* We export url parsing and the initialisation of
the mailbox, via the register entry/record. */
......@@ -160,7 +160,7 @@ folder_pop_get_authority (mu_folder_t folder, mu_authority_t *pauth)
#else
#include <stdio.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
mu_record_t mu_pop_record = NULL;
mu_record_t mu_pops_record = NULL;
#endif /* ENABLE_POP */
......
......@@ -58,10 +58,10 @@
#include <mailutils/cstr.h>
#include <mailutils/cctype.h>
#include <folder0.h>
#include <mailbox0.h>
#include <registrar0.h>
#include <url0.h>
#include <mailutils/sys/folder.h>
#include <mailutils/sys/mailbox.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/sys/url.h>
#define PROP_RFC822 1
......
......@@ -31,8 +31,8 @@
# include <strings.h>
#endif
#include <url0.h>
#include <registrar0.h>
#include <mailutils/sys/url.h>
#include <mailutils/sys/registrar.h>
static void url_pop_destroy (mu_url_t url);
......
......@@ -69,10 +69,10 @@
#include <mailutils/url.h>
#include <mailutils/observer.h>
#include <mailutils/sys/stream.h>
#include <mailbox0.h>
#include <registrar0.h>
#include <url0.h>
#include <amd.h>
#include <mailutils/sys/mailbox.h>
#include <mailutils/sys/registrar.h>
#include <mailutils/sys/url.h>
#include <mailutils/sys/amd.h>
static void amd_destroy (mu_mailbox_t mailbox);
static int amd_open (mu_mailbox_t, int);
......
......@@ -29,7 +29,7 @@
#include <mailutils/iterator.h>
#include <mailutils/mutil.h>
#include <mailutils/cstr.h>
#include <iterator0.h>
#include <mailutils/sys/iterator.h>
/* |hash_size| defines a sequence of symbol table sizes. These are prime
numbers, the distance between each pair of them grows exponentially,
......
......@@ -33,7 +33,7 @@
#include <mailutils/errno.h>
#include <mailutils/mutil.h>
#include <mailutils/cstr.h>
#include <attribute0.h>
#include <mailutils/sys/attribute.h>
int
mu_attribute_create (mu_attribute_t *pattr, void *owner)
......
......@@ -27,7 +27,7 @@
#include <stdlib.h>
#include <mailutils/errno.h>
#include <auth0.h>
#include <mailutils/sys/auth.h>
static int
_authenticate_null (mu_authority_t auth MU_ARG_UNUSED)
......
......@@ -34,7 +34,7 @@
#include <mailutils/mutil.h>
#include <mailutils/errno.h>
#include <mailutils/sys/stream.h>
#include <body0.h>
#include <mailutils/sys/body.h>
#define BODY_MODIFIED 0x10000
......
......@@ -28,7 +28,7 @@
#include <mailutils/errno.h>
#include <mailutils/nls.h>
#include <debug0.h>
#include <mailutils/sys/debug.h>
mu_debug_printer_fp mu_debug_default_printer = mu_debug_stderr_printer;
......
......@@ -25,7 +25,7 @@
#include <string.h>
#include <mailutils/errno.h>
#include <mailutils/mutil.h>
#include <envelope0.h>
#include <mailutils/sys/envelope.h>
int
mu_envelope_create (mu_envelope_t *penvelope, void *owner)
......
......@@ -37,7 +37,7 @@
#include <mailutils/url.h>
#include <mailutils/errno.h>
#include <folder0.h>
#include <mailutils/sys/folder.h>
/* Internal folder list. */
static mu_list_t known_folder_list;
......
......@@ -24,8 +24,8 @@
#include <errno.h>
#include <stdlib.h>
#include <list0.h>
#include <iterator0.h>
#include <mailutils/sys/list.h>
#include <mailutils/sys/iterator.h>
#include <mailutils/errno.h>
int
......
......@@ -25,8 +25,8 @@
#include <stdlib.h>
#include <string.h>
#include <list0.h>
#include <iterator0.h>
#include <mailutils/sys/list.h>
#include <mailutils/sys/iterator.h>
#include <mailutils/errno.h>
#define DESTROY_ITEM(list, elt) \
......
......@@ -25,8 +25,8 @@
#include <stdlib.h>
#include <string.h>
#include <list0.h>
#include <iterator0.h>
#include <mailutils/sys/list.h>
#include <mailutils/sys/iterator.h>
#include <mailutils/errno.h>
void
......
......@@ -41,8 +41,8 @@
#include <mailutils/message.h>
#include <mailutils/mutil.h>
#include <mailbox0.h>
#include <url0.h>
#include <mailutils/sys/mailbox.h>
#include <mailutils/sys/url.h>
static int
mailbox_folder_create (mu_mailbox_t mbox, const char *name,
......
......@@ -50,7 +50,7 @@
#include <mailutils/mime.h>
#include <mailutils/io.h>
#include <mailer0.h>
#include <mailutils/sys/mailer.h>
static char *mailer_url_default;
......
......@@ -40,7 +40,7 @@
#include <mailutils/folder.h>
#include <mailutils/auth.h>
#include <mailbox0.h>
#include <mailutils/sys/mailbox.h>
char *mu_ticket_file = "~/.mu-tickets";
......
......@@ -29,7 +29,7 @@
#include <mailutils/error.h>
#include <mailutils/iterator.h>
#include <mailbox0.h>
#include <mailutils/sys/mailbox.h>
struct mailbox_iterator
{
......
......@@ -34,7 +34,7 @@
#include <errno.h>
#include <stdlib.h>
#include <monitor0.h>
#include <mailutils/sys/monitor.h>
#include <mailutils/errno.h>
#ifdef WITH_PTHREAD
......
......@@ -64,7 +64,7 @@
#include <mailutils/cctype.h>
#include <mailutils/cstr.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
/* convert a sequence of hex characters into an integer */
......
......@@ -27,7 +27,7 @@
#include <mailutils/list.h>
#include <mailutils/iterator.h>
#include <mailutils/errno.h>
#include <observer0.h>
#include <mailutils/sys/observer.h>
int
mu_observer_create (mu_observer_t *pobserver, void *owner)
......
......@@ -24,7 +24,7 @@
# include <strings.h>
#endif
#include <property0.h>
#include <mailutils/sys/property.h>
#include <mailutils/errno.h>
#include <mailutils/assoc.h>
#include <stdlib.h>
......
......@@ -36,7 +36,7 @@
#include <mailutils/error.h>
#include <mailutils/url.h>
#include <mailutils/mutil.h>
#include <registrar0.h>
#include <mailutils/sys/registrar.h>
/* NOTE: We will leak here since the monitor and the registrar will never
be released. That's ok we can live with this, it's only done once. */
......
......@@ -32,7 +32,7 @@
#include <mailutils/mutil.h>
#include <mailutils/errno.h>
#include <mailutils/secret.h>
#include <auth0.h>
#include <mailutils/sys/auth.h>
static void
echo_off (struct termios *stored_settings)
......
......@@ -35,7 +35,7 @@
#include <mailutils/secret.h>
#include <mailutils/cctype.h>
#include <mailutils/cstr.h>
#include <url0.h>
#include <mailutils/sys/url.h>
#define AC2(a,b) a ## b
#define AC4(a,b,c,d) a ## b ## c ## d
......
......@@ -36,8 +36,8 @@
#include <mailutils/mu_auth.h>
#include <mailutils/stream.h>
#include <auth0.h>
#include <url0.h>
#include <mailutils/sys/auth.h>
#include <mailutils/sys/url.h>
int
mu_wicket_create (mu_wicket_t *pwicket)
......