1 // 2 // Copyright (c) ZeroC, Inc. All rights reserved. 3 // 4 5 #ifndef ICEPY_DISPATCHER_H 6 #define ICEPY_DISPATCHER_H 7 8 #include <Config.h> 9 #include <Util.h> 10 #include <Ice/CommunicatorF.h> 11 #include <Ice/Dispatcher.h> 12 13 namespace IcePy 14 { 15 16 bool initDispatcher(PyObject*); 17 18 class Dispatcher : public Ice::Dispatcher 19 { 20 public: 21 22 Dispatcher(PyObject*); 23 24 void setCommunicator(const Ice::CommunicatorPtr&); 25 26 virtual void dispatch(const Ice::DispatcherCallPtr&, const Ice::ConnectionPtr&); 27 28 private: 29 30 PyObjectHandle _dispatcher; 31 Ice::CommunicatorPtr _communicator; 32 }; 33 typedef IceUtil::Handle<Dispatcher> DispatcherPtr; 34 35 } 36 37 #endif 38