xcmc.h

Go to the documentation of this file.
00001   /*BEGIN CMC INTERFACE */
00002 
00003 #ifndef _XCMC_H
00004 #define _XCMC_H
00005 #pragma option -b
00006 
00007 #ifdef __BORLANDC__
00008 #pragma option -b.
00009   #include <pshpack8.h>
00010 #pragma option -b
00011 #endif
00012 
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016 
00017 /*BASIC DATA TYPES*/
00018 #ifndef DIFFERENT_PLATFORM
00019 typedef char                CMC_sint8;
00020 typedef short               CMC_sint16;
00021 typedef long int            CMC_sint32;
00022 typedef unsigned short int  CMC_uint16;
00023 typedef unsigned long int   CMC_uint32;
00024 typedef void  *          CMC_buffer;
00025 typedef char  *          CMC_string;
00026 #endif
00027 
00028 typedef CMC_uint16          CMC_boolean;
00029 typedef CMC_sint32          CMC_enum;
00030 typedef CMC_uint32          CMC_return_code;
00031 typedef CMC_uint32          CMC_flags;
00032 typedef CMC_string          CMC_object_identifier;
00033 
00034 #define CMC_FALSE   ((CMC_boolean)0)
00035 #define CMC_TRUE    ((CMC_boolean)1)
00036 
00037 /*DATA STRUCTURES*/
00038 
00039 /*COUNTED STRING*/
00040 typedef struct {
00041     CMC_uint32          length;
00042     char                string[1];
00043 } CMC_counted_string;
00044 
00045 /*SESSION ID*/
00046 typedef CMC_uint32      CMC_session_id;
00047 
00048 /*TIME*/
00049 /* unusedX fields needed to align struct on 4-byte boundary */
00050 typedef struct {
00051     CMC_sint8           second;
00052     CMC_sint8           minute;
00053     CMC_sint8           hour;
00054     CMC_sint8           day;
00055     CMC_sint8           month;
00056     CMC_sint8           year;
00057     CMC_sint8           isdst;
00058     CMC_sint8           unused1;
00059     CMC_sint16          tmzone;
00060     CMC_sint16          unused2;
00061 } CMC_time;
00062 
00063 #define CMC_NO_TIMEZONE                     ((CMC_sint16) 0x8000)
00064 
00065 typedef CMC_uint32          CMC_ui_id;
00066 
00067 /*EXTENSION*/
00068 typedef struct {
00069     CMC_uint32              item_code;
00070     CMC_uint32              item_data;
00071     CMC_buffer              item_reference;
00072     CMC_flags               extension_flags;
00073 } CMC_extension;
00074 
00075 /* EXTENSION FLAGS */
00076 #define CMC_EXT_REQUIRED                    ((CMC_flags) 0x00010000)
00077 #define CMC_EXT_OUTPUT                      ((CMC_flags) 0x00020000)
00078 #define CMC_EXT_LAST_ELEMENT                ((CMC_flags) 0x80000000)
00079 #define CMC_EXT_RSV_FLAG_MASK               ((CMC_flags) 0xFFFF0000)
00080 #define CMC_EXT_ITEM_FLAG_MASK              ((CMC_flags) 0x0000FFFF)
00081 
00082 /*ATTACHMENT*/
00083 typedef struct {
00084     CMC_string              attach_title;
00085     CMC_object_identifier   attach_type;
00086     CMC_string              attach_filename;
00087     CMC_flags               attach_flags;
00088     CMC_extension        *attach_extensions;
00089 } CMC_attachment;
00090 
00091 /* ATTACHMENT FLAGS */
00092 #define CMC_ATT_APP_OWNS_FILE               ((CMC_flags) 1)
00093 #define CMC_ATT_LAST_ELEMENT                ((CMC_flags) 0x80000000)
00094 
00095 #define CMC_ATT_OID_BINARY                  "? ? ? ? ? ?"
00096 #define CMC_ATT_OID_TEXT                    "? ? ? ? ? ?"
00097 
00098 /*MESSAGE REFERENCE*/
00099 typedef CMC_counted_string  CMC_message_reference;
00100 
00101 /*RECIPIENT*/
00102 typedef struct {
00103     CMC_string              name;
00104     CMC_enum                name_type;
00105     CMC_string              address;
00106     CMC_enum                role;
00107     CMC_flags               recip_flags;
00108     CMC_extension        *recip_extensions;
00109 } CMC_recipient;
00110 
00111 /* NAME TYPES */
00112 #define CMC_TYPE_UNKNOWN                    ((CMC_enum) 0)
00113 #define CMC_TYPE_INDIVIDUAL                 ((CMC_enum) 1)
00114 #define CMC_TYPE_GROUP                      ((CMC_enum) 2)
00115 
00116 /* ROLES */
00117 #define CMC_ROLE_TO                         ((CMC_enum) 0)
00118 #define CMC_ROLE_CC                         ((CMC_enum) 1)
00119 #define CMC_ROLE_BCC                        ((CMC_enum) 2)
00120 #define CMC_ROLE_ORIGINATOR                 ((CMC_enum) 3)
00121 #define CMC_ROLE_AUTHORIZING_USER           ((CMC_enum) 4)
00122 
00123 /* RECIPIENT FLAGS */
00124 #define CMC_RECIP_IGNORE                    ((CMC_flags) 1)
00125 #define CMC_RECIP_LIST_TRUNCATED            ((CMC_flags) 2)
00126 #define CMC_RECIP_LAST_ELEMENT              ((CMC_flags) 0x80000000)
00127 
00128 /*MESSAGE*/
00129 typedef struct {
00130     CMC_message_reference    *message_reference;
00131     CMC_string              message_type;
00132     CMC_string              subject;
00133     CMC_time                time_sent;
00134     CMC_string              text_note;
00135     CMC_recipient        *recipients;
00136     CMC_attachment       *attachments;
00137     CMC_flags               message_flags;
00138     CMC_extension        *message_extensions;
00139 } CMC_message;
00140 
00141 /* MESSAGE FLAGS */
00142 #define CMC_MSG_READ                        ((CMC_flags) 1)
00143 #define CMC_MSG_TEXT_NOTE_AS_FILE           ((CMC_flags) 2)
00144 #define CMC_MSG_UNSENT                      ((CMC_flags) 4)
00145 #define CMC_MSG_LAST_ELEMENT                ((CMC_flags) 0x80000000)
00146 
00147 /*MESSAGE SUMMARY*/
00148 typedef struct {
00149     CMC_message_reference    *message_reference;
00150     CMC_string              message_type;
00151     CMC_string              subject;
00152     CMC_time                time_sent;
00153     CMC_uint32              byte_length;
00154     CMC_recipient        *originator;
00155     CMC_flags               summary_flags;
00156     CMC_extension        *message_summary_extensions;
00157 } CMC_message_summary;
00158 
00159 /* MESSAGE SUMMARY FLAGS */
00160 #define CMC_SUM_READ                        ((CMC_flags) 1)
00161 #define CMC_SUM_UNSENT                      ((CMC_flags) 2)
00162 #define CMC_SUM_LAST_ELEMENT                ((CMC_flags) 0x80000000)
00163 
00164 /*CMC FUNCTIONS */
00165 
00166 /*CROSS FUNCTION FLAGS */
00167 #define CMC_ERROR_UI_ALLOWED                ((CMC_flags) 0x01000000)
00168 #define CMC_LOGON_UI_ALLOWED                ((CMC_flags) 0x02000000)
00169 #define CMC_COUNTED_STRING_TYPE             ((CMC_flags) 0x04000000)
00170 
00171 /*SEND*/
00172 CMC_return_code  PASCAL
00173 cmc_send(
00174     CMC_session_id          session,
00175     CMC_message          *message,
00176     CMC_flags               send_flags,
00177     CMC_ui_id               ui_id,
00178     CMC_extension        *send_extensions
00179 );
00180 
00181 #define CMC_SEND_UI_REQUESTED               ((CMC_flags) 1)
00182 
00183 /*SEND DOCUMENT*/
00184 CMC_return_code  PASCAL
00185 cmc_send_documents(
00186     CMC_string              recipient_addresses,
00187     CMC_string              subject,
00188     CMC_string              text_note,
00189     CMC_flags               send_doc_flags,
00190     CMC_string              file_paths,
00191     CMC_string              file_names,
00192     CMC_string              delimiter,
00193     CMC_ui_id               ui_id
00194 );
00195 
00196 #define CMC_FIRST_ATTACH_AS_TEXT_NOTE       ((CMC_flags) 2)
00197 
00198 /*ACT ON*/
00199 CMC_return_code  PASCAL
00200 cmc_act_on(
00201     CMC_session_id          session,
00202     CMC_message_reference    *message_reference,
00203     CMC_enum                operation,
00204     CMC_flags               act_on_flags,
00205     CMC_ui_id               ui_id,
00206     CMC_extension        *act_on_extensions
00207 );
00208 
00209 #define CMC_ACT_ON_EXTENDED                 ((CMC_enum) 0)
00210 #define CMC_ACT_ON_DELETE                   ((CMC_enum) 1)
00211 
00212 /*LIST*/
00213 CMC_return_code  PASCAL
00214 cmc_list(
00215     CMC_session_id          session,
00216     CMC_string              message_type,
00217     CMC_flags               list_flags,
00218     CMC_message_reference    *seed,
00219     CMC_uint32           *count,
00220     CMC_ui_id               ui_id,
00221     CMC_message_summary  *  *result,
00222     CMC_extension        *list_extensions
00223 );
00224 
00225 #define CMC_LIST_UNREAD_ONLY                ((CMC_flags) 1)
00226 #define CMC_LIST_MSG_REFS_ONLY              ((CMC_flags) 2)
00227 #define CMC_LIST_COUNT_ONLY                 ((CMC_flags) 4)
00228 
00229 #define CMC_LENGTH_UNKNOWN          0xFFFFFFFF
00230 
00231 /*READ*/
00232 CMC_return_code  PASCAL
00233 cmc_read(
00234     CMC_session_id          session,
00235     CMC_message_reference    *message_reference,
00236     CMC_flags               read_flags,
00237     CMC_message  *    *message,
00238     CMC_ui_id               ui_id,
00239     CMC_extension        *read_extensions
00240 );
00241 
00242 #define CMC_DO_NOT_MARK_AS_READ             ((CMC_flags) 1)
00243 #define CMC_MSG_AND_ATT_HDRS_ONLY           ((CMC_flags) 2)
00244 #define CMC_READ_FIRST_UNREAD_MESSAGE       ((CMC_flags) 4)
00245 
00246 /*LOOK UP*/
00247 CMC_return_code  PASCAL
00248 cmc_look_up(
00249     CMC_session_id          session,
00250     CMC_recipient        *recipient_in,
00251     CMC_flags               look_up_flags,
00252     CMC_ui_id               ui_id,
00253     CMC_uint32           *count,
00254     CMC_recipient  *  *recipient_out,
00255     CMC_extension        *look_up_extensions
00256 );
00257 
00258 #define CMC_LOOKUP_RESOLVE_PREFIX_SEARCH    ((CMC_flags) 1)
00259 #define CMC_LOOKUP_RESOLVE_IDENTITY         ((CMC_flags) 2)
00260 #define CMC_LOOKUP_RESOLVE_UI               ((CMC_flags) 4)
00261 #define CMC_LOOKUP_DETAILS_UI               ((CMC_flags) 8)
00262 #define CMC_LOOKUP_ADDRESSING_UI            ((CMC_flags) 16)
00263 
00264 /*FREE*/
00265 CMC_return_code  PASCAL
00266 cmc_free(
00267     CMC_buffer              memory
00268 );
00269 
00270 /* LOGOFF */
00271 CMC_return_code  PASCAL
00272 cmc_logoff(
00273     CMC_session_id          session,
00274     CMC_ui_id               ui_id,
00275     CMC_flags               logoff_flags,
00276     CMC_extension        *logoff_extensions
00277 );
00278 
00279 #define CMC_LOGOFF_UI_ALLOWED               ((CMC_flags) 1)
00280 
00281 /* LOGON */
00282 CMC_return_code  PASCAL
00283 cmc_logon(
00284     CMC_string              service,
00285     CMC_string              user,
00286     CMC_string              password,
00287     CMC_object_identifier   character_set,
00288     CMC_ui_id               ui_id,
00289     CMC_uint16              caller_cmc_version,
00290     CMC_flags               logon_flags,
00291     CMC_session_id       *session,
00292     CMC_extension        *logon_extensions
00293 );
00294 
00295 #define CMC_VERSION         ((CMC_uint16) 100)
00296 
00297 /* QUERY CONFIGURATION */
00298 CMC_return_code  PASCAL
00299 cmc_query_configuration(
00300     CMC_session_id          session,
00301     CMC_enum                item,
00302     CMC_buffer              reference,
00303     CMC_extension        *config_extensions
00304 );
00305 
00306 /*QUERY CONFIGURATION ENUMS */
00307 #define CMC_CONFIG_CHARACTER_SET            ((CMC_enum) 1)
00308 #define CMC_CONFIG_LINE_TERM                ((CMC_enum) 2)
00309 #define CMC_CONFIG_DEFAULT_SERVICE          ((CMC_enum) 3)
00310 #define CMC_CONFIG_DEFAULT_USER             ((CMC_enum) 4)
00311 #define CMC_CONFIG_REQ_PASSWORD             ((CMC_enum) 5)
00312 #define CMC_CONFIG_REQ_SERVICE              ((CMC_enum) 6)
00313 #define CMC_CONFIG_REQ_USER                 ((CMC_enum) 7)
00314 #define CMC_CONFIG_UI_AVAIL                 ((CMC_enum) 8)
00315 #define CMC_CONFIG_SUP_NOMKMSGREAD          ((CMC_enum) 9)
00316 #define CMC_CONFIG_SUP_COUNTED_STR          ((CMC_enum) 10)
00317 #define CMC_CONFIG_VER_IMPLEM               ((CMC_enum) 11)
00318 #define CMC_CONFIG_VER_SPEC                 ((CMC_enum) 12)
00319 
00320 /* CONFIG LINE TERM ENUM */
00321 #define CMC_LINE_TERM_CRLF                  ((CMC_enum) 0)
00322 #define CMC_LINE_TERM_CR                    ((CMC_enum) 1)
00323 #define CMC_LINE_TERM_LF                    ((CMC_enum) 2)
00324 
00325 /* CONFIG REQUIRED LOGON PARAMETER ENUM */
00326 #define CMC_REQUIRED_NO                     ((CMC_enum) 0)
00327 #define CMC_REQUIRED_YES                    ((CMC_enum) 1)
00328 #define CMC_REQUIRED_OPT                    ((CMC_enum) 2)
00329 
00330 /* DEFINED OBJECT ID'S FOR CHARACTER SETS */
00331 #define CMC_CHAR_CP437                      "1 2 840 113556 3 2 437"
00332 #define CMC_CHAR_CP850                      "1 2 840 113556 3 2 850"
00333 #define CMC_CHAR_CP1252                     "1 2 840 113556 3 2 1252"
00334 #define CMC_CHAR_ISTRING                    "1 2 840 113556 3 2 0"
00335 #define CMC_CHAR_UNICODE                    "1 2 840 113556 3 2 1"
00336 
00337 /* RETURN CODE FLAGS */
00338 #define CMC_ERROR_DISPLAYED                 ((CMC_return_code) 0x00008000)
00339 #define CMC_ERROR_RSV_MASK                  ((CMC_return_code) 0x0000FFFF)
00340 #define CMC_ERROR_IMPL_MASK                 ((CMC_return_code) 0xFFFF0000)
00341 
00342 /* RETURN CODES */
00343 #define CMC_SUCCESS                         ((CMC_return_code) 0)
00344 
00345 #define CMC_E_AMBIGUOUS_RECIPIENT           ((CMC_return_code) 1)
00346 #define CMC_E_ATTACHMENT_NOT_FOUND          ((CMC_return_code) 2)
00347 #define CMC_E_ATTACHMENT_OPEN_FAILURE       ((CMC_return_code) 3)
00348 #define CMC_E_ATTACHMENT_READ_FAILURE       ((CMC_return_code) 4)
00349 #define CMC_E_ATTACHMENT_WRITE_FAILURE      ((CMC_return_code) 5)
00350 #define CMC_E_COUNTED_STRING_UNSUPPORTED    ((CMC_return_code) 6)
00351 #define CMC_E_DISK_FULL                     ((CMC_return_code) 7)
00352 #define CMC_E_FAILURE                       ((CMC_return_code) 8)
00353 #define CMC_E_INSUFFICIENT_MEMORY           ((CMC_return_code) 9)
00354 #define CMC_E_INVALID_CONFIGURATION         ((CMC_return_code) 10)
00355 #define CMC_E_INVALID_ENUM                  ((CMC_return_code) 11)
00356 #define CMC_E_INVALID_FLAG                  ((CMC_return_code) 12)
00357 #define CMC_E_INVALID_MEMORY                ((CMC_return_code) 13)
00358 #define CMC_E_INVALID_MESSAGE_PARAMETER     ((CMC_return_code) 14)
00359 #define CMC_E_INVALID_MESSAGE_REFERENCE     ((CMC_return_code) 15)
00360 #define CMC_E_INVALID_PARAMETER             ((CMC_return_code) 16)
00361 #define CMC_E_INVALID_SESSION_ID            ((CMC_return_code) 17)
00362 #define CMC_E_INVALID_UI_ID                 ((CMC_return_code) 18)
00363 #define CMC_E_LOGON_FAILURE                 ((CMC_return_code) 19)
00364 #define CMC_E_MESSAGE_IN_USE                ((CMC_return_code) 20)
00365 #define CMC_E_NOT_SUPPORTED                 ((CMC_return_code) 21)
00366 #define CMC_E_PASSWORD_REQUIRED             ((CMC_return_code) 22)
00367 #define CMC_E_RECIPIENT_NOT_FOUND           ((CMC_return_code) 23)
00368 #define CMC_E_SERVICE_UNAVAILABLE           ((CMC_return_code) 24)
00369 #define CMC_E_TEXT_TOO_LARGE                ((CMC_return_code) 25)
00370 #define CMC_E_TOO_MANY_FILES                ((CMC_return_code) 26)
00371 #define CMC_E_TOO_MANY_RECIPIENTS           ((CMC_return_code) 27)
00372 #define CMC_E_UNABLE_TO_NOT_MARK_AS_READ    ((CMC_return_code) 28)
00373 #define CMC_E_UNRECOGNIZED_MESSAGE_TYPE     ((CMC_return_code) 29)
00374 #define CMC_E_UNSUPPORTED_ACTION            ((CMC_return_code) 30)
00375 #define CMC_E_UNSUPPORTED_CHARACTER_SET     ((CMC_return_code) 31)
00376 #define CMC_E_UNSUPPORTED_DATA_EXT          ((CMC_return_code) 32)
00377 #define CMC_E_UNSUPPORTED_FLAG              ((CMC_return_code) 33)
00378 #define CMC_E_UNSUPPORTED_FUNCTION_EXT      ((CMC_return_code) 34)
00379 #define CMC_E_UNSUPPORTED_VERSION           ((CMC_return_code) 35)
00380 #define CMC_E_USER_CANCEL                   ((CMC_return_code) 36)
00381 #define CMC_E_USER_NOT_LOGGED_ON            ((CMC_return_code) 37)
00382 
00383 #ifdef __cplusplus
00384 }       /* extern "C" */
00385 #endif
00386 
00387 #ifdef __BORLANDC__
00388 #pragma option -b.
00389   #include <poppack.h>
00390 #pragma option -b
00391 #endif
00392 
00393 #pragma option -b.
00394 #endif  /* _XCMC_H */
00395 


Raosoft, Inc.
Raosoft EZReport, EZSurvey, InterForm, RapidReport, Raosoft, and SurveyWin are registered trademarks of Raosoft, Inc. Page contents © 1996-2007 by Raosoft, Inc. You may use and modify this file for your own use, but may not distribute it or derivative works without the prior written consent of Raosoft, Inc. This software is provided "as is," and Raosoft makes no warranty, express or implied, of fitness for a particular application. Every measure has been taken to anticipate risks inherent to computer networks, but we cannot guarantee safety or reliability of this program in every situation.
Tel: 206-525-4025 (US) Email: raosoft@raosoft.com
http://www.raosoft.com/