00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_TRANSPORTSENDLISTENER_H 00009 #define OPENDDS_DCPS_TRANSPORTSENDLISTENER_H 00010 00011 #include "dds/DCPS/dcps_export.h" 00012 #include "dds/DCPS/RcHandle_T.h" 00013 #include "TransportDefs.h" 00014 00015 #include "dds/DCPS/PoolAllocator.h" 00016 00017 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00018 class ACE_Message_Block; 00019 ACE_END_VERSIONED_NAMESPACE_DECL 00020 00021 namespace OpenDDS { 00022 namespace DCPS { 00023 00024 class DataSampleElement; 00025 struct DataSampleHeader; 00026 typedef ACE_Message_Block DataSample; 00027 00028 class DataLinkSet; 00029 typedef RcHandle<DataLinkSet> DataLinkSet_rch; 00030 00031 class ReaderIdSeq; 00032 00033 class OpenDDS_Dcps_Export TransportSendListener { 00034 public: 00035 00036 virtual ~TransportSendListener(); 00037 00038 virtual void data_delivered(const DataSampleElement* sample); 00039 virtual void data_dropped(const DataSampleElement* sample, 00040 bool dropped_by_transport); 00041 00042 virtual void control_delivered(ACE_Message_Block* sample); 00043 virtual void control_dropped(ACE_Message_Block* sample, 00044 bool dropped_by_transport); 00045 00046 virtual void notify_publication_disconnected(const ReaderIdSeq& subids) = 0; 00047 virtual void notify_publication_reconnected(const ReaderIdSeq& subids) = 0; 00048 virtual void notify_publication_lost(const ReaderIdSeq& subids) = 0; 00049 virtual void notify_connection_deleted(const RepoId& peerId) = 0; 00050 00051 virtual void remove_associations(const ReaderIdSeq& subids, bool notify) = 0; 00052 00053 /// Hook for the listener to override a normal control message with 00054 /// customized messages to different DataLinks. 00055 virtual SendControlStatus send_control_customized( 00056 const DataLinkSet_rch& links, 00057 const DataSampleHeader& header, 00058 ACE_Message_Block* msg, 00059 void* extra); 00060 00061 struct InlineQosData { 00062 DDS::PublisherQos pub_qos; 00063 DDS::DataWriterQos dw_qos; 00064 OPENDDS_STRING topic_name; 00065 }; 00066 00067 virtual void retrieve_inline_qos_data(InlineQosData& qos_data) const; 00068 00069 protected: 00070 00071 TransportSendListener(); 00072 }; 00073 00074 } // namespace DCPS 00075 } // namespace OpenDDS 00076 00077 #if defined (__ACE_INLINE__) 00078 #include "TransportSendListener.inl" 00079 #endif /* __ACE_INLINE__ */ 00080 00081 #endif /* OPENDDS_DCPS_TRANSPORTSENDLISTENER_H */