Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / tests / EC_MT_Mcast / Consumer.h
blob401740731d920a3f8f545b4cac59e3ce030b5849
1 // Reused from: $TAO_ROOT/orbsvcs/examples/RtEC/MCast
3 #ifndef CONSUMER_H
4 #define CONSUMER_H
6 #include "orbsvcs/RtecEventCommS.h"
7 #include "orbsvcs/RtecEventChannelAdminC.h"
9 #if !defined (ACE_LACKS_PRAGMA_ONCE)
10 # pragma once
11 #endif /* ACE_LACKS_PRAGMA_ONCE */
13 class Consumer : public POA_RtecEventComm::PushConsumer
15 // = TITLE
16 // Simple consumer object
18 // = DESCRIPTION
19 // This class is a consumer of events.
20 // It simply subscribes to one event type.
22 public:
23 Consumer ();
24 // Constructor
26 void connect (RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin);
27 // Connect to the Event Channel
29 void disconnect ();
30 // Disconnect from the event channel
32 // = The RtecEventComm::PushConsumer methods
34 virtual void push (const RtecEventComm::EventSet& events);
35 virtual void disconnect_push_consumer ();
36 // The skeleton methods.
38 private:
39 CORBA::ULong event_count_;
40 // Keep track of the number of events received.
42 RtecEventChannelAdmin::ProxyPushSupplier_var proxy_;
43 // The proxy
46 #endif /* CONSUMER_H */