Commit bc3a57b1 bc3a57b198f5f01ac3407d42187e8db292f720da by Alain Magloire

Update prototypes.

1 parent aecae396
......@@ -22,9 +22,8 @@
#ifndef _MAILUTILS_FILTER_H
#define _MAILUTILS_FILTER_H
#include <stdlib.h>
#include <mailutils/list.h>
#include <mailutils/monitor.h>
#include <mailutils/iterator.h>
#include <mailutils/property.h>
#include <mailutils/stream.h>
......@@ -40,28 +39,43 @@
extern "C" {
#endif
/* Type. */
#define MU_FILTER_DECODE 0
#define MU_FILTER_ENCODE 1
/* Direction. */
#define MU_FILTER_READ MU_STREAM_READ
#define MU_FILTER_WRITE MU_STREAM_WRITE
#define MU_FILTER_RDWR MU_STREAM_RDWR
struct _filter;
typedef struct _filter * filter_t;
struct _filter
struct _filter_record;
typedef struct _filter_record * filter_record_t;
struct _filter_record
{
const char *encoding;
int (*_init) __P ((filter_t));
int (*_read) __P ((filter_t, char *, size_t, off_t, size_t *));
int (*_readline) __P ((filter_t, char *, size_t, off_t, size_t *));
int (*_write) __P ((filter_t, const char *, size_t, off_t, size_t *));
void (*_destroy) __P ((filter_t));
stream_t stream;
stream_t filter_stream;
property_t property;
int direction;
const char *name;
int (*_filter) __P ((filter_t));
void *data;
/* Stub function return the fields. */
int (*_is_filter) __P ((filter_record_t, const char *));
int (*_get_filter) __P ((filter_record_t, int (*(*_filter)) __P ((filter_t))));
};
extern int filter_create __P ((stream_t *, stream_t, const char *));
extern int filter_create __P ((stream_t *, stream_t, const char*, int, int));
extern int filter_get_list __P ((list_t *));
extern filter_t rfc822_filter;
/* List of defaults. */
extern filter_record_t rfc822_filter;
extern filter_record_t qp_filter; /* quoted-printable. */
extern filter_record_t base64_filter;
extern filter_record_t binary_filter;
extern filter_record_t bit8_filter;
extern filter_record_t bit7_filter;
#ifdef __cplusplus
}
......
......@@ -54,6 +54,7 @@ extern void message_destroy __P ((message_t *, void *owner));
extern void * message_get_owner __P ((message_t));
extern int message_is_modified __P ((message_t));
extern int message_clear_modified __P ((message_t));
extern int message_get_mailbox __P ((message_t, mailbox_t *));
extern int message_set_mailbox __P ((message_t, mailbox_t, void *));
extern int message_ref __P ((message_t));
......
......@@ -67,6 +67,7 @@ extern int parse822_quoted_pair __P ((const char** p, const char* e, char** q
extern int parse822_quoted_string __P ((const char** p, const char* e, char** qstr));
extern int parse822_word __P ((const char** p, const char* e, char** word));
extern int parse822_phrase __P ((const char** p, const char* e, char** phrase));
extern int parse822_d_text __P ((const char** p, const char* e, char** dtext));
/* From RFC 822, 6.1 Address Specification Syntax */
......
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published by
......@@ -49,6 +49,12 @@ extern int url_get_path __P ((const url_t, char *, size_t, size_t *));
extern int url_get_query __P ((const url_t, char *, size_t, size_t *));
extern const char* url_to_string __P ((const url_t));
extern int url_is_same_scheme __P ((url_t, url_t));
extern int url_is_same_user __P ((url_t, url_t));
extern int url_is_same_path __P ((url_t, url_t));
extern int url_is_same_host __P ((url_t, url_t));
extern int url_is_same_port __P ((url_t, url_t));
#ifdef __cplusplus
}
#endif
......