it_bus/bus_c.h

00001 // @Copyright (c) 2003 IONA Technologies PLC. All Rights Reserved.
00002 //
00003 
00004 #ifndef _IT_BUS_NATIVE_INTERFACE_
00005 #define _IT_BUS_NATIVE_INTERFACE_
00006 
00007 #include <it_cal/features.h>
00008 #include <it_cal/types.h>
00009 #include <stdlib.h>
00010 
00011 #if defined(IT_BUS_C_API_EXPORT)
00012 #define IT_BUS_C_API IT_DECLSPEC_EXPORT
00013 #else
00014 #define IT_BUS_C_API IT_DECLSPEC_IMPORT
00015 #endif
00016 
00017 #if defined(__cplusplus)
00018 extern "C" 
00019 { 
00020 #endif 
00021 
00022 typedef IT_PtrHolder it_bus_handle_t;
00023 typedef IT_Long      it_bus_result_t;
00024 typedef IT_Octet*    it_buffer_t;
00025 
00026 
00027 #define IT_BUS_RESULT_SUCCESS           0x00000000    
00028 #define IT_BUS_RESULT_ERROR_INIT        0x00000001
00029 #define IT_BUS_RESULT_ERROR_RUN         0x00000002
00030 #define IT_BUS_RESULT_ERROR_SHUTDOWN    0x00000003
00031 
00032 #define IT_BUS_RESULT_ERROR_BAD_POINTER 0x00000004
00033 #define IT_BUS_RESULT_ERROR_CANT_ALLOC  0x00000005
00034 
00035 
00036 it_bus_result_t IT_BUS_C_API
00037 it_bus_init(int argc, char *argv[], char* orb_identifier, it_bus_handle_t* bus_handle);
00038 
00039 it_bus_result_t IT_BUS_C_API
00040 it_bus_run(it_bus_handle_t bus_handle);
00041 
00042 it_bus_result_t IT_BUS_C_API
00043 it_bus_shutdown(IT_Bool wait_for_complete, it_bus_handle_t bus_handle);
00044 
00045 typedef IT_PtrHolder it_service_handle_t;
00046 typedef IT_PtrHolder it_port_handle_t;
00047 typedef IT_PtrHolder it_operation_handle_t;
00048 
00049 
00050 
00051 it_bus_result_t IT_BUS_C_API
00052 it_bus_malloc(size_t size, it_buffer_t* new_mem);
00053 
00054 it_bus_result_t IT_BUS_C_API
00055 it_bus_realloc(size_t new_size, it_buffer_t* mem);
00056 
00057 it_bus_result_t IT_BUS_C_API
00058 it_bus_free(it_buffer_t mem);
00059 
00060 #define IT_BUS_MESSAGE_STRING         0x00000000    
00061 #define IT_BUS_MESSAGE_BINARY         0x00000001
00062 #define IT_BUS_MESSAGE_ONE_WAY        0x00000000    
00063 #define IT_BUS_MESSAGE_TWO_WAY        0x00000002
00064 typedef IT_ULong it_message_type_t;
00065 
00066 typedef it_bus_result_t (*it_messaging_callback_t)(
00067     it_message_type_t message_type, 
00068     const it_buffer_t input_message,
00069     IT_ULong input_message_length,
00070     it_buffer_t* ouput_message,
00071     IT_ULong* output_message_length
00072 );
00073 
00074 it_bus_result_t IT_BUS_C_API
00075 it_bus_messaging_init(const char* wsdl_url);
00076 
00077 it_bus_result_t IT_BUS_C_API
00078 it_bus_set_messaging_callback(it_messaging_callback_t pfn);
00079 
00080 it_bus_result_t IT_BUS_C_API
00081 it_bus_create_messaging_port(it_port_handle_t* port_handle);
00082 
00083 it_bus_result_t IT_BUS_C_API
00084 it_bus_messaging_send(
00085     it_port_handle_t port_handle, 
00086     it_message_type_t message_type, 
00087     const it_buffer_t input_message,
00088     IT_ULong input_message_length
00089 );
00090 
00091 it_bus_result_t IT_BUS_C_API
00092 it_bus_messaging_receive(
00093     it_port_handle_t port_handle, 
00094     it_buffer_t* ouput_message,
00095     IT_ULong* output_message_length
00096 );
00097 
00098 it_bus_result_t IT_BUS_C_API
00099 it_bus_messaging_invoke(
00100     it_port_handle_t    port_handle, 
00101     it_message_type_t   message_type, 
00102     const it_buffer_t         input_message,
00103     IT_ULong            input_message_length,
00104     it_buffer_t*              ouput_message,
00105     IT_ULong*           output_message_length
00106 );
00107 
00108 #if defined(__cplusplus)
00109 }
00110 #endif 
00111 
00112 #endif 

Generated on Thu Sep 7 11:38:51 2006 for Artix by  doxygen 1.4.7