remove private and public directory.
Showing
41 changed files
with
18 additions
and
2248 deletions
... | @@ -35,6 +35,7 @@ extern "C" { | ... | @@ -35,6 +35,7 @@ extern "C" { |
35 | struct _attribute | 35 | struct _attribute |
36 | { | 36 | { |
37 | void *owner; | 37 | void *owner; |
38 | |||
38 | int flags; | 39 | int flags; |
39 | int (*_get_flags) __P ((attribute_t, int *)); | 40 | int (*_get_flags) __P ((attribute_t, int *)); |
40 | int (*_set_flags) __P ((attribute_t, int)); | 41 | int (*_set_flags) __P ((attribute_t, int)); | ... | ... |
... | @@ -36,6 +36,7 @@ extern "C" { | ... | @@ -36,6 +36,7 @@ extern "C" { |
36 | struct _auth | 36 | struct _auth |
37 | { | 37 | { |
38 | void *owner; | 38 | void *owner; |
39 | |||
39 | int (*_prologue) (auth_t); | 40 | int (*_prologue) (auth_t); |
40 | int (*_authenticate) (auth_t, char **user, char **passwd); | 41 | int (*_authenticate) (auth_t, char **user, char **passwd); |
41 | int (*_epilogue) (auth_t); | 42 | int (*_epilogue) (auth_t); | ... | ... |
... | @@ -50,6 +50,7 @@ struct _header | ... | @@ -50,6 +50,7 @@ struct _header |
50 | { | 50 | { |
51 | /* Owner. */ | 51 | /* Owner. */ |
52 | void *owner; | 52 | void *owner; |
53 | |||
53 | /* Data. */ | 54 | /* Data. */ |
54 | char *temp_blurb; | 55 | char *temp_blurb; |
55 | size_t temp_blurb_len; | 56 | size_t temp_blurb_len; |
... | @@ -62,6 +63,8 @@ struct _header | ... | @@ -62,6 +63,8 @@ struct _header |
62 | stream_t stream; | 63 | stream_t stream; |
63 | int (*_get_value) __P ((header_t, const char *, char *, size_t , size_t *)); | 64 | int (*_get_value) __P ((header_t, const char *, char *, size_t , size_t *)); |
64 | int (*_set_value) __P ((header_t, const char *, const char *, int)); | 65 | int (*_set_value) __P ((header_t, const char *, const char *, int)); |
66 | int (*_lines) __P ((header_t, size_t *)); | ||
67 | int (*_size) __P ((header_t, size_t *)); | ||
65 | }; | 68 | }; |
66 | 69 | ||
67 | #ifdef _cplusplus | 70 | #ifdef _cplusplus | ... | ... |
... | @@ -40,31 +40,33 @@ extern "C" { | ... | @@ -40,31 +40,33 @@ extern "C" { |
40 | # endif | 40 | # endif |
41 | #endif /*__P */ | 41 | #endif /*__P */ |
42 | 42 | ||
43 | /* forward declaration */ | ||
44 | struct _message | 43 | struct _message |
45 | { | 44 | { |
45 | /* Who is the owner. */ | ||
46 | void *owner; | ||
47 | |||
46 | header_t header; | 48 | header_t header; |
47 | stream_t stream; | 49 | stream_t stream; |
48 | body_t body; | 50 | body_t body; |
49 | attribute_t attribute; | 51 | attribute_t attribute; |
50 | mime_t mime; | 52 | mime_t mime; |
51 | 53 | ||
52 | /* who is the owner */ | ||
53 | void *owner; | ||
54 | |||
55 | event_t event; | 54 | event_t event; |
56 | size_t event_num; | 55 | size_t event_num; |
57 | 56 | ||
58 | /* for message_write */ | 57 | /* Holder for message_write. */ |
59 | char *hdr_buf; | 58 | char *hdr_buf; |
60 | size_t hdr_buflen; | 59 | size_t hdr_buflen; |
61 | int hdr_done; | 60 | int hdr_done; |
62 | 61 | ||
63 | int (*_from) __P ((message_t msg, char *, size_t, size_t *)); | 62 | int (*_from) __P ((message_t, char *, size_t, size_t *)); |
64 | int (*_received) __P ((message_t msg, char *, size_t, size_t *)); | 63 | int (*_received) __P ((message_t, char *, size_t, size_t *)); |
65 | int (*_get_uidl) __P ((message_t msg, char *, size_t, size_t *)); | 64 | int (*_get_uidl) __P ((message_t, char *, size_t, size_t *)); |
66 | int (*_get_num_parts) __P ((message_t, size_t *nparts)); | 65 | int (*_get_num_parts) __P ((message_t, size_t *)); |
67 | int (*_get_part) __P ((message_t, size_t part, message_t *msg)); | 66 | int (*_get_part) __P ((message_t, size_t, message_t *)); |
67 | int (*_is_multipart) __P ((message_t, int *)); | ||
68 | int (*_lines) __P ((message_t, size_t *)); | ||
69 | int (*_size) __P ((message_t, size_t *)); | ||
68 | }; | 70 | }; |
69 | 71 | ||
70 | #ifdef _cplusplus | 72 | #ifdef _cplusplus | ... | ... |
mailbox/include/private/Makefile.am
deleted
100644 → 0
mailbox/include/private/attribute0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _ATTRIBUTE0_H | ||
19 | # define _ATTRIBUTE0_H | ||
20 | |||
21 | #include <attribute.h> | ||
22 | |||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
27 | #ifndef __P | ||
28 | # ifdef __STDC__ | ||
29 | # define __P(args) args | ||
30 | # else | ||
31 | # define __P(args) () | ||
32 | # endif | ||
33 | #endif /*__P */ | ||
34 | |||
35 | struct _attribute | ||
36 | { | ||
37 | void *owner; | ||
38 | size_t flags; | ||
39 | int (*_get_flags) __P ((attribute_t, int *)); | ||
40 | int (*_set_flags) __P ((attribute_t, int)); | ||
41 | int (*_unset_flags) __P ((attribute_t, int)); | ||
42 | }; | ||
43 | |||
44 | #ifdef __cplusplus | ||
45 | } | ||
46 | #endif | ||
47 | |||
48 | #endif /* _ATTRIBUTE0_H */ |
mailbox/include/private/auth0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _AUTH0_H | ||
19 | #define _AUTH0_H | ||
20 | |||
21 | #include <auth.h> | ||
22 | #include <sys/types.h> | ||
23 | |||
24 | #ifndef __P | ||
25 | #ifdef __STDC__ | ||
26 | #define __P(args) args | ||
27 | #else | ||
28 | #define __P(args) () | ||
29 | #endif | ||
30 | #endif /*__P */ | ||
31 | |||
32 | #ifdef _cplusplus | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
36 | struct _auth | ||
37 | { | ||
38 | void *owner; | ||
39 | int (*_prologue) (auth_t); | ||
40 | int (*_authenticate) (auth_t, char **user, char **passwd); | ||
41 | int (*_epilogue) (auth_t); | ||
42 | }; | ||
43 | |||
44 | |||
45 | #ifdef _cplusplus | ||
46 | } | ||
47 | #endif | ||
48 | |||
49 | #endif /* _AUTH0_H */ |
mailbox/include/private/body0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _BODY0_H | ||
19 | #define _BODY0_H | ||
20 | |||
21 | #include <io.h> | ||
22 | #include <body.h> | ||
23 | |||
24 | #include <stdio.h> | ||
25 | #include <sys/types.h> | ||
26 | |||
27 | #ifndef __P | ||
28 | # ifdef __STDC__ | ||
29 | # define __P(args) args | ||
30 | # else | ||
31 | # define __P(args) () | ||
32 | # endif | ||
33 | #endif /* __P */ | ||
34 | |||
35 | #ifdef _cplusplus | ||
36 | extern "C" { | ||
37 | #endif | ||
38 | |||
39 | struct _body | ||
40 | { | ||
41 | void *owner; | ||
42 | |||
43 | /* it's better and more portable to use stdio */ | ||
44 | FILE *file; | ||
45 | char *filename; | ||
46 | stream_t stream; | ||
47 | int (*_size) (body_t, size_t*); | ||
48 | int (*_lines) (body_t, size_t*); | ||
49 | }; | ||
50 | |||
51 | #ifdef _cplusplus | ||
52 | } | ||
53 | #endif | ||
54 | |||
55 | #endif /* _BODY0_H */ |
mailbox/include/private/cpystr.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _CPYSTR_H | ||
19 | #define _CPYSTR_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | |||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
27 | #ifndef __P | ||
28 | # if __STDC__ | ||
29 | # define __P(x) x | ||
30 | # else | ||
31 | # define __P(x) | ||
32 | # endif | ||
33 | #endif | ||
34 | extern size_t _cpystr __P ((char *dst, const char *src, size_t size)); | ||
35 | |||
36 | #ifdef __cplusplus | ||
37 | } | ||
38 | #endif | ||
39 | |||
40 | #endif |
mailbox/include/private/header0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _HEADER0_H | ||
19 | #define _HEADER0_H | ||
20 | |||
21 | #include <header.h> | ||
22 | #include <io0.h> | ||
23 | #include <sys/types.h> | ||
24 | |||
25 | #ifdef _cplusplus | ||
26 | extern "C" { | ||
27 | #endif | ||
28 | |||
29 | #ifndef __P | ||
30 | # ifdef __STDC__ | ||
31 | # define __P(args) args | ||
32 | # else | ||
33 | # define __P(args) () | ||
34 | # endif | ||
35 | #endif /*__P */ | ||
36 | |||
37 | /* The structure members are offset that point to the begin/end of header | ||
38 | fields. */ | ||
39 | struct _hdr | ||
40 | { | ||
41 | char *fn; | ||
42 | char *fn_end; | ||
43 | char *fv; | ||
44 | char *fv_end; | ||
45 | }; | ||
46 | |||
47 | /* The blurb member represents the headers, hdr_count the number of distinct | ||
48 | header field and the layout is done by struct_hdr *hdr. */ | ||
49 | struct _header | ||
50 | { | ||
51 | /* Owner. */ | ||
52 | void *owner; | ||
53 | /* Data. */ | ||
54 | char *temp_blurb; | ||
55 | size_t temp_blurb_len; | ||
56 | char *blurb; | ||
57 | size_t blurb_len; | ||
58 | size_t hdr_count; | ||
59 | struct _hdr *hdr; | ||
60 | |||
61 | /* Streams. */ | ||
62 | stream_t stream; | ||
63 | int (*_get_value) __P ((header_t, const char *, char *, size_t , size_t *)); | ||
64 | int (*_set_value) __P ((header_t, const char *, const char *, int)); | ||
65 | }; | ||
66 | |||
67 | #ifdef _cplusplus | ||
68 | } | ||
69 | #endif | ||
70 | |||
71 | #endif /* _HEADER0_H */ |
mailbox/include/private/io0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _IO0_H | ||
19 | # define _IO0_H | ||
20 | |||
21 | #include <io.h> | ||
22 | |||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
27 | #ifndef __P | ||
28 | # ifdef __STDC__ | ||
29 | # define __P(args) args | ||
30 | # else | ||
31 | # define __P(args) () | ||
32 | # endif | ||
33 | #endif /*__P */ | ||
34 | |||
35 | struct _stream | ||
36 | { | ||
37 | void *owner; | ||
38 | int flags; | ||
39 | int state; | ||
40 | void (*_destroy) __P ((stream_t)); | ||
41 | int (*_open) __P ((stream_t, const char *, int port, int flags)); | ||
42 | int (*_close) __P ((stream_t)); | ||
43 | int (*_get_fd) __P ((stream_t, int *)); | ||
44 | int (*_read) __P ((stream_t, char *, size_t, off_t, size_t *)); | ||
45 | int (*_readline) __P ((stream_t, char *, size_t, off_t, size_t *)); | ||
46 | int (*_write) __P ((stream_t, const char *, size_t, off_t, size_t *)); | ||
47 | int (*_truncate) __P ((stream_t, off_t)); | ||
48 | int (*_size) __P ((stream_t, off_t *)); | ||
49 | int (*_flush) __P ((stream_t)); | ||
50 | }; | ||
51 | |||
52 | #ifdef __cplusplus | ||
53 | } | ||
54 | #endif | ||
55 | |||
56 | #endif /* _IO0_H */ |
mailbox/include/private/mailbox0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MAILBOX0_H | ||
19 | #define _MAILBOX0_H | ||
20 | |||
21 | #include <mailbox.h> | ||
22 | #include <event.h> | ||
23 | |||
24 | #include <sys/types.h> | ||
25 | #include <stdio.h> | ||
26 | |||
27 | #ifdef __cplusplus | ||
28 | extern "C" { | ||
29 | #endif | ||
30 | |||
31 | #ifndef __P | ||
32 | # ifdef __STDC__ | ||
33 | # define __P(args) args | ||
34 | # else | ||
35 | # define __P(args) () | ||
36 | # endif | ||
37 | #endif /*__P */ | ||
38 | |||
39 | struct _mailbox | ||
40 | { | ||
41 | /* Data */ | ||
42 | char *name; | ||
43 | auth_t auth; | ||
44 | locker_t locker; | ||
45 | stream_t stream; | ||
46 | url_t url; | ||
47 | |||
48 | /* register events */ | ||
49 | event_t event; | ||
50 | size_t event_num; | ||
51 | |||
52 | /* debug information */ | ||
53 | int debug_level; | ||
54 | void *debug_arg; | ||
55 | char *debug_buffer; | ||
56 | size_t debug_bufsize; | ||
57 | int (*debug_print) __P ((void *arg, const char *, size_t)); | ||
58 | |||
59 | /* Back pointer to the specific mailbox */ | ||
60 | void *data; | ||
61 | |||
62 | /* Public methods */ | ||
63 | |||
64 | int (*_create) __P ((mailbox_t *, const char *)); | ||
65 | void (*_destroy) __P ((mailbox_t *)); | ||
66 | |||
67 | int (*_open) __P ((mailbox_t, int flag)); | ||
68 | int (*_close) __P ((mailbox_t)); | ||
69 | |||
70 | /* messages */ | ||
71 | int (*_get_message) __P ((mailbox_t, size_t msgno, message_t *msg)); | ||
72 | int (*_append_message) __P ((mailbox_t, message_t msg)); | ||
73 | int (*_messages_count) __P ((mailbox_t, size_t *num)); | ||
74 | int (*_expunge) __P ((mailbox_t)); | ||
75 | |||
76 | int (*_scan) __P ((mailbox_t, size_t msgno, size_t *count)); | ||
77 | int (*_is_updated) __P ((mailbox_t)); | ||
78 | |||
79 | int (*_size) __P ((mailbox_t, off_t *size)); | ||
80 | |||
81 | /* private */ | ||
82 | int (*_num_deleted) __P ((mailbox_t, size_t *)); | ||
83 | }; | ||
84 | |||
85 | /* private */ | ||
86 | extern int mailbox_num_deleted __P ((mailbox_t, size_t *)); | ||
87 | |||
88 | extern int mailbox_notification __P ((mailbox_t mbox, size_t type)); | ||
89 | |||
90 | extern int mailbox_debug __P ((mailbox_t, int level, const char *fmt, ...)); | ||
91 | |||
92 | #ifdef __cplusplus | ||
93 | } | ||
94 | #endif | ||
95 | |||
96 | #endif /* _MAILBOX0_H */ |
mailbox/include/private/mailer0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MAILER0_H | ||
19 | #define _MAILER0_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | #include <mailer.h> | ||
23 | |||
24 | #ifdef _cplusplus | ||
25 | extern "C" { | ||
26 | #endif | ||
27 | |||
28 | #ifndef __P | ||
29 | # ifdef __STDC__ | ||
30 | # define __P(args) args | ||
31 | # else | ||
32 | # define __P(args) () | ||
33 | # endif | ||
34 | #endif /*__P */ | ||
35 | |||
36 | // mailer states | ||
37 | #define MAILER_STATE_HDR 1 | ||
38 | #define MAILER_STATE_MSG 2 | ||
39 | #define MAILER_STATE_COMPLETE 3 | ||
40 | |||
41 | // mailer messages | ||
42 | #define MAILER_HELO 1 | ||
43 | #define MAILER_MAIL 2 | ||
44 | #define MAILER_RCPT 3 | ||
45 | #define MAILER_DATA 4 | ||
46 | #define MAILER_RSET 5 | ||
47 | #define MAILER_QUIT 6 | ||
48 | |||
49 | #define MAILER_LINE_BUF_SIZE 1000 | ||
50 | |||
51 | struct _mailer | ||
52 | { | ||
53 | int socket; | ||
54 | char *hostname; | ||
55 | char line_buf[MAILER_LINE_BUF_SIZE]; | ||
56 | int offset; | ||
57 | int state; | ||
58 | int add_dot; | ||
59 | stream_t stream; | ||
60 | char last_char; | ||
61 | }; | ||
62 | |||
63 | #ifdef _cplusplus | ||
64 | } | ||
65 | #endif | ||
66 | |||
67 | #endif /* MAILER0_H */ |
mailbox/include/private/mbx_imap.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MBX_IMAP_H | ||
19 | #define _MBX_IMAP_H 1 | ||
20 | |||
21 | #include <mailbox0.h> | ||
22 | |||
23 | extern int mailbox_imap_create __P ((mailbox_t *mbox, const char *name)); | ||
24 | extern void mailbox_imap_destroy __P ((mailbox_t *mbox)); | ||
25 | |||
26 | extern struct mailbox_type _mailbox_imap_type; | ||
27 | |||
28 | #endif /* _MBX_IMAP_H */ |
mailbox/include/private/mbx_mbox.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MBX_MBOX_H | ||
19 | #define _MBX_MBOX_H 1 | ||
20 | |||
21 | #include <mailbox.h> | ||
22 | |||
23 | extern int mailbox_mbox_create __P ((mailbox_t *mbox, const char *name)); | ||
24 | extern void mailbox_mbox_destroy __P ((mailbox_t *mbox)); | ||
25 | |||
26 | extern struct mailbox_type _mailbox_mbox_type; | ||
27 | |||
28 | #endif /* _MBX_MBOX_H */ |
mailbox/include/private/mbx_mdir.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MBX_MDIR_H | ||
19 | #define _MBX_MDIR_H 1 | ||
20 | |||
21 | #include <mailbox0.h> | ||
22 | |||
23 | extern int mailbox_maildir_create __P ((mailbox_t *mbox, const char *name)); | ||
24 | extern void mailbox_maildir_destroy __P ((mailbox_t *mbox)); | ||
25 | |||
26 | extern struct mailbox_type _mailbox_maildir_type; | ||
27 | |||
28 | #endif /* _MBX_MDIR_H */ |
mailbox/include/private/mbx_mmdf.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MBX_MMDF_H | ||
19 | #define _MBX_MMDF_H 1 | ||
20 | |||
21 | #include <mailbox0.h> | ||
22 | |||
23 | extern int mailbox_mmdf_create __P ((mailbox_t *mbox, const char *name)); | ||
24 | extern void mailbox_mmdf_destroy __P ((mailbox_t *mbox)); | ||
25 | |||
26 | extern struct mailbox_type _mailbox_mmdf_type; | ||
27 | |||
28 | #endif /* _MBX_MMDF_H */ |
mailbox/include/private/mbx_pop.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MBX_POP_H | ||
19 | #define _MBX_POP_H 1 | ||
20 | |||
21 | #include <mailbox0.h> | ||
22 | |||
23 | extern int mailbox_pop_create __P ((mailbox_t *mbox, const char *name)); | ||
24 | extern void mailbox_pop_destroy __P ((mailbox_t *mbox)); | ||
25 | |||
26 | extern struct mailbox_type _mailbox_pop_type; | ||
27 | |||
28 | #endif /* _MBX_POP_H */ |
mailbox/include/private/mbx_unix.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MBX_UNIX_H | ||
19 | #define _MBX_UNIX_H 1 | ||
20 | |||
21 | #include <mailbox0.h> | ||
22 | |||
23 | #ifdef __cplucplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
27 | extern int mailbox_unix_create __P ((mailbox_t *mbox, const char *name)); | ||
28 | extern void mailbox_unix_destroy __P ((mailbox_t *mbox)); | ||
29 | |||
30 | extern struct mailbox_type _mailbox_unix_type; | ||
31 | |||
32 | #ifdef __cplucplus | ||
33 | } | ||
34 | #endif | ||
35 | |||
36 | #endif /* _MBX_UNIX_H */ |
mailbox/include/private/message0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MESSAGE0_H | ||
19 | #define _MESSAGE0_H | ||
20 | |||
21 | #include <attribute.h> | ||
22 | #include <header.h> | ||
23 | #include <message.h> | ||
24 | #include <mime.h> | ||
25 | #include <mailbox.h> | ||
26 | #include <event.h> | ||
27 | |||
28 | #include <sys/types.h> | ||
29 | #include <stdio.h> | ||
30 | |||
31 | #ifdef _cplusplus | ||
32 | extern "C" { | ||
33 | #endif | ||
34 | |||
35 | #ifndef __P | ||
36 | # ifdef __STDC__ | ||
37 | # define __P(args) args | ||
38 | # else | ||
39 | # define __P(args) () | ||
40 | # endif | ||
41 | #endif /*__P */ | ||
42 | |||
43 | /* forward declaration */ | ||
44 | struct _message | ||
45 | { | ||
46 | header_t header; | ||
47 | stream_t stream; | ||
48 | body_t body; | ||
49 | attribute_t attribute; | ||
50 | mime_t mime; | ||
51 | |||
52 | /* who is the owner */ | ||
53 | void *owner; | ||
54 | |||
55 | event_t event; | ||
56 | size_t event_num; | ||
57 | |||
58 | /* for message_write */ | ||
59 | char *hdr_buf; | ||
60 | size_t hdr_buflen; | ||
61 | int hdr_done; | ||
62 | |||
63 | int (*_from) __P ((message_t msg, char *, size_t, size_t *)); | ||
64 | int (*_received) __P ((message_t msg, char *, size_t, size_t *)); | ||
65 | int (*_get_uidl) __P ((message_t msg, char *, size_t, size_t *)); | ||
66 | int (*_get_num_parts) __P ((message_t, size_t *nparts)); | ||
67 | int (*_get_part) __P ((message_t, size_t part, message_t *msg)); | ||
68 | }; | ||
69 | |||
70 | #ifdef _cplusplus | ||
71 | } | ||
72 | #endif | ||
73 | |||
74 | extern void message_notification (message_t msg, size_t type); | ||
75 | #endif /* _MESSAGE_H */ |
mailbox/include/private/mime0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MIME0_H | ||
19 | #define _MIME0_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | #include <mime.h> | ||
23 | |||
24 | #ifndef __P | ||
25 | #ifdef __STDC__ | ||
26 | #define __P(args) args | ||
27 | #else | ||
28 | #define __P(args) () | ||
29 | #endif | ||
30 | #endif /*__P */ | ||
31 | |||
32 | #ifdef _cplusplus | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
36 | #define MIME_MAX_HDR_LEN 256 | ||
37 | #define MIME_DFLT_BUF_SIZE 2048 | ||
38 | |||
39 | /* Parser states */ | ||
40 | #define MIME_STATE_BEGIN_LINE 1 | ||
41 | #define MIME_STATE_SCAN_BOUNDARY 2 | ||
42 | #define MIME_STATE_HEADERS 3 | ||
43 | |||
44 | #define MIME_FLAG_MASK 0x0000ffff | ||
45 | |||
46 | /* private */ | ||
47 | #define MIME_PARSER_ACTIVE 0x80000000 | ||
48 | #define MIME_PARSER_HAVE_CR 0x40000000 | ||
49 | #define MIME_NEW_MESSAGE 0x20000000 | ||
50 | |||
51 | struct _mime | ||
52 | { | ||
53 | message_t msg; | ||
54 | header_t hdrs; | ||
55 | stream_t stream; | ||
56 | int flags; | ||
57 | char *content_type; | ||
58 | |||
59 | int tparts; | ||
60 | int nmtp_parts; | ||
61 | struct _mime_part **mtp_parts; /* list of parts in the msg */ | ||
62 | |||
63 | /* parser state */ | ||
64 | char *boundary; | ||
65 | char *cur_line; | ||
66 | int line_ndx; | ||
67 | int cur_offset; | ||
68 | char *cur_buf; | ||
69 | int buf_size; | ||
70 | char *header_buf; | ||
71 | int header_buf_size; | ||
72 | int header_length; | ||
73 | int body_offset; | ||
74 | int body_length; | ||
75 | int parser_state; | ||
76 | }; | ||
77 | |||
78 | struct _mime_part | ||
79 | { | ||
80 | char sig[4]; | ||
81 | mime_t mime; | ||
82 | header_t hdr; | ||
83 | message_t msg; | ||
84 | int body_offset; | ||
85 | int body_len; | ||
86 | }; | ||
87 | |||
88 | #ifdef _cplusplus | ||
89 | } | ||
90 | #endif | ||
91 | |||
92 | #endif /* MIME0_H */ |
mailbox/include/private/registrar0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _REGISTRAR0_H | ||
19 | #define _REGISTRAR0_H | ||
20 | |||
21 | #include <registrar.h> | ||
22 | |||
23 | |||
24 | #ifdef __cplusplus | ||
25 | extern "C" { | ||
26 | #endif | ||
27 | |||
28 | #ifndef __P | ||
29 | # ifdef __STDC__ | ||
30 | # define __P(args) args | ||
31 | # else | ||
32 | # define __P(args) () | ||
33 | # endif | ||
34 | #endif /*__P */ | ||
35 | |||
36 | /* | ||
37 | Builtin mailbox types. | ||
38 | A circular list is use for the builtin. | ||
39 | Proper locking is not done when accessing the list. | ||
40 | FIXME: not thread-safe. */ | ||
41 | struct _registrar | ||
42 | { | ||
43 | struct url_registrar *ureg; | ||
44 | struct mailbox_registrar *mreg; | ||
45 | int is_allocated; | ||
46 | struct _registrar *next; | ||
47 | }; | ||
48 | |||
49 | |||
50 | /* This is function is obsolete use the registrar_entry_*() ones */ | ||
51 | extern int registrar_list __P ((struct url_registrar **ureg, | ||
52 | struct mailbox_registrar **mreg, | ||
53 | int *id, registrar_t *reg)); | ||
54 | extern int registrar_entry_count __P ((size_t *num)); | ||
55 | extern int registrar_entry __P ((size_t num, struct url_registrar **ureg, | ||
56 | struct mailbox_registrar **mreg, | ||
57 | int *id)); | ||
58 | /* IMAP */ | ||
59 | extern struct mailbox_registrar _mailbox_imap_registrar; | ||
60 | extern struct url_registrar _url_imap_registrar; | ||
61 | |||
62 | /* FILE */ | ||
63 | extern struct url_registrar _url_file_registrar; | ||
64 | /* MBOX */ | ||
65 | extern struct mailbox_registrar _mailbox_mbox_registrar; | ||
66 | extern struct url_registrar _url_mbox_registrar; | ||
67 | |||
68 | /* MAILTO */ | ||
69 | extern struct mailbox_registrar _mailbox_mailto_registrar; | ||
70 | extern struct url_registrar _url_mailto_registrar; | ||
71 | |||
72 | /* MDIR */ | ||
73 | extern struct mailbox_registrar _mailbox_maildir_registrar; | ||
74 | extern struct url_registrar _url_maildir_registrar; | ||
75 | |||
76 | /* MMDF */ | ||
77 | extern struct mailbox_registrar _mailbox_mmdf_registrar; | ||
78 | extern struct url_registrar _url_mmdf_registrar; | ||
79 | |||
80 | /* UNIX */ | ||
81 | extern struct mailbox_registrar _mailbox_unix_registrar; | ||
82 | extern struct url_registrar _url_unix_registrar; | ||
83 | |||
84 | /* POP */ | ||
85 | extern struct mailbox_registrar _mailbox_pop_registrar; | ||
86 | extern struct url_registrar _url_pop_registrar; | ||
87 | |||
88 | #ifdef __cplusplus | ||
89 | } | ||
90 | #endif | ||
91 | |||
92 | #endif /* _REGISTRAR0_H */ |
mailbox/include/private/tcp.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #define TCP_STATE_INIT 1 | ||
19 | #define TCP_STATE_RESOLVE 2 | ||
20 | #define TCP_STATE_RESOLVING 3 | ||
21 | #define TCP_STATE_CONNECTING 4 | ||
22 | #define TCP_STATE_CONNECTED 5 | ||
23 | |||
24 | struct _tcp_instance { | ||
25 | int fd; | ||
26 | char *host; | ||
27 | int port; | ||
28 | int state; | ||
29 | unsigned long address; | ||
30 | }; |
mailbox/include/private/url0.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _URL0_H | ||
19 | #define _URL0_H 1 | ||
20 | |||
21 | #include <url.h> | ||
22 | |||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
27 | #ifndef __P | ||
28 | # if __STDC__ | ||
29 | # define __P(args) args | ||
30 | # else | ||
31 | # define __P(args) () | ||
32 | # endif | ||
33 | #endif /*!__P */ | ||
34 | |||
35 | struct _url | ||
36 | { | ||
37 | /* Data */ | ||
38 | char *scheme; | ||
39 | char *user; | ||
40 | char *passwd; /* encoded ?? */ | ||
41 | char *host; | ||
42 | long port; | ||
43 | char *path; | ||
44 | char *query; | ||
45 | int id; | ||
46 | |||
47 | |||
48 | void *data; | ||
49 | |||
50 | int (*_create) __P ((url_t *url, const char *name)); | ||
51 | void (*_destroy) __P ((url_t *url)); | ||
52 | |||
53 | /* Methods */ | ||
54 | int (*_get_id) __P ((const url_t, int *id)); | ||
55 | |||
56 | int (*_get_scheme) __P ((const url_t, char *scheme, | ||
57 | size_t len, size_t *n)); | ||
58 | |||
59 | int (*_get_user) __P ((const url_t, char *user, | ||
60 | size_t len, size_t *n)); | ||
61 | |||
62 | int (*_get_passwd) __P ((const url_t, char *passwd, | ||
63 | size_t len, size_t *n)); | ||
64 | |||
65 | int (*_get_host) __P ((const url_t, char *host, | ||
66 | size_t len, size_t *n)); | ||
67 | |||
68 | int (*_get_port) __P ((const url_t, long *port)); | ||
69 | |||
70 | int (*_get_path) __P ((const url_t, char *path, | ||
71 | size_t len, size_t *n)); | ||
72 | |||
73 | int (*_get_query) __P ((const url_t, char *query, | ||
74 | size_t len, size_t *n)); | ||
75 | }; | ||
76 | |||
77 | |||
78 | /* IMAP */ | ||
79 | |||
80 | /* Mailto */ | ||
81 | |||
82 | /* UNIX MBOX */ | ||
83 | |||
84 | /* Maildir */ | ||
85 | |||
86 | /* MMDF */ | ||
87 | |||
88 | /* POP3 */ | ||
89 | |||
90 | #define MU_POP_PORT 110 | ||
91 | |||
92 | /* UNIX MBOX */ | ||
93 | |||
94 | #ifdef __cplusplus | ||
95 | } | ||
96 | #endif | ||
97 | |||
98 | #endif /* URL_H */ |
mailbox/include/public/Makefile.am
deleted
100644 → 0
mailbox/include/public/attribute.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _ATTRIBUTE_H | ||
19 | #define _ATTRIBUTE_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | |||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
27 | #ifndef __P | ||
28 | # ifdef __STDC__ | ||
29 | # define __P(args) args | ||
30 | # else | ||
31 | # define __P(args) () | ||
32 | # endif | ||
33 | #endif /*__P */ | ||
34 | |||
35 | struct _attribute; | ||
36 | typedef struct _attribute * attribute_t; | ||
37 | |||
38 | #define MU_ATTRIBUTE_ANSWERED 0x01 | ||
39 | #define MU_ATTRIBUTE_FLAGGED 0x02 | ||
40 | #define MU_ATTRIBUTE_DELETED 0x04 | ||
41 | #define MU_ATTRIBUTE_DRAFT 0x08 | ||
42 | #define MU_ATTRIBUTE_SEEN 0x10 | ||
43 | #define MU_ATTRIBUTE_READ 0x20 | ||
44 | #define MU_ATTRIBUTE_RECENT 0x00 | ||
45 | |||
46 | extern int attribute_create __P ((attribute_t *, void *)); | ||
47 | extern void attribute_destroy __P ((attribute_t *, void *)); | ||
48 | |||
49 | extern int attribute_is_seen __P ((attribute_t)); | ||
50 | extern int attribute_is_answered __P ((attribute_t)); | ||
51 | extern int attribute_is_flagged __P ((attribute_t)); | ||
52 | extern int attribute_is_deleted __P ((attribute_t)); | ||
53 | extern int attribute_is_draft __P ((attribute_t)); | ||
54 | extern int attribute_is_recent __P ((attribute_t)); | ||
55 | extern int attribute_is_read __P ((attribute_t)); | ||
56 | |||
57 | extern int attribute_set_seen __P ((attribute_t)); | ||
58 | extern int attribute_set_answered __P ((attribute_t)); | ||
59 | extern int attribute_set_flagged __P ((attribute_t)); | ||
60 | extern int attribute_set_deleted __P ((attribute_t)); | ||
61 | extern int attribute_set_draft __P ((attribute_t)); | ||
62 | extern int attribute_set_recent __P ((attribute_t)); | ||
63 | extern int attribute_set_read __P ((attribute_t)); | ||
64 | |||
65 | extern int attribute_unset_seen __P ((attribute_t)); | ||
66 | extern int attribute_unset_answered __P ((attribute_t)); | ||
67 | extern int attribute_unset_flagged __P ((attribute_t)); | ||
68 | extern int attribute_unset_deleted __P ((attribute_t)); | ||
69 | extern int attribute_unset_draft __P ((attribute_t)); | ||
70 | extern int attribute_unset_recent __P ((attribute_t)); | ||
71 | extern int attribute_unset_read __P ((attribute_t)); | ||
72 | |||
73 | extern int attribute_get_flags __P ((attribute_t, int *)); | ||
74 | extern int attribute_set_flags __P ((attribute_t, int)); | ||
75 | |||
76 | extern int attribute_set_set_flags __P ((attribute_t, int (*_set_flags) | ||
77 | __P ((attribute_t, int)), void *)); | ||
78 | extern int attribute_set_unset_flags __P ((attribute_t, int (*_unset_flags) | ||
79 | __P ((attribute_t, int)), void *)); | ||
80 | extern int attribute_set_get_flags __P ((attribute_t, int (*_get_flags) | ||
81 | __P ((attribute_t, int *)), void *)); | ||
82 | extern int attribute_is_equal __P ((attribute_t att1, attribute_t att2)); | ||
83 | |||
84 | extern int attribute_copy __P ((attribute_t dst, | ||
85 | attribute_t src)); | ||
86 | |||
87 | extern int string_to_flags __P ((const char *buf, int *pattr)); | ||
88 | extern int flags_to_string __P ((int flags, char *buf, | ||
89 | size_t len, size_t *)); | ||
90 | |||
91 | #ifdef __cplusplus | ||
92 | } | ||
93 | #endif | ||
94 | |||
95 | #endif /* _ATTRIBUTE_H */ |
mailbox/include/public/auth.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _AUTH_H | ||
19 | #define _AUTH_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | |||
23 | #ifndef __P | ||
24 | #ifdef __STDC__ | ||
25 | #define __P(args) args | ||
26 | #else | ||
27 | #define __P(args) () | ||
28 | #endif | ||
29 | #endif /*__P */ | ||
30 | |||
31 | #ifdef _cplusplus | ||
32 | extern "C" { | ||
33 | #endif | ||
34 | |||
35 | /* forward declaration */ | ||
36 | struct _auth; | ||
37 | typedef struct _auth *auth_t; | ||
38 | |||
39 | extern int auth_create __P ((auth_t *, void *owner)); | ||
40 | extern void auth_destroy __P ((auth_t *, void *owner)); | ||
41 | |||
42 | extern int auth_prologue __P ((auth_t)); | ||
43 | extern int auth_set_prologue __P ((auth_t auth, | ||
44 | int (*_prologue) __P ((auth_t)), | ||
45 | void *owner)); | ||
46 | |||
47 | extern int auth_authenticate __P ((auth_t, char **, char **)); | ||
48 | extern int auth_set_authenticate __P ((auth_t auth, | ||
49 | int (*_authenticate) | ||
50 | __P ((auth_t, char **, char **)), | ||
51 | void *owner)); | ||
52 | |||
53 | extern int auth_epilogue __P ((auth_t)); | ||
54 | extern int auth_set_epilogue __P ((auth_t auth, | ||
55 | int (*_epilogue) __P ((auth_t)), | ||
56 | void *owner)); | ||
57 | |||
58 | #ifdef _cplusplus | ||
59 | } | ||
60 | #endif | ||
61 | |||
62 | #endif /* _AUTH_H */ |
mailbox/include/public/body.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _BODY_H | ||
19 | #define _BODY_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | #include <io.h> | ||
23 | |||
24 | #ifndef __P | ||
25 | # ifdef __STDC__ | ||
26 | # define __P(args) args | ||
27 | # else | ||
28 | # define __P(args) () | ||
29 | # endif | ||
30 | #endif /* __P */ | ||
31 | |||
32 | #ifdef _cplusplus | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
36 | /* forward declaration */ | ||
37 | struct _body; | ||
38 | typedef struct _body *body_t; | ||
39 | |||
40 | extern int body_create __P ((body_t *, void *owner)); | ||
41 | extern void body_destroy __P ((body_t *, void *owner)); | ||
42 | |||
43 | extern int body_get_stream __P ((body_t, stream_t *)); | ||
44 | extern int body_set_stream __P ((body_t, stream_t, void *owner)); | ||
45 | |||
46 | extern int body_get_filename __P ((body_t, char *, size_t, size_t *)); | ||
47 | extern int body_set_filename __P ((body_t, const char*)); | ||
48 | |||
49 | extern int body_size __P ((body_t, size_t*)); | ||
50 | extern int body_set_size __P ((body_t, | ||
51 | int (*_size) __P ((body_t, size_t*)), | ||
52 | void *owner)); | ||
53 | extern int body_lines __P ((body_t, size_t *)); | ||
54 | extern int body_set_lines __P ((body_t, | ||
55 | int (*_lines) __P ((body_t, size_t*)), | ||
56 | void *owner)); | ||
57 | |||
58 | #ifdef _cplusplus | ||
59 | } | ||
60 | #endif | ||
61 | |||
62 | #endif /* _BODY_H */ |
mailbox/include/public/event.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _EVENT_H | ||
19 | #define _EVENT_H | ||
20 | |||
21 | #ifndef __P | ||
22 | # ifdef __STDC__ | ||
23 | # define __P(args) args | ||
24 | # else | ||
25 | # define __P(args) () | ||
26 | # endif | ||
27 | #endif /* __P */ | ||
28 | |||
29 | #ifdef _cplusplus | ||
30 | extern "C" { | ||
31 | #endif | ||
32 | |||
33 | struct _event | ||
34 | { | ||
35 | size_t type; | ||
36 | void *arg; | ||
37 | int (*_action) __P ((size_t type, void *arg)); | ||
38 | }; | ||
39 | typedef struct _event *event_t; | ||
40 | |||
41 | #ifdef _cplusplus | ||
42 | } | ||
43 | #endif | ||
44 | |||
45 | #endif /* _EVENT_H */ |
mailbox/include/public/header.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _HEADER_H | ||
19 | #define _HEADER_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | #include <io.h> | ||
23 | |||
24 | #ifndef __P | ||
25 | #ifdef __STDC__ | ||
26 | #define __P(args) args | ||
27 | #else | ||
28 | #define __P(args) () | ||
29 | #endif | ||
30 | #endif /*__P */ | ||
31 | |||
32 | #ifdef _cplusplus | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
36 | #define MU_HEADER_UNIX_FROM "From " | ||
37 | #define MU_HEADER_RETURN_PATH "Return-Path" | ||
38 | #define MU_HEADER_RECEIVED "Received" | ||
39 | #define MU_HEADER_DATE "Date" | ||
40 | #define MU_HEADER_FROM "From" | ||
41 | #define MU_HEADER_RESENT_FROM "Resent-From" | ||
42 | #define MU_HEADER_SUBJECT "Subject" | ||
43 | #define MU_HEADER_SENDER "Sender" | ||
44 | #define MU_HEADER_RESENT_SENDER "Resent-SENDER" | ||
45 | #define MU_HEADER_TO "To" | ||
46 | #define MU_HEADER_RESENT_TO "Resent-To" | ||
47 | #define MU_HEADER_CC "Cc" | ||
48 | #define MU_HEADER_RESENT_CC "Resent-Cc" | ||
49 | #define MU_HEADER_BCC "Bcc" | ||
50 | #define MU_HEADER_RESENT_BCC "Resent-Bcc" | ||
51 | #define MU_HEADER_REPLY_TO "Reply-To" | ||
52 | #define MU_HEADER_RESENT_REPLY_TO "Resent-Reply-To" | ||
53 | #define MU_HEADER_MESSAGE_ID "Message-ID" | ||
54 | #define MU_HEADER_RESENT_MESSAGE_ID "Resent-Message-ID" | ||
55 | #define MU_HEADER_IN_REPLY_TO "In-Reply-To" | ||
56 | #define MU_HEADER_ENCRYPTED "Encrypted" | ||
57 | #define MU_HEADER_PRECEDENCE "Precedence" | ||
58 | #define MU_HEADER_STATUS "Status" | ||
59 | #define MU_HEADER_CONTENT_LENGTH "Content-Length" | ||
60 | #define MU_HEADER_CONTENT_TYPE "Content-Type" | ||
61 | #define MU_HEADER_CONTENT_ENCODING "Content-transfer-encoding" | ||
62 | #define MU_HEADER_MIME_VERSION "MIME-Version" | ||
63 | |||
64 | /* Mime support header attribute */ | ||
65 | |||
66 | /* forward declaration */ | ||
67 | struct _header; | ||
68 | typedef struct _header * header_t; | ||
69 | |||
70 | extern int header_create __P ((header_t *, const char *, | ||
71 | size_t, void *)); | ||
72 | extern void header_destroy __P ((header_t *, void *)); | ||
73 | extern int header_set_value __P ((header_t, const char *, | ||
74 | const char *, int)); | ||
75 | extern int header_get_value __P ((header_t, const char *, char *, | ||
76 | size_t, size_t *)); | ||
77 | extern int header_get_stream __P ((header_t, stream_t *)); | ||
78 | extern int header_size __P ((header_t, size_t *)); | ||
79 | extern int header_lines __P ((header_t, size_t *)); | ||
80 | |||
81 | extern int header_set_stream __P ((header_t, stream_t, void *)); | ||
82 | |||
83 | extern int header_set_set_value __P ((header_t, int (*_set_value) | ||
84 | __P ((header_t, const char *, | ||
85 | const char *, int)), | ||
86 | void *)); | ||
87 | extern int header_set_get_value __P ((header_t, int (*_get_value) | ||
88 | __P ((header_t, const char *, | ||
89 | char *, size_t, size_t *)), | ||
90 | void *)); | ||
91 | |||
92 | #ifdef _cplusplus | ||
93 | } | ||
94 | #endif | ||
95 | |||
96 | #endif /* HEADER_H */ |
mailbox/include/public/io.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _IO_H | ||
19 | # define _IO_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | |||
23 | #ifdef __cplusplus | ||
24 | extern "C" { /*}*/ | ||
25 | #endif | ||
26 | |||
27 | #ifndef __P | ||
28 | # ifdef __STDC__ | ||
29 | # define __P(args) args | ||
30 | # else | ||
31 | # define __P(args) () | ||
32 | # endif | ||
33 | #endif /*__P */ | ||
34 | |||
35 | struct _stream; | ||
36 | typedef struct _stream *stream_t; | ||
37 | |||
38 | #define MU_STREAM_READ 0x00000001 | ||
39 | #define MU_STREAM_WRITE 0x00000002 | ||
40 | #define MU_STREAM_RDWR 0x00000004 | ||
41 | #define MU_STREAM_APPEND 0x00000008 | ||
42 | #define MU_STREAM_CREAT 0x00000010 | ||
43 | #define MU_STREAM_NONBLOCK 0x00000020 | ||
44 | /* stream will be destroy on stream_destroy */ | ||
45 | #define MU_STREAM_NO_CHECK 0x00000040 | ||
46 | |||
47 | extern int stream_create __P ((stream_t *, int flags, void *owner)); | ||
48 | |||
49 | extern void stream_destroy __P ((stream_t *, void *owner)); | ||
50 | extern int stream_set_destroy __P ((stream_t, void (*_destroy) | ||
51 | __P ((stream_t)), void *owner)); | ||
52 | |||
53 | extern int stream_open __P ((stream_t, const char *, int, int)); | ||
54 | extern int stream_set_open __P ((stream_t, int (*_open) | ||
55 | __P ((stream_t, const char *, int, int)), | ||
56 | void *owner)); | ||
57 | |||
58 | extern int stream_close __P ((stream_t)); | ||
59 | extern int stream_set_close __P ((stream_t, int (*_close) __P ((stream_t)), | ||
60 | void *owner)); | ||
61 | |||
62 | extern int stream_get_fd __P ((stream_t , int *)); | ||
63 | extern int stream_set_fd __P ((stream_t, int (*_get_fd)(stream_t, int *), | ||
64 | void *owner)); | ||
65 | |||
66 | extern int stream_read __P ((stream_t, char *, size_t, | ||
67 | off_t, size_t *)); | ||
68 | extern int stream_set_read __P ((stream_t, int (*_read) | ||
69 | __P ((stream_t, char *, size_t, | ||
70 | off_t, size_t *)), | ||
71 | void *owner)); | ||
72 | |||
73 | extern int stream_readline __P ((stream_t, char *, size_t, | ||
74 | off_t, size_t *)); | ||
75 | extern int stream_set_readline __P ((stream_t, int (*_readline) | ||
76 | __P ((stream_t, char *, size_t, | ||
77 | off_t, size_t *)), | ||
78 | void *owner)); | ||
79 | |||
80 | extern int stream_size __P ((stream_t, off_t *)); | ||
81 | extern int stream_set_size __P ((stream_t, int (*_size) | ||
82 | __P ((stream_t, off_t *)), void *owner)); | ||
83 | |||
84 | extern int stream_truncate __P ((stream_t, off_t)); | ||
85 | extern int stream_set_truncate __P ((stream_t, int (*_truncate) | ||
86 | __P ((stream_t, off_t)), void *owner)); | ||
87 | |||
88 | extern int stream_write __P ((stream_t, const char *, size_t, | ||
89 | off_t, size_t *)); | ||
90 | extern int stream_set_write __P ((stream_t, int (*_write) | ||
91 | __P ((stream_t, const char *, | ||
92 | size_t, off_t, size_t *)), | ||
93 | void *owner)); | ||
94 | |||
95 | extern int stream_flush __P ((stream_t)); | ||
96 | extern int stream_set_flush __P ((stream_t, int (*_flush) | ||
97 | __P ((stream_t)), void *owner)); | ||
98 | |||
99 | extern int stream_get_flags __P ((stream_t, int *pflags)); | ||
100 | extern int stream_set_flags __P ((stream_t, int flags, void *owner)); | ||
101 | |||
102 | #define MU_STREAM_STATE_OPEN 1 | ||
103 | #define MU_STREAM_STATE_READ 2 | ||
104 | #define MU_STREAM_STATE_WRITE 4 | ||
105 | #define MU_STREAM_STATE_CLOSE 8 | ||
106 | extern int stream_get_state __P ((stream_t, int *pstate)); | ||
107 | |||
108 | /* misc */ | ||
109 | extern int file_stream_create __P ((stream_t *stream)); | ||
110 | extern int mapfile_stream_create __P ((stream_t *stream)); | ||
111 | extern int encoder_stream_create __P ((stream_t *stream, stream_t iostream, | ||
112 | const char *encoding)); | ||
113 | extern int decoder_stream_create __P ((stream_t *stream, stream_t iostream, | ||
114 | const char *encoding)); | ||
115 | extern int tcp_stream_create __P ((stream_t *stream)); | ||
116 | |||
117 | #ifdef __cplusplus | ||
118 | } | ||
119 | #endif | ||
120 | |||
121 | #endif /* _IO_H */ |
mailbox/include/public/locker.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _LOCKER_H | ||
19 | #define _LOCKER_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | |||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
27 | #ifndef __P | ||
28 | # ifdef __STDC__ | ||
29 | # define __P(args) args | ||
30 | # else | ||
31 | # define __P(args) () | ||
32 | # endif | ||
33 | #endif /*__P */ | ||
34 | |||
35 | struct _locker; | ||
36 | typedef struct _locker *locker_t; | ||
37 | |||
38 | extern int locker_create __P ((locker_t *, char *filename, | ||
39 | size_t len, int flags)); | ||
40 | extern void locker_destroy __P ((locker_t *)); | ||
41 | |||
42 | #define MU_LOCKER_RDLOCK 0 | ||
43 | #define MU_LOCKER_WRLOCK 1 | ||
44 | |||
45 | /* locking flags */ | ||
46 | #define MU_LOCKER_PID 1 | ||
47 | #define MU_LOCKER_FCNTL 2 | ||
48 | #define MU_LOCKER_TIME 4 | ||
49 | |||
50 | extern int locker_lock __P ((locker_t, int flag)); | ||
51 | extern int locker_touchlock __P ((locker_t)); | ||
52 | extern int locker_unlock __P ((locker_t)); | ||
53 | |||
54 | #ifdef __cplusplus | ||
55 | } | ||
56 | #endif | ||
57 | |||
58 | #endif /* _MAILBOX_H */ |
mailbox/include/public/mailbox.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MAILBOX_H | ||
19 | # define _MAILBOX_H | ||
20 | |||
21 | #include <url.h> | ||
22 | #include <message.h> | ||
23 | #include <attribute.h> | ||
24 | #include <auth.h> | ||
25 | #include <locker.h> | ||
26 | #include <io.h> | ||
27 | |||
28 | #include <sys/types.h> | ||
29 | |||
30 | #ifdef __cplusplus | ||
31 | extern "C" { | ||
32 | #endif | ||
33 | |||
34 | #ifndef __P | ||
35 | # ifdef __STDC__ | ||
36 | # define __P(args) args | ||
37 | # else | ||
38 | # define __P(args) () | ||
39 | # endif | ||
40 | #endif /*__P */ | ||
41 | |||
42 | /* forward declaration */ | ||
43 | struct _mailbox; | ||
44 | typedef struct _mailbox *mailbox_t; | ||
45 | |||
46 | /* constructor/destructor and possible types */ | ||
47 | extern int mailbox_create __P ((mailbox_t *, const char *, int id)); | ||
48 | extern void mailbox_destroy __P ((mailbox_t *)); | ||
49 | |||
50 | extern int mailbox_create_default __P ((mailbox_t *, const char *)); | ||
51 | |||
52 | /* flags for mailbox_open () */ | ||
53 | #define MU_MAILBOX_RDONLY MU_STREAM_READ | ||
54 | #define MU_MAILBOX_WRONLY MU_STREAM_WRITE | ||
55 | #define MU_MAILBOX_RDWR MU_STREAM_RDWR | ||
56 | #define MU_MAILBOX_APPEND MU_STREAM_APPEND | ||
57 | #define MU_MAILBOX_CREAT MU_STREAM_CREAT | ||
58 | #define MU_MAILBOX_NONBLOCK MU_STREAM_NONBLOCK | ||
59 | |||
60 | extern int mailbox_open __P ((mailbox_t, int flag)); | ||
61 | extern int mailbox_close __P ((mailbox_t)); | ||
62 | |||
63 | /* messages */ | ||
64 | extern int mailbox_get_message __P ((mailbox_t, size_t msgno, message_t *msg)); | ||
65 | extern int mailbox_append_message __P ((mailbox_t, message_t msg)); | ||
66 | extern int mailbox_messages_count __P ((mailbox_t, size_t *num)); | ||
67 | extern int mailbox_expunge __P ((mailbox_t)); | ||
68 | |||
69 | /* stream settings */ | ||
70 | extern int mailbox_get_stream __P ((mailbox_t, stream_t *pstream)); | ||
71 | extern int mailbox_set_stream __P ((mailbox_t, stream_t stream)); | ||
72 | |||
73 | /* Lock settings */ | ||
74 | extern int mailbox_get_locker __P ((mailbox_t, locker_t *locker)); | ||
75 | extern int mailbox_set_locker __P ((mailbox_t, locker_t locker)); | ||
76 | |||
77 | /* Authentication */ | ||
78 | extern int mailbox_get_auth __P ((mailbox_t, auth_t *auth)); | ||
79 | extern int mailbox_set_auth __P ((mailbox_t, auth_t auth)); | ||
80 | |||
81 | /* update and scanning*/ | ||
82 | extern int mailbox_is_updated __P ((mailbox_t)); | ||
83 | extern int mailbox_scan __P ((mailbox_t, size_t msgno, size_t *count)); | ||
84 | |||
85 | /* mailbox size ? */ | ||
86 | extern int mailbox_size __P ((mailbox_t, off_t *size)); | ||
87 | |||
88 | extern int mailbox_get_url __P ((mailbox_t, url_t *)); | ||
89 | |||
90 | /* events */ | ||
91 | #define MU_EVT_MBX_DESTROY 1 | ||
92 | #define MU_EVT_MBX_CORRUPTED 2 | ||
93 | #define MU_EVT_MBX_MSG_ADD 4 | ||
94 | #define MU_EVT_MBX_PROGRESS 8 | ||
95 | |||
96 | extern int mailbox_register __P ((mailbox_t mbox, size_t type, | ||
97 | int (*action) (size_t type, void *arg), | ||
98 | void *arg)); | ||
99 | extern int mailbox_deregister __P ((mailbox_t mbox, void *action)); | ||
100 | |||
101 | /* trace */ | ||
102 | #define MU_MAILBOX_DEBUG_TRACE 1 | ||
103 | #define MU_MAILBOX_DEBUG_PROT 2 | ||
104 | extern int mailbox_set_debug_level __P ((mailbox_t mbox, size_t level)); | ||
105 | extern int mailbox_get_debug_level __P ((mailbox_t mbox, size_t *plevel)); | ||
106 | extern int mailbox_set_debug_print __P ((mailbox_t mbox, int (*debug_print) | ||
107 | __P ((void *arg, const char *, | ||
108 | size_t)), | ||
109 | void *arg)); | ||
110 | |||
111 | |||
112 | #ifdef __cplusplus | ||
113 | } | ||
114 | #endif | ||
115 | |||
116 | #endif /* _MAILBOX_H */ |
mailbox/include/public/mailer.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MAILER_H | ||
19 | #define _MAILER_H | ||
20 | |||
21 | #include "message.h" | ||
22 | #include <sys/types.h> | ||
23 | |||
24 | #ifndef __P | ||
25 | # ifdef __STDC__ | ||
26 | # define __P(args) args | ||
27 | # else | ||
28 | # define __P(args) () | ||
29 | # endif | ||
30 | #endif /* __P */ | ||
31 | |||
32 | #ifdef _cplusplus | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
36 | /* forward declaration */ | ||
37 | struct _mailer; | ||
38 | typedef struct _mailer *mailer_t; | ||
39 | |||
40 | extern int mailer_create __P ((mailer_t *, message_t)); | ||
41 | extern int mailer_destroy __P ((mailer_t *)); | ||
42 | extern int mailer_connect __P ((mailer_t, char *host)); | ||
43 | extern int mailer_disconnect __P ((mailer_t)); | ||
44 | extern int mailer_send_header __P ((mailer_t, message_t)); | ||
45 | extern int mailer_send_message __P ((mailer_t, message_t)); | ||
46 | |||
47 | #ifdef _cplusplus | ||
48 | } | ||
49 | #endif | ||
50 | |||
51 | #endif /* _MAILER_H */ |
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | /* | ||
19 | * The errno <errno.h> is not accurate enough. | ||
20 | * We try the approach of defining our own set | ||
21 | * of errors. Since all of the mailbox related | ||
22 | * functions have the error as a return value | ||
23 | * this make things easier and not dependent | ||
24 | * of any global variable. | ||
25 | * We use the MU_ERROR_* > 512 for our range. | ||
26 | */ | ||
27 | |||
28 | #ifndef _MAILUTILS_ERRNO_H | ||
29 | #define _MAILUTILS_ERRNO_H | ||
30 | |||
31 | #include <errno.h> | ||
32 | |||
33 | #ifdef __cplusplus | ||
34 | extern "C" { | ||
35 | #endif | ||
36 | |||
37 | #ifndef __P | ||
38 | # ifdef __STDC__ | ||
39 | # define __P(args) args | ||
40 | # else | ||
41 | # define __P(args) () | ||
42 | # endif | ||
43 | #endif /*__P */ | ||
44 | |||
45 | |||
46 | /* No error */ | ||
47 | #define MU_ERROR_OK 0 | ||
48 | |||
49 | /* Permission denied */ | ||
50 | #define MU_ERROR_ACCESS EACCES | ||
51 | |||
52 | /* Resource temporarily unavailable */ | ||
53 | #define MU_ERROR_TRY_AGAIN EAGAIN | ||
54 | |||
55 | /* Resource temporarily unavailable */ | ||
56 | #define MU_ERROR_IN_PROGRESS EINPROGRESS | ||
57 | |||
58 | /* Resource busy */ | ||
59 | #define MU_ERROR_BUSY EBUSY | ||
60 | |||
61 | /* Operation canceled */ | ||
62 | #define MU_ERROR_CANCELED ECANCELED | ||
63 | |||
64 | /* Resource deadlock avoided */ | ||
65 | #define MU_ERROR_DEAD_LOCK EDEADLK | ||
66 | |||
67 | /* Interrupted function call */ | ||
68 | #define MU_ERROR_INTR_CALL EINTR | ||
69 | |||
70 | /* Invalid argument */ | ||
71 | #define MU_ERROR_INVALID_ARG EINVAL | ||
72 | |||
73 | /* Input/output error */ | ||
74 | #define MU_ERROR_IO EIO | ||
75 | |||
76 | /* Inappropriate message buffer length */ | ||
77 | #define MU_ERROR_INVALID_SIZE EMSGSIZE | ||
78 | |||
79 | /* No locks available */ | ||
80 | #define MU_ERROR_NO_LOCK ENOLCK | ||
81 | |||
82 | /* Function not implemented */ | ||
83 | #define MU_ERROR_NOT_IMPLEMENTED ENOSYS | ||
84 | |||
85 | /* Not supported */ | ||
86 | #define MU_ERROR_NOT_SUPPORTED ENOTSUP | ||
87 | |||
88 | /* Operation timed out */ | ||
89 | #define MU_ERROR_TIMEDOUT ETIMEOUT | ||
90 | |||
91 | /* define bad handle */ | ||
92 | #define MU_ERROR_BAD_HANDLE EBADF | ||
93 | |||
94 | /* no such entry */ | ||
95 | #define MU_ERROR_NO_ENTRY ENOENT | ||
96 | |||
97 | /* unknown host */ | ||
98 | #define MU_ERROR_OUT_OF_MEMORY ENOMEM | ||
99 | |||
100 | /* unknown host */ | ||
101 | #define MU_ERROR_UKNOWN_HOST 529 | ||
102 | |||
103 | extern const char * mailutils_error __P ((int err)); | ||
104 | extern void mailutils_perror __P ((int err, const char *)); | ||
105 | |||
106 | #ifdef __cplusplus | ||
107 | } | ||
108 | #endif | ||
109 | |||
110 | #endif /* _MAILBOX_H */ |
mailbox/include/public/message.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MESSAGE_H | ||
19 | #define _MESSAGE_H | ||
20 | |||
21 | #include <header.h> | ||
22 | #include <body.h> | ||
23 | #include <attribute.h> | ||
24 | #include <io.h> | ||
25 | |||
26 | #include <sys/types.h> | ||
27 | |||
28 | #ifndef __P | ||
29 | # ifdef __STDC__ | ||
30 | # define __P(args) args | ||
31 | # else | ||
32 | # define __P(args) () | ||
33 | # endif | ||
34 | #endif /* __P */ | ||
35 | |||
36 | #ifdef _cplusplus | ||
37 | extern "C" { | ||
38 | #endif | ||
39 | |||
40 | /* forward declaration */ | ||
41 | struct _message; | ||
42 | typedef struct _message *message_t; | ||
43 | |||
44 | /* A message is considered to be a container for: | ||
45 | * header_t, body_t, and its attribute_t. | ||
46 | */ | ||
47 | |||
48 | extern int message_create __P ((message_t *, void *owner)); | ||
49 | extern void message_destroy __P ((message_t *, void *owner)); | ||
50 | |||
51 | extern int message_get_header __P ((message_t, header_t *)); | ||
52 | extern int message_set_header __P ((message_t, header_t, void *owner)); | ||
53 | |||
54 | extern int message_get_body __P ((message_t, body_t *)); | ||
55 | extern int message_set_body __P ((message_t, body_t, void *owner)); | ||
56 | |||
57 | extern int message_get_stream __P ((message_t, stream_t *)); | ||
58 | |||
59 | extern int message_is_mime __P ((message_t)); | ||
60 | |||
61 | extern int message_size __P ((message_t, size_t *)); | ||
62 | extern int message_lines __P ((message_t, size_t *)); | ||
63 | |||
64 | extern int message_from __P ((message_t, char *, size_t, size_t *)); | ||
65 | extern int message_set_from __P ((message_t, | ||
66 | int (*_from) __P ((message_t, char *, | ||
67 | size_t, size_t *)), | ||
68 | void *owner)); | ||
69 | extern int message_received __P ((message_t, char *, size_t, size_t *)); | ||
70 | extern int message_set_received __P ((message_t, int (*_received) | ||
71 | __P ((message_t, char *, size_t, | ||
72 | size_t *)), void *owner)); | ||
73 | |||
74 | extern int message_get_attribute __P ((message_t, attribute_t *)); | ||
75 | extern int message_set_attribute __P ((message_t, attribute_t, void *owner)); | ||
76 | |||
77 | extern int message_get_num_parts __P ((message_t, size_t *nparts)); | ||
78 | extern int message_set_get_num_parts __P ((message_t, int (*_getNum_parts) | ||
79 | __P ((message_t, size_t *)), | ||
80 | void *owner)); | ||
81 | |||
82 | extern int message_get_part __P ((message_t, size_t part, message_t *msg)); | ||
83 | extern int message_set_get_part __P ((message_t, int (*_get_part) | ||
84 | __P ((message_t, size_t, message_t *)), | ||
85 | void *owner)); | ||
86 | |||
87 | extern int message_get_uidl __P ((message_t, char *buffer, size_t, size_t *)); | ||
88 | extern int message_set_uidl __P ((message_t, int (*_get_uidl) | ||
89 | __P ((message_t, char *, size_t, size_t *)), | ||
90 | void *owner)); | ||
91 | |||
92 | /* events */ | ||
93 | #define MU_EVT_MSG_DESTROY 32 | ||
94 | extern int message_register __P ((message_t msg, size_t type, int (*action) | ||
95 | __P ((size_t typ, void *arg)), void *arg)); | ||
96 | extern int message_deregister __P ((message_t msg, void *action)); | ||
97 | |||
98 | /* misc functions */ | ||
99 | extern int message_create_attachment __P ((const char *content_type, | ||
100 | const char *encoding, | ||
101 | const char *filename, | ||
102 | message_t *newmsg)); | ||
103 | extern int message_save_attachment __P ((message_t msg, | ||
104 | const char *filename, void **data)); | ||
105 | extern int message_encapsulate __P ((message_t msg, message_t *newmsg, | ||
106 | void **data)); | ||
107 | extern int message_unencapsulate __P ((message_t msg, message_t *newmsg, | ||
108 | void **data)); | ||
109 | |||
110 | #ifdef _cplusplus | ||
111 | } | ||
112 | #endif | ||
113 | |||
114 | #endif /* _MESSAGE_H */ |
mailbox/include/public/mime.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _MIME_H | ||
19 | #define _MIME_H | ||
20 | |||
21 | #include <header.h> | ||
22 | #include <io.h> | ||
23 | #include <sys/types.h> | ||
24 | |||
25 | #ifndef __P | ||
26 | # ifdef __STDC__ | ||
27 | # define __P(args) args | ||
28 | # else | ||
29 | # define __P(args) () | ||
30 | # endif | ||
31 | #endif /* __P */ | ||
32 | |||
33 | /* mime flags */ | ||
34 | #define MIME_INCREAMENTAL_PARSER 0x00000001 | ||
35 | |||
36 | #ifdef _cplusplus | ||
37 | extern "C" { | ||
38 | #endif | ||
39 | |||
40 | /* forward declaration */ | ||
41 | struct _mime; | ||
42 | typedef struct _mime *mime_t; | ||
43 | |||
44 | int mime_create __P ((mime_t *pmime, message_t msg, int flags)); | ||
45 | void mime_destroy __P ((mime_t *pmime)); | ||
46 | int mime_is_multipart __P ((mime_t mime)); | ||
47 | int mime_get_num_parts __P ((mime_t mime, int *nparts)); | ||
48 | |||
49 | int mime_get_part __P ((mime_t mime, int part, message_t *msg)); | ||
50 | |||
51 | int mime_add_part __P ((mime_t mime, message_t msg)); | ||
52 | |||
53 | int mime_get_message __P ((mime_t mime, message_t *msg)); | ||
54 | |||
55 | #ifdef _cplusplus | ||
56 | } | ||
57 | #endif | ||
58 | |||
59 | #endif /* _MIME_H */ |
mailbox/include/public/registrar.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _REGISTRAR_H | ||
19 | #define _REGISTRAR_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | |||
23 | #include <url.h> | ||
24 | #include <mailbox.h> | ||
25 | |||
26 | #ifndef __P | ||
27 | # ifdef __STDC__ | ||
28 | # define __P(args) args | ||
29 | # else | ||
30 | # define __P(args) () | ||
31 | # endif | ||
32 | #endif /*__P */ | ||
33 | |||
34 | #ifdef _cplusplus | ||
35 | extern "C" { | ||
36 | #endif | ||
37 | |||
38 | struct url_registrar | ||
39 | { | ||
40 | const char *scheme; | ||
41 | int (*_create) __P ((url_t *, const char * name)); | ||
42 | void (*_destroy) __P ((url_t *)); | ||
43 | }; | ||
44 | |||
45 | struct mailbox_registrar | ||
46 | { | ||
47 | const char *name; | ||
48 | int (*_create) __P ((mailbox_t *, const char *name)); | ||
49 | void (*_destroy) __P ((mailbox_t *)); | ||
50 | }; | ||
51 | |||
52 | struct _registrar; | ||
53 | |||
54 | typedef struct _registrar* registrar_t; | ||
55 | |||
56 | /* mailbox registration */ | ||
57 | extern int registrar_add __P ((struct url_registrar *ureg, | ||
58 | struct mailbox_registrar *mreg, int *id)); | ||
59 | extern int registrar_remove __P ((int id)); | ||
60 | extern int registrar_get __P ((int id, struct url_registrar **ureg, | ||
61 | struct mailbox_registrar **mreg)); | ||
62 | extern int registrar_num __P ((size_t *num)); | ||
63 | extern int registrar_get_entry __P ((size_t num, struct url_registrar **ureg, | ||
64 | struct mailbox_registrar **mreg, | ||
65 | int *id)); | ||
66 | extern int registrar_list __P ((struct url_registrar **ureg, | ||
67 | struct mailbox_registrar **mreg, | ||
68 | int *id, registrar_t *reg)); | ||
69 | #ifdef _cplusplus | ||
70 | } | ||
71 | #endif | ||
72 | |||
73 | #endif /* _REGISTRAR_H */ |
mailbox/include/public/transcode.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Library Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _TRANSCODE_H | ||
19 | #define _TRANSCODE_H | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | |||
23 | #ifndef __P | ||
24 | # ifdef __STDC__ | ||
25 | # define __P(args) args | ||
26 | # else | ||
27 | # define __P(args) () | ||
28 | # endif | ||
29 | #endif /* __P */ | ||
30 | |||
31 | #ifdef _cplusplus | ||
32 | extern "C" { | ||
33 | #endif | ||
34 | |||
35 | /* forward declaration */ | ||
36 | struct _transcoder; | ||
37 | typedef struct _transcoder *transcoder_t; | ||
38 | |||
39 | struct _transcoder | ||
40 | { | ||
41 | stream_t ustream; /* user reads/writes decoded/encoded data from here */ | ||
42 | stream_t stream; /* encoder/decoder read/writes data to here */ | ||
43 | void (*destroy)(transcoder_t tc); | ||
44 | void *tcdata; | ||
45 | }; | ||
46 | |||
47 | extern int transcode_create __P ((transcoder_t *, char *encoding)); | ||
48 | extern void transcode_destroy __P ((transcoder_t *)); | ||
49 | extern int transcode_get_stream __P ((transcoder_t tc, stream_t *pis)); | ||
50 | extern int transcode_set_stream __P ((transcoder_t tc, stream_t is)); | ||
51 | |||
52 | #ifdef _cplusplus | ||
53 | } | ||
54 | #endif | ||
55 | |||
56 | #endif /* _TRANSCODE_H */ |
mailbox/include/public/url.h
deleted
100644 → 0
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Library General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifndef _URL_H | ||
19 | #define _URL_H 1 | ||
20 | |||
21 | #include <sys/types.h> | ||
22 | |||
23 | #ifdef __cplusplus | ||
24 | extern "C" { | ||
25 | #endif | ||
26 | |||
27 | #ifndef __P | ||
28 | # if __STDC__ | ||
29 | # define __P(args) args | ||
30 | # else | ||
31 | # define __P(args) () | ||
32 | # endif | ||
33 | #endif /*!__P */ | ||
34 | |||
35 | /* forward declaration */ | ||
36 | struct _url; | ||
37 | typedef struct _url * url_t; | ||
38 | |||
39 | extern int url_create __P ((url_t *, const char *name)); | ||
40 | extern void url_destroy __P ((url_t *)); | ||
41 | |||
42 | extern int url_get_id __P ((const url_t, int *id)); | ||
43 | |||
44 | extern int url_get_scheme __P ((const url_t, char *sch, | ||
45 | size_t, size_t *)); | ||
46 | |||
47 | extern int url_get_user __P ((const url_t, char *usr, | ||
48 | size_t, size_t *)); | ||
49 | |||
50 | extern int url_get_passwd __P ((const url_t, char *passwd, | ||
51 | size_t, size_t *)); | ||
52 | |||
53 | extern int url_get_host __P ((const url_t, char *host, | ||
54 | size_t, size_t *)); | ||
55 | |||
56 | extern int url_get_port __P ((const url_t, long *port)); | ||
57 | |||
58 | extern int url_get_path __P ((const url_t, char *path, | ||
59 | size_t, size_t *)); | ||
60 | |||
61 | extern int url_get_query __P ((const url_t, char *qeury, | ||
62 | size_t, size_t *)); | ||
63 | |||
64 | #ifdef __cplusplus | ||
65 | } | ||
66 | #endif | ||
67 | |||
68 | #endif /* URL_H */ |
-
Please register or sign in to post a comment