diff options
author | Alain Magloire <alainm@gnu.org> | 2001-11-10 02:28:21 +0000 |
---|---|---|
committer | Alain Magloire <alainm@gnu.org> | 2001-11-10 02:28:21 +0000 |
commit | c857611d6e2cea1f6e6a141596a48ca1f51a16fa (patch) | |
tree | 4a9dd95c48e7d3fbb443c2b3c91109f58222ee81 /cmc/xcmc.h | |
parent | a39033073e8629c2cc3eebd63661c3a5713d5672 (diff) | |
download | mailutils-c857611d6e2cea1f6e6a141596a48ca1f51a16fa.tar.gz mailutils-c857611d6e2cea1f6e6a141596a48ca1f51a16fa.tar.bz2 |
Stubs for Common Messaging Call API.
Diffstat (limited to 'cmc/xcmc.h')
-rw-r--r-- | cmc/xcmc.h | 366 |
1 files changed, 366 insertions, 0 deletions
diff --git a/cmc/xcmc.h b/cmc/xcmc.h new file mode 100644 index 000000000..610cb7f92 --- /dev/null +++ b/cmc/xcmc.h | |||
@@ -0,0 +1,366 @@ | |||
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000, 2001 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 _XCMC_H | ||
19 | #define _XCMC_H | ||
20 | |||
21 | #ifdef __cplusplus | ||
22 | extern "C" { | ||
23 | #endif | ||
24 | |||
25 | /*BEGIN CMC INTERFACE */ | ||
26 | |||
27 | /*BASIC DATA TYPES */ | ||
28 | #ifndef DIFFERENT_PLATFORM | ||
29 | typedef char CMC_sint8; | ||
30 | typedef int CMC_sint16; | ||
31 | typedef long int CMC_sint32; | ||
32 | typedef unsigned int CMC_uint16; | ||
33 | typedef unsigned long int CMC_uint32; | ||
34 | typedef void * CMC_buffer; | ||
35 | typedef char * CMC_string; | ||
36 | typedef CMC_uint32 CMC_session_id; | ||
37 | typedef CMC_uint32 CMC_ui_id; | ||
38 | #endif | ||
39 | |||
40 | typedef CMC_uint16 CMC_boolean; | ||
41 | typedef CMC_sint32 CMC_enum; | ||
42 | typedef CMC_uint32 CMC_return_code; | ||
43 | typedef CMC_uint32 CMC_flags; | ||
44 | typedef CMC_string CMC_object_identifier; | ||
45 | |||
46 | #define CMC_FALSE ((CMC_boolean)0) | ||
47 | #define CMC_TRUE ((CMC_boolean)1) | ||
48 | |||
49 | /*DATA STRUCTURES*/ | ||
50 | |||
51 | /*EXTENSION*/ | ||
52 | typedef struct | ||
53 | { | ||
54 | CMC_uint32 item_code; | ||
55 | CMC_uint32 item_data; | ||
56 | CMC_buffer item_reference; | ||
57 | CMC_flags extension_flags; | ||
58 | } CMC_extension; | ||
59 | |||
60 | /*ATTACHMENT*/ | ||
61 | typedef struct | ||
62 | { | ||
63 | CMC_string attach_title; | ||
64 | CMC_object_identifier attach_type; | ||
65 | CMC_string attach_filename; | ||
66 | CMC_flags attach_flags; | ||
67 | CMC_extension *attach_extensions; | ||
68 | } CMC_attachment; | ||
69 | |||
70 | /* ATTACHMENT FLAGS */ | ||
71 | #define CMC_ATT_APP_OWNS_FILE ((CMC_flags) 1) | ||
72 | #define CMC_ATT_LAST_ELEMENT ((CMC_flags) 0x80000000) | ||
73 | |||
74 | /* ATTACHMENT OBJECT IDS */ | ||
75 | #define CMC_ATT_OID_BINARY "1 2 840 113658 1 1" | ||
76 | #define CMC_ATT_OID_TEXT "1 2 840 113658 1 1 0" | ||
77 | |||
78 | /*COUNTED STRING*/ | ||
79 | typedef struct | ||
80 | { | ||
81 | CMC_uint32 length; | ||
82 | char string[1]; | ||
83 | } CMC_counted_string; | ||
84 | |||
85 | /* EXTENSION FLAGS */ | ||
86 | #define CMC_EXT_REQUIRED ((CMC_flags) 0x00010000) | ||
87 | #define CMC_EXT_OUTPUT ((CMC_flags) 0x00020000) | ||
88 | #define CMC_EXT_LAST_ELEMENT ((CMC_flags) 0x80000000) | ||
89 | #define CMC_EXT_RSV_FLAG_MASK ((CMC_flags) 0xFFFF0000) | ||
90 | #define CMC_EXT_ITEM_FLAG_MASK ((CMC_flags) 0x0000FFFF) | ||
91 | |||
92 | /*MESSAGE REFERENCE*/ | ||
93 | typedef CMC_counted_string CMC_message_reference; | ||
94 | |||
95 | /*TIME*/ | ||
96 | typedef struct | ||
97 | { | ||
98 | CMC_sint8 second; | ||
99 | CMC_sint8 minute; | ||
100 | CMC_sint8 hour; | ||
101 | CMC_sint8 day; | ||
102 | CMC_sint8 month; | ||
103 | CMC_sint8 year; | ||
104 | CMC_sint8 isdst; | ||
105 | CMC_sint16 tmzone; | ||
106 | } CMC_time; | ||
107 | |||
108 | /*RECIPIENT*/ | ||
109 | typedef struct | ||
110 | { | ||
111 | CMC_string name; | ||
112 | CMC_enum name_type; | ||
113 | CMC_string address; | ||
114 | CMC_enum role; | ||
115 | CMC_flags recip_flags; | ||
116 | CMC_extension *recip_extensions; | ||
117 | } CMC_recipient; | ||
118 | |||
119 | /*MESSAGE*/ | ||
120 | typedef struct | ||
121 | { | ||
122 | CMC_message_reference *message_reference; | ||
123 | CMC_string message_type; | ||
124 | CMC_string subject; | ||
125 | CMC_time time_sent; | ||
126 | CMC_string text_note; | ||
127 | CMC_recipient *recipients; | ||
128 | CMC_attachment *attachments; | ||
129 | CMC_flags message_flags; | ||
130 | CMC_extension *message_extensions; | ||
131 | } CMC_message; | ||
132 | |||
133 | /* MESSAGE FLAGS */ | ||
134 | #define CMC_MSG_READ ((CMC_flags) 1) | ||
135 | #define CMC_MSG_TEXT_NOTE_AS_FILE ((CMC_flags) 2) | ||
136 | #define CMC_MSG_UNSENT ((CMC_flags) 4) | ||
137 | #define CMC_MSG_LAST_ELEMENT ((CMC_flags) 0x80000000) | ||
138 | |||
139 | /*MESSAGE SUMMARY*/ | ||
140 | typedef struct | ||
141 | { | ||
142 | CMC_message_reference *message_reference; | ||
143 | CMC_string message_type; | ||
144 | CMC_string subject; | ||
145 | CMC_time time_sent; | ||
146 | CMC_uint32 byte_length; | ||
147 | CMC_recipient *originator; | ||
148 | CMC_flags summary_flags; | ||
149 | CMC_extension *message_summary_extensions; | ||
150 | } CMC_message_summary; | ||
151 | |||
152 | /* MESSAGE SUMMARY FLAGS */ | ||
153 | #define CMC_SUM_READ ((CMC_flags) 1) | ||
154 | #define CMC_SUM_UNSENT ((CMC_flags) 2) | ||
155 | #define CMC_SUM_LAST_ELEMENT ((CMC_flags) 0x80000000) | ||
156 | |||
157 | /* NAME TYPES */ | ||
158 | #define CMC_TYPE_UNKNOWN ((CMC_enum) 0) | ||
159 | #define CMC_TYPE_INDIVIDUAL ((CMC_enum) 1) | ||
160 | #define CMC_TYPE_GROUP ((CMC_enum) 2) | ||
161 | |||
162 | /* ROLES */ | ||
163 | #define CMC_ROLE_TO ((CMC_enum) 0) | ||
164 | #define CMC_ROLE_CC ((CMC_enum) 1) | ||
165 | #define CMC_ROLE_BCC ((CMC_enum) 2) | ||
166 | #define CMC_ROLE_ORIGINATOR ((CMC_enum) 3) | ||
167 | #define CMC_ROLE_AUTHORIZING_USER ((CMC_enum) 4) | ||
168 | |||
169 | /* RECIPIENT FLAGS */ | ||
170 | #define CMC_RECIP_IGNORE ((CMC_flags) 1) | ||
171 | #define CMC_RECIP_LIST_TRUNCATED ((CMC_flags) 2) | ||
172 | #define CMC_RECIP_LAST_ELEMENT ((CMC_flags) 0x80000000) | ||
173 | |||
174 | /* TIME FLAGS */ | ||
175 | #define CMC_NO_TIMEZONE ((CMC_flags) 0x8000) | ||
176 | |||
177 | /*CMC FUNCTIONS *//*CROSS FUNCTION FLAGS */ | ||
178 | #define CMC_ERROR_UI_ALLOWED ((CMC_flags) 0x01000000) | ||
179 | #define CMC_LOGON_UI_ALLOWED ((CMC_flags) 0x02000000) | ||
180 | #define CMC_COUNTED_STRING_TYPE ((CMC_flags) 0x04000000) | ||
181 | |||
182 | /*SEND*/ | ||
183 | CMC_return_code cmc_send (CMC_session_id session, | ||
184 | CMC_message * message, | ||
185 | CMC_flags send_flags, CMC_ui_id ui_id, | ||
186 | CMC_extension * send_extensions); | ||
187 | |||
188 | #define CMC_SEND_UI_REQUESTED ((CMC_flags) 1) | ||
189 | |||
190 | /*SEND DOCUMENTS*/ | ||
191 | CMC_return_code cmc_send_documents (CMC_string recipient_addresses, | ||
192 | CMC_string subject, | ||
193 | CMC_string text_note, | ||
194 | CMC_flags send_doc_flags, | ||
195 | CMC_string file_paths, | ||
196 | CMC_string attach_titles, | ||
197 | CMC_string delimiter, | ||
198 | CMC_ui_id ui_id); | ||
199 | |||
200 | #define CMC_FIRST_ATTACH_AS_TEXT_NOTE ((CMC_flags) 2) | ||
201 | |||
202 | /*ACT ON*/ | ||
203 | CMC_return_code cmc_act_on (CMC_session_id session, | ||
204 | CMC_message_reference * message_reference, | ||
205 | CMC_enum operation, | ||
206 | CMC_flags act_on_flags, | ||
207 | CMC_ui_id ui_id, | ||
208 | CMC_extension * act_on_extensions); | ||
209 | |||
210 | #define CMC_ACT_ON_EXTENDED ((CMC_enum) 0) | ||
211 | #define CMC_ACT_ON_DELETE ((CMC_enum) 1) | ||
212 | |||
213 | /*LIST*/ | ||
214 | CMC_return_code cmc_list (CMC_session_id session, | ||
215 | CMC_string message_type, | ||
216 | CMC_flags list_flags, | ||
217 | CMC_message_reference * seed, | ||
218 | CMC_uint32 * count, CMC_ui_id ui_id, | ||
219 | CMC_message_summary ** result, | ||
220 | CMC_extension * list_extensions); | ||
221 | |||
222 | #define CMC_LIST_UNREAD_ONLY ((CMC_flags) 1) | ||
223 | #define CMC_LIST_MSG_REFS_ONLY ((CMC_flags) 2) | ||
224 | #define CMC_LIST_COUNT_ONLY ((CMC_flags) 4) | ||
225 | |||
226 | #define CMC_LENGTH_UNKNOWN 0xFFFFFFFF | ||
227 | |||
228 | /*READ*/ | ||
229 | CMC_return_code cmc_read (CMC_session_id session, | ||
230 | CMC_message_reference * message_reference, | ||
231 | CMC_flags read_flags, | ||
232 | CMC_message ** message, CMC_ui_id ui_id, | ||
233 | CMC_extension * read_extensions); | ||
234 | |||
235 | #define CMC_DO_NOT_MARK_AS_READ ((CMC_flags) 1) | ||
236 | #define CMC_MSG_AND_ATT_HDRS_ONLY ((CMC_flags) 2) | ||
237 | #define CMC_READ_FIRST_UNREAD_MESSAGE ((CMC_flags) 4) | ||
238 | |||
239 | /*LOOK UP*/ | ||
240 | CMC_return_code cmc_look_up (CMC_session_id session, | ||
241 | CMC_recipient * recipient_in, | ||