00001 // -*- C++ -*- 00020 #ifndef RTC_OUTPORTPULLCONNECTOR_H 00021 #define RTC_OUTPORTPULLCONNECTOR_H 00022 00023 #include <rtm/OutPortConnector.h> 00024 #include <rtm/ConnectorListener.h> 00025 00026 namespace RTC 00027 { 00028 class OutPortProvider; 00029 00049 class OutPortPullConnector 00050 : public OutPortConnector 00051 { 00052 public: 00053 DATAPORTSTATUS_ENUM 00054 00080 OutPortPullConnector(ConnectorInfo info, 00081 OutPortProvider* provider, 00082 ConnectorListeners& listeners, 00083 CdrBufferBase* buffer = 0); 00084 00100 virtual ~OutPortPullConnector(); 00101 00118 virtual ReturnCode write(const cdrMemoryStream& data); 00119 00135 virtual ReturnCode disconnect(); 00136 00150 virtual CdrBufferBase* getBuffer(); 00151 00166 virtual void activate(){}; // do nothing 00167 00182 virtual void deactivate(){}; // do nothing 00183 00191 CdrBufferBase* createBuffer(ConnectorInfo& info); 00192 00200 void onConnect(); 00201 00209 void onDisconnect(); 00210 00211 protected: 00212 00220 OutPortProvider* m_provider; 00221 00229 ConnectorListeners& m_listeners; 00230 00238 CdrBufferBase* m_buffer; 00239 }; 00240 }; // namespace RTC 00241 00242 #endif // RTC_PULL_CONNECTOR_H