Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

tc/envelope.h

Go to the documentation of this file.
00001 /*==============================================================================
00002                 Copyright (c) 2003-2005 UGS Corporation
00003                    Unpublished - All Rights Reserved
00004  ==============================================================================*/
00005 
00023 /*  */
00024 
00025 #ifndef ENVELOPE_H
00026 #define ENVELOPE_H
00027 
00028 #include <tccore/workspaceobject.h>
00029 
00044 typedef struct MAIL_message_s
00045 {
00046     tag_t       tag;              
00047     const char* from_user;        
00048     const char* to_user;          
00049     const char* subject;          
00050     const char* text;             
00051     logical     is_Cc_recipient;  
00052 } MAIL_message_t;
00053 
00054 typedef int (* MAIL_send_callback_t) ( MAIL_message_t message );
00055 
00056 typedef enum MAIL_callback_position_e
00057 {
00058     MAIL_replaced_callback,
00059     MAIL_before_callback,
00060     MAIL_after_callback
00061 }   MAIL_callback_position_t;
00062 
00063 typedef enum MAIL_to_or_cc_e
00064 {
00065     MAIL_send_to,
00066     MAIL_send_cc
00067 } MAIL_to_or_cc_t;
00068 
00069 #include <tc/libtc_exports.h>
00070 
00071 #ifdef __cplusplus
00072 extern "C"{
00073 #endif
00074 
00075 extern TC_API int MAIL_envelope_extent(
00076     int*            n_instances,    
00077     tag_t**         instances       
00078     );
00079 
00088 extern TC_API int MAIL_create_envelope (
00089     const char      subject[WSO_name_size_c + 1],   
00090     const char      comments[WSO_desc_size_c + 1],  
00091     tag_t*          envelope                        
00092     );
00093 
00101 extern TC_API int MAIL_initialize_envelope (
00102     tag_t           envelope,                       
00103     const char      subject[WSO_name_size_c + 1],   
00104     const char      comments[WSO_desc_size_c + 1]   
00105     );
00106 
00111 extern TC_API int MAIL_initialize_envelope2 (
00112     tag_t           envelope,                       
00113     const char      *subject,                       
00114     const char      *comments                       
00115     );
00116 
00121 extern TC_API int MAIL_add_envelope_receiver (
00122     tag_t           envelope,   
00123     tag_t           receiver    
00124     );
00125 
00130 extern TC_API int MAIL_add_envelope_cc_receiver (
00131     tag_t           envelope,   
00132     tag_t           ccReceiver  
00133     );
00134 
00138 extern TC_API int MAIL_list_envelope_receivers (
00139     tag_t           envelope,   
00140     int*            count,      
00141     tag_t**         receivers   
00142     );
00143 
00147 extern TC_API int MAIL_list_envelope_to_receivers (
00148     tag_t           envelope,   
00149     int*            count,      
00150     tag_t**         receivers   
00151     );
00152 
00156 extern TC_API int MAIL_list_envelope_cc_receivers (
00157     tag_t           envelope,    
00158     int*            count,       
00159     tag_t**         ccReceivers  
00160     );
00161 
00170 extern TC_API int MAIL_send_envelope (
00171     tag_t           envelope    
00172     );
00173 
00189 extern TC_API int MAIL_register_send_callback(
00190     MAIL_send_callback_t        function_pointer, 
00191     MAIL_callback_position_t    position          
00192     );
00193 
00201 extern TC_API int MAIL_add_external_receiver (
00202     tag_t           envelope,   
00203     MAIL_to_or_cc_t to_or_cc,   
00204     char*           receiver    
00205     );
00206 
00209 #ifdef __cplusplus
00210 }
00211 #endif
00212 
00213 #include <tc/libtc_undef.h>
00214 
00215 #endif