00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_TRANSPORTSENDELEMENT_H 00009 #define OPENDDS_DCPS_TRANSPORTSENDELEMENT_H 00010 00011 #include "dds/DCPS/dcps_export.h" 00012 #include "TransportQueueElement.h" 00013 #include "dds/DCPS/DataSampleElement.h" 00014 00015 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00016 00017 namespace OpenDDS { 00018 namespace DCPS { 00019 00020 class OpenDDS_Dcps_Export TransportSendElement : public TransportQueueElement { 00021 public: 00022 00023 TransportSendElement(int initial_count, 00024 const DataSampleElement* sample); 00025 00026 virtual ~TransportSendElement(); 00027 00028 /// Accessor for the publisher id. 00029 virtual RepoId publication_id() const; 00030 00031 virtual RepoId subscription_id() const; 00032 00033 /// Accessor for the ACE_Message_Block 00034 virtual const ACE_Message_Block* msg() const; 00035 00036 virtual const ACE_Message_Block* msg_payload() const; 00037 00038 virtual SequenceNumber sequence() const; 00039 00040 /// Original sample from send listener. 00041 const DataSampleElement* sample() const; 00042 00043 virtual bool owned_by_transport(); 00044 00045 protected: 00046 00047 virtual void release_element(bool dropped_by_transport); 00048 00049 private: 00050 00051 /// This is the actual element that the transport framework was 00052 /// asked to send. 00053 const DataSampleElement* element_; 00054 }; 00055 00056 } // namespace DCPS 00057 } // namespace OpenDDS 00058 00059 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00060 00061 #if defined (__ACE_INLINE__) 00062 #include "TransportSendElement.inl" 00063 #endif /* __ACE_INLINE__ */ 00064 00065 #endif /* OPENDDS_DCPS_TRANSPORTSENDELEMENT_H */