Line data Source code
1 : /* 2 : * 3 : * 4 : * Distributed under the OpenDDS License. 5 : * See: http://www.opendds.org/license.html 6 : */ 7 : 8 : #ifndef OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTSENDLISTENER_H 9 : #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_TRANSPORTSENDLISTENER_H 10 : 11 : #include "dds/DCPS/dcps_export.h" 12 : #include "dds/DCPS/RcHandle_T.h" 13 : #include "dds/DdsDcpsInfoUtilsC.h" 14 : #include "dds/DCPS/Message_Block_Ptr.h" 15 : #include "TransportDefs.h" 16 : #include "dds/DCPS/RcObject.h" 17 : #include "dds/DCPS/PoolAllocator.h" 18 : #include "dds/DCPS/SequenceNumber.h" 19 : 20 : ACE_BEGIN_VERSIONED_NAMESPACE_DECL 21 : class ACE_Message_Block; 22 : ACE_END_VERSIONED_NAMESPACE_DECL 23 : 24 : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 25 : 26 : namespace OpenDDS { 27 : namespace DCPS { 28 : 29 : class DataSampleElement; 30 : struct DataSampleHeader; 31 : typedef ACE_Message_Block DataSample; 32 : 33 : class DataLinkSet; 34 : typedef RcHandle<DataLinkSet> DataLinkSet_rch; 35 : 36 : class ReaderIdSeq; 37 : 38 : class OpenDDS_Dcps_Export TransportSendListener 39 : : public virtual RcObject { 40 : public: 41 : 42 : virtual ~TransportSendListener(); 43 : 44 : virtual void data_delivered(const DataSampleElement* sample); 45 : virtual void data_dropped(const DataSampleElement* sample, 46 : bool dropped_by_transport); 47 : 48 0 : virtual void data_acked(const GUID_t&) {} 49 : 50 : virtual void control_delivered(const Message_Block_Ptr& sample); 51 : virtual void control_dropped(const Message_Block_Ptr& sample, 52 : bool dropped_by_transport); 53 : 54 : virtual void notify_publication_disconnected(const ReaderIdSeq& subids) = 0; 55 : virtual void notify_publication_reconnected(const ReaderIdSeq& subids) = 0; 56 : virtual void notify_publication_lost(const ReaderIdSeq& subids) = 0; 57 : 58 : virtual void remove_associations(const ReaderIdSeq& subids, bool notify) = 0; 59 : 60 0 : virtual void replay_durable_data_for(const GUID_t&) {} 61 : 62 : /// Hook for the listener to override a normal control message with 63 : /// customized messages to different DataLinks. 64 : virtual SendControlStatus send_control_customized( 65 : const DataLinkSet_rch& links, 66 : const DataSampleHeader& header, 67 : ACE_Message_Block* msg, 68 : void* extra); 69 : 70 : struct InlineQosData { 71 : DDS::PublisherQos pub_qos; 72 : DDS::DataWriterQos dw_qos; 73 : OPENDDS_STRING topic_name; 74 : }; 75 : 76 : virtual void retrieve_inline_qos_data(InlineQosData& qos_data) const; 77 : 78 0 : virtual void transport_discovery_change() {} 79 : 80 : protected: 81 : 82 : TransportSendListener(); 83 : }; 84 : 85 : typedef RcHandle<TransportSendListener> TransportSendListener_rch; 86 : 87 : } // namespace DCPS 88 : } // namespace OpenDDS 89 : 90 : OPENDDS_END_VERSIONED_NAMESPACE_DECL 91 : 92 : #endif /* OPENDDS_DCPS_TRANSPORTSENDLISTENER_H */