From db9dc73fb458638973a458ba76a2d7f159c96c4d Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Sun, 3 Jun 2012 14:01:02 +0200 Subject: libdistrio_common: rename common -> helper - include 'common.h' in other components sounds bad Signed-off-by: Manuel Traut --- common/distrio_helper.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 common/distrio_helper.h (limited to 'common/distrio_helper.h') diff --git a/common/distrio_helper.h b/common/distrio_helper.h new file mode 100644 index 0000000..8070544 --- /dev/null +++ b/common/distrio_helper.h @@ -0,0 +1,40 @@ +/** + * CORBA helpers + * + * - init orb + * - get reference to name service + * - register objects @ name service + * + * @author Manuel Traut + * @licence GPLv2 + */ + +#include +#include +#include + +#include + +/** + * handle to corba objects needed for registration of new objects and running + * the ORB + */ +typedef struct _corba_ref { + /** init > 0 if orb is initialized */ + int init; + CORBA::ORB_var orb; + PortableServer::POA_var poa; + PortableServer::POAManager_var poa_mgr; + CosNaming::NamingContext_var nc; +} corba_ref; + +static corba_ref ref = { + .init = 0, +}; + +/** initialize corba orb - argc, argv as passed to main() */ +int init_corba (int argc, char **argv); +/** register a digital io with a common name at the naming service */ +int register_digital (char *_name, Distrio_Digital_i *digital); +/** run the orb - function blocks until orb shutdown */ +int run_orb (void); -- cgit v1.2.3