1 #ifndef _UL_CORBA_TOOLKIT_
2 #define _UL_CORBA_TOOLKIT_
6 #include <orbit/orbit.h>
7 #include <ORBitservices/CosNaming.h>
9 /* extracts type of exception: Three return Values are possible:
10 * CORBA_NO_EXCEPTION, CORBA_USER_EXCEPTION, CORBA_SYSTEM_EXCEPTION:/
12 #define etk_exception_type(ev) (ev->_major)
15 * test @ev for any exception
18 etk_raised_exception (CORBA_Environment *ev);
21 * test @ev for specific exception @ex
24 etk_raised_exception_is_a (CORBA_Environment *ev, CORBA_char* ex);
27 * in case of any exception this operation will abort the process
30 etk_abort_if_exception(CORBA_Environment *ev, const char* mesg);
33 * in case of any exception this operation will only free allocated resources
36 etk_ignore_if_exception(CORBA_Environment *ev, const char* mesg);
42 etk_export_object_to_stream (CORBA_ORB orb,
45 CORBA_Environment *ev);
48 /* Writes stringified object reference of @servant to file
49 * @filename. If error occures @ev points to exception object on
53 etk_export_object_to_file (CORBA_ORB orb,
56 CORBA_Environment *ev);
62 etk_import_object_from_stream (CORBA_ORB orb,
64 CORBA_Environment *ev);
70 etk_import_object_from_file (CORBA_ORB orb,
72 CORBA_Environment *ev);
75 /** resolves default name-service, usually given to application as
76 * command line argument "-ORBInitRef NameService=IOR:0100000028..",
77 * or since release 2.8.0 corbalocs in form of URL can be used, eg:
78 * "-ORBInitRef NameService=corbaloc:iiop:HOSTNAME:PORT/NameService%00"
80 CosNaming_NamingContext
81 etk_get_name_service (CORBA_ORB orb,
82 CORBA_Environment *ev);
85 /* binds @servant object reference to unique @name at
86 * @name_service. @name is a NULL terminated list of strings
87 * (CORBA_char*). If error occures @ev points to exception object on
91 etk_name_service_bind (CosNaming_NamingContext name_service,
94 CORBA_Environment *ev);
96 /* resolves object reference @return with unique @name at
97 * @name_service. @name is a NULL terminated list of strings
98 * (CORBA_char*). If error occures @ev points to * exception object
102 etk_name_service_resolve (CosNaming_NamingContext name_service,
104 CORBA_Environment *ev);