mailboxi.c
3.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <mailbox0.h>
int
mailbox_open (mailbox_t mbox, int flag)
{
return mbox->_open (mbox, flag);
}
int
mailbox_close (mailbox_t mbox)
{
return mbox->_close (mbox);
}
/* passwd */
int
mailbox_get_passwd (mailbox_t mbox, char *passwd, size_t len, size_t *n)
{
return mbox->_get_passwd (mbox, passwd, len, n);
}
int
mailbox_get_mpasswd (mailbox_t mbox, char **passwd, size_t *n)
{
return mbox->_get_mpasswd (mbox, passwd, n);
}
int
mailbox_set_passwd (mailbox_t mbox, const char *passwd,
size_t len)
{
return mbox->_set_passwd (mbox, passwd, len);
}
/* deleting */
int
mailbox_delete (mailbox_t mbox, size_t msgno)
{
return mbox->_delete (mbox, msgno);
}
int
mailbox_undelete (mailbox_t mbox, size_t msgno)
{
return mbox->_undelete (mbox, msgno);
}
int
mailbox_expunge (mailbox_t mbox)
{
return mbox->_expunge (mbox);
}
int
mailbox_is_deleted (mailbox_t mbox, size_t msgno)
{
return mbox->_is_deleted (mbox, msgno);
}
/* appending */
int
mailbox_new_msg (mailbox_t mbox, size_t *msgno)
{
return mbox->_new_msg (mbox, msgno);
}
int
mailbox_set_header (mailbox_t mbox, size_t msgno, const char *h,
size_t len, int replace)
{
return mbox->_set_header (mbox, msgno, h, len, replace);
}
int
mailbox_set_body (mailbox_t mbox, size_t msgno, const char *b,
size_t len, int replace)
{
return mbox->_set_body (mbox, msgno, b, len, replace);
}
int
mailbox_append (mailbox_t mbox, size_t msgno)
{
return mbox->_append (mbox, msgno);
}
int
mailbox_destroy_msg (mailbox_t mbox, size_t msgno)
{
return mbox->_destroy_msg (mbox, msgno);
}
/* reading */
int
mailbox_get_body (mailbox_t mbox, size_t msgno, off_t off, char *b,
size_t len, size_t *n)
{
return mbox->_get_body (mbox, msgno, off, b, len, n);
}
int
mailbox_get_mbody (mailbox_t mbox, size_t msgno, off_t off,
char **b, size_t *n)
{
return mbox->_get_mbody (mbox, msgno, off, b, n);
}
int
mailbox_get_header (mailbox_t mbox, size_t msgno, off_t off, char *h,
size_t len, size_t *n)
{
return mbox->_get_header (mbox, msgno, off, h, len, n);
}
int
mailbox_get_mheader (mailbox_t mbox, size_t msgno, off_t off,
char **h, size_t *n)
{
return mbox->_get_mheader (mbox, msgno, off, h, n);
}
/* locking */
int
mailbox_lock (mailbox_t mbox, int flag)
{
return mbox->_lock (mbox, flag);
}
int
mailbox_unlock (mailbox_t mbox)
{
return mbox->_unlock (mbox);
}
/* misc */
int
mailbox_scan (mailbox_t mbox, size_t *msgs)
{
return mbox->_scan (mbox, msgs);
}
int
mailbox_is_updated (mailbox_t mbox)
{
return mbox->_is_updated (mbox);
}
int
mailbox_get_timeout (mailbox_t mbox, size_t *timeout)
{
return mbox->_get_timeout (mbox, timeout);
}
int
mailbox_set_timeout (mailbox_t mbox, size_t timeout)
{
return mbox->_set_timeout (mbox, timeout);
}
int
mailbox_get_refresh (mailbox_t mbox, size_t *refresh)
{
return mbox->_get_refresh (mbox, refresh);
}
int
mailbox_set_refresh (mailbox_t mbox, size_t refresh)
{
return mbox->_set_refresh (mbox, refresh);
}
int
mailbox_set_notification (mailbox_t mbox,
int (*notif) __P ((mailbox_t, void *)))
{
return mbox->_set_notification (mbox, notif);
}