X-Git-Url: https://git.llucax.com/software/posixx.git/blobdiff_plain/3572c7cab4fc7e47af57722c0cc0628a54efc43f..59583e7a598819c27dea34bf619dd7a8139c028d:/src/linux/tipc.hpp diff --git a/src/linux/tipc.hpp b/src/linux/tipc.hpp index 652f4f4..2d79f25 100644 --- a/src/linux/tipc.hpp +++ b/src/linux/tipc.hpp @@ -165,12 +165,12 @@ enum reason_t * * @see TIPC documentation: 1.4.3 Name Subscriptions */ -enum subcription_t +enum subscr_t { /** - * Causes the topology service to generate a event::PUBLISHED event + * Causes the topology service to generate a PUBLISHED event * for each port name or port name sequence it finds that overlaps - * the specified port name sequence; a TIPC_WITHDRAWN event is issued + * the specified port name sequence; a WITHDRAWN event is issued * each time a previously reported name becomes unavailable. * * Allows the topology service to inform the application if there @@ -193,7 +193,7 @@ enum subcription_t * * @see TIPC documentation: 1.4.3 Name Subscriptions */ -struct subscription: tipc_subscr +struct subscr: tipc_subscr { /** * Constructor. @@ -202,30 +202,31 @@ struct subscription: tipc_subscr * @param timeout A subscription timeout value, in ms * (or WAIT_FOREVER). * @param filter An event filter specifying which events are of - * interest to the application (see subscription_t). + * interest to the application (see subscr_t). * @param usr_handle An 8 byte user handle that is application-defined. */ - subscription(nameseq seq, __u32 timeout, __u32 filter, + subscr(nameseq seq, __u32 timeout, __u32 filter, const char* usr_handle = "") throw (); }; +/// Type of events. +enum event_t +{ + /// The port has been published. + PUBLISHED = TIPC_PUBLISHED, + /// The port has been withdrawn. + WITHDRAWN = TIPC_WITHDRAWN, + /// The event has timed out. + TIMEOUT = TIPC_SUBSCR_TIMEOUT +}; + /** * Event message. * * @see TIPC documentation: 1.4.3 Name Subscriptions */ -struct event: tipc_event +struct subscr_event: tipc_event { - /// Type of events. - enum type_t - { - /// The port has been published. - PUBLISHED = TIPC_PUBLISHED, - /// The port has been withdrawn. - WITHDRAWN = TIPC_WITHDRAWN, - /// The event has timed out. - TIMEOUT = TIPC_SUBSCR_TIMEOUT - }; }; /** @@ -413,7 +414,7 @@ posixx::linux::tipc::nameseq::nameseq(__u32 t, __u32 instance) throw () } inline -posixx::linux::tipc::subscription::subscription(nameseq s, __u32 t, __u32 f, +posixx::linux::tipc::subscr::subscr(nameseq s, __u32 t, __u32 f, const char* uh) throw () { seq = s;