00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef OMNIEVENTS__PROXYPULLSUPPLIER_H
00025 #define OMNIEVENTS__PROXYPULLSUPPLIER_H
00026
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030
00031 #ifdef HAVE_IOSTREAM
00032 # include <iostream>
00033 #else
00034 # include <iostream.h>
00035 #endif
00036
00037 #include "ProxyManager.h"
00038 #include "EventQueue.h"
00039
00040 #include "CosEventChannelAdmin.hh"
00041
00042 #ifdef HAVE_STD_IOSTREAM
00043 using namespace std;
00044 #endif
00045
00046 namespace OmniEvents {
00047
00048 class ProxyPullSupplierManager
00049 : public ProxyManager
00050 {
00051 public:
00052 PortableServer::Servant incarnate(
00053 const PortableServer::ObjectId& oid,
00054 PortableServer::POA_ptr poa
00055 );
00056 public:
00057 ProxyPullSupplierManager(PortableServer::POA_ptr parentPoa, EventQueue& q);
00058 CosEventChannelAdmin::ProxyPullSupplier_ptr createObject();
00059 private:
00060 EventQueue& _queue;
00061 };
00062
00063
00069 class ProxyPullSupplier_i
00070 : public virtual POA_CosEventChannelAdmin::ProxyPullSupplier,
00071 public Proxy,
00072 public EventQueue::Reader
00073 {
00074 public:
00075 void connect_pull_consumer(CosEventComm::PullConsumer_ptr pullConsumer);
00076 void disconnect_pull_supplier();
00077 CORBA::Any* pull();
00078 CORBA::Any* try_pull(CORBA::Boolean& has_event);
00079 public:
00080 ProxyPullSupplier_i(PortableServer::POA_ptr poa, EventQueue& q);
00081 void reincarnate(const OEP_prxy& prxy);
00082 void output(ostream& os);
00083 private:
00084 CosEventComm::PullConsumer::_var_type _target;
00085 };
00086
00087 };
00088
00089 #endif // OMNIEVENTS__PROXYPULLSUPPLIER_H