Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / examples / Log / Notify / Notify_Supplier.h
blob438ee6784ad4f60b03ef737958cc0a3935ddc834
1 /* -*- C++ -*- */
3 // ============================================================================
4 /**
5 * @file Notify_Supplier.h
7 * An example of using the Notify_Logging_Service.
9 * @author D A Hanvey (d.hanvey@qub.ac.uk)
11 // ============================================================================
13 #ifndef NOTIFY_SUPPLIER_H
14 #define NOTIFY_SUPPLIER_H
16 #include "orbsvcs/CosNotifyChannelAdminS.h"
17 #include "orbsvcs/DsNotifyLogAdminC.h"
18 #include "orbsvcs/CosNamingC.h"
19 #include "orbsvcs/CosNotifyCommS.h"
22 class Filter_StructuredPushSupplier;
24 #if !defined (ACE_LACKS_PRAGMA_ONCE)
25 # pragma once
26 #endif /* ACE_LACKS_PRAGMA_ONCE */
28 class Supplier
30 // = TITLE
31 // Simple supplier object
33 // = DESCRIPTION
34 // This class is a supplier of events.
36 public:
37 Supplier ();
38 // Constructor
40 ~Supplier ();
41 // Destructor.
43 int run (int argc, ACE_TCHAR* argv[]);
44 // Run the test
46 private:
47 // = Data Members
48 CORBA::ORB_var orb_;
49 // The ORB that we use.
51 CosNaming::NamingContext_var naming_context_;
52 // Handle to the name service.
54 DsNotifyLogAdmin::NotifyLogFactory_var notify_log_factory_;
55 // The notify log factory from the Log Service.
57 DsNotifyLogAdmin::NotifyLog_var notify_log_;
59 Filter_StructuredPushSupplier* supplier_1;
61 CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_;
64 class Filter_StructuredPushSupplier
65 : public POA_CosNotifyComm::StructuredPushSupplier
67 // = TITLE
68 // Filter_StructuredPushSupplier
70 // = DESCRIPTION
71 // Supplier for the filter example.
73 public:
74 Filter_StructuredPushSupplier ();
75 // Constructor.
77 void connect (CosNotifyChannelAdmin::SupplierAdmin_ptr supplier_admin);
78 // Connect the Supplier to the EventChannel.
79 // Creates a new proxy supplier and connects to it.
81 void disconnect ();
82 // Disconnect from the supplier.
84 virtual void send_event (const CosNotification::StructuredEvent& event);
85 // Send one event.
87 protected:
88 // = Data members
89 CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxy_consumer_;
90 // The proxy that we are connected to.
92 CosNotifyChannelAdmin::ProxyID proxy_consumer_id_;
93 // This supplier's id.
95 // = Protected Methods
96 virtual ~Filter_StructuredPushSupplier ();
97 // Destructor
99 // = NotifySubscribe
100 virtual void subscription_change (
101 const CosNotification::EventTypeSeq & added,
102 const CosNotification::EventTypeSeq & removed);
104 // = StructuredPushSupplier method
105 virtual void disconnect_structured_push_supplier ();
109 #endif /* NOTIFY_SUPPLIER_H */