Commit bc3a57b1 bc3a57b198f5f01ac3407d42187e8db292f720da by Alain Magloire

Update prototypes.

1 parent aecae396
...@@ -22,9 +22,8 @@ ...@@ -22,9 +22,8 @@
22 #ifndef _MAILUTILS_FILTER_H 22 #ifndef _MAILUTILS_FILTER_H
23 #define _MAILUTILS_FILTER_H 23 #define _MAILUTILS_FILTER_H
24 24
25 #include <stdlib.h>
25 #include <mailutils/list.h> 26 #include <mailutils/list.h>
26 #include <mailutils/monitor.h>
27 #include <mailutils/iterator.h>
28 #include <mailutils/property.h> 27 #include <mailutils/property.h>
29 #include <mailutils/stream.h> 28 #include <mailutils/stream.h>
30 29
...@@ -40,28 +39,43 @@ ...@@ -40,28 +39,43 @@
40 extern "C" { 39 extern "C" {
41 #endif 40 #endif
42 41
42 /* Type. */
43 #define MU_FILTER_DECODE 0
44 #define MU_FILTER_ENCODE 1
45
46 /* Direction. */
47 #define MU_FILTER_READ MU_STREAM_READ
48 #define MU_FILTER_WRITE MU_STREAM_WRITE
49 #define MU_FILTER_RDWR MU_STREAM_RDWR
50
43 struct _filter; 51 struct _filter;
44 typedef struct _filter * filter_t; 52 typedef struct _filter * filter_t;
45 53
46 struct _filter 54 struct _filter_record;
55 typedef struct _filter_record * filter_record_t;
56
57 struct _filter_record
47 { 58 {
48 const char *encoding; 59 const char *name;
49 int (*_init) __P ((filter_t)); 60 int (*_filter) __P ((filter_t));
50 int (*_read) __P ((filter_t, char *, size_t, off_t, size_t *));
51 int (*_readline) __P ((filter_t, char *, size_t, off_t, size_t *));
52 int (*_write) __P ((filter_t, const char *, size_t, off_t, size_t *));
53 void (*_destroy) __P ((filter_t));
54 stream_t stream;
55 stream_t filter_stream;
56 property_t property;
57 int direction;
58 void *data; 61 void *data;
62
63 /* Stub function return the fields. */
64 int (*_is_filter) __P ((filter_record_t, const char *));
65 int (*_get_filter) __P ((filter_record_t, int (*(*_filter)) __P ((filter_t))));
59 }; 66 };
60 67
61 extern int filter_create __P ((stream_t *, stream_t, const char *)); 68
69 extern int filter_create __P ((stream_t *, stream_t, const char*, int, int));
62 extern int filter_get_list __P ((list_t *)); 70 extern int filter_get_list __P ((list_t *));
63 71
64 extern filter_t rfc822_filter; 72 /* List of defaults. */
73 extern filter_record_t rfc822_filter;
74 extern filter_record_t qp_filter; /* quoted-printable. */
75 extern filter_record_t base64_filter;
76 extern filter_record_t binary_filter;
77 extern filter_record_t bit8_filter;
78 extern filter_record_t bit7_filter;
65 79
66 #ifdef __cplusplus 80 #ifdef __cplusplus
67 } 81 }
......
...@@ -54,6 +54,7 @@ extern void message_destroy __P ((message_t *, void *owner)); ...@@ -54,6 +54,7 @@ extern void message_destroy __P ((message_t *, void *owner));
54 extern void * message_get_owner __P ((message_t)); 54 extern void * message_get_owner __P ((message_t));
55 extern int message_is_modified __P ((message_t)); 55 extern int message_is_modified __P ((message_t));
56 extern int message_clear_modified __P ((message_t)); 56 extern int message_clear_modified __P ((message_t));
57 extern int message_get_mailbox __P ((message_t, mailbox_t *));
57 extern int message_set_mailbox __P ((message_t, mailbox_t, void *)); 58 extern int message_set_mailbox __P ((message_t, mailbox_t, void *));
58 59
59 extern int message_ref __P ((message_t)); 60 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 ...@@ -67,6 +67,7 @@ extern int parse822_quoted_pair __P ((const char** p, const char* e, char** q
67 extern int parse822_quoted_string __P ((const char** p, const char* e, char** qstr)); 67 extern int parse822_quoted_string __P ((const char** p, const char* e, char** qstr));
68 extern int parse822_word __P ((const char** p, const char* e, char** word)); 68 extern int parse822_word __P ((const char** p, const char* e, char** word));
69 extern int parse822_phrase __P ((const char** p, const char* e, char** phrase)); 69 extern int parse822_phrase __P ((const char** p, const char* e, char** phrase));
70 extern int parse822_d_text __P ((const char** p, const char* e, char** dtext));
70 71
71 /* From RFC 822, 6.1 Address Specification Syntax */ 72 /* From RFC 822, 6.1 Address Specification Syntax */
72 73
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU mailutils - a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Library General Public License as published by 5 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 *)); ...@@ -49,6 +49,12 @@ extern int url_get_path __P ((const url_t, char *, size_t, size_t *));
49 extern int url_get_query __P ((const url_t, char *, size_t, size_t *)); 49 extern int url_get_query __P ((const url_t, char *, size_t, size_t *));
50 extern const char* url_to_string __P ((const url_t)); 50 extern const char* url_to_string __P ((const url_t));
51 51
52 extern int url_is_same_scheme __P ((url_t, url_t));
53 extern int url_is_same_user __P ((url_t, url_t));
54 extern int url_is_same_path __P ((url_t, url_t));
55 extern int url_is_same_host __P ((url_t, url_t));
56 extern int url_is_same_port __P ((url_t, url_t));
57
52 #ifdef __cplusplus 58 #ifdef __cplusplus
53 } 59 }
54 #endif 60 #endif
......