00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_TRANSPORTGDCONTROLELEMENT_H 00009 #define OPENDDS_DCPS_TRANSPORTGDCONTROLELEMENT_H 00010 00011 #include "dds/DCPS/dcps_export.h" 00012 #include "dds/DCPS/GuidUtils.h" 00013 #include "dds/DCPS/Message_Block_Ptr.h" 00014 #include "TransportDefs.h" 00015 #include "TransportQueueElement.h" 00016 00017 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00018 class ACE_Message_Block; 00019 ACE_END_VERSIONED_NAMESPACE_DECL 00020 00021 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00022 00023 namespace OpenDDS { 00024 namespace DCPS { 00025 00026 class OpenDDS_Dcps_Export TransportControlElement 00027 : public TransportQueueElement { 00028 public: 00029 00030 /** 00031 * msg_block - chain of ACE_Message_Blocks containing the control 00032 * sample held by this queue element, if any. 00033 */ 00034 explicit TransportControlElement(Message_Block_Ptr msg_block); 00035 00036 virtual ~TransportControlElement(); 00037 00038 virtual bool owned_by_transport(); 00039 00040 protected: 00041 00042 virtual bool requires_exclusive_packet() const; 00043 00044 virtual RepoId publication_id() const; 00045 00046 virtual const ACE_Message_Block* msg() const; 00047 00048 virtual const ACE_Message_Block* msg_payload() const; 00049 00050 virtual void release_element(bool dropped_by_transport); 00051 00052 virtual void data_delivered(); 00053 00054 private: 00055 TransportControlElement(const TransportControlElement&); 00056 /// The control message. 00057 Message_Block_Ptr msg_; 00058 }; 00059 00060 } // namespace DCPS 00061 } // namespace OpenDDS 00062 00063 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00064 00065 #if defined (__ACE_INLINE__) 00066 #include "TransportControlElement.inl" 00067 #endif /* __ACE_INLINE__ */ 00068 00069 #endif /* OPENDDS_DCPS_TRANSPORTGDCONTROLELEMENT_H */