00001
00002
00003
00004
00005
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 "TransportDefs.h"
00014 #include "TransportQueueElement.h"
00015
00016 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00017 class ACE_Message_Block;
00018 ACE_END_VERSIONED_NAMESPACE_DECL
00019
00020 namespace OpenDDS {
00021 namespace DCPS {
00022
00023 class OpenDDS_Dcps_Export TransportControlElement
00024 : public TransportQueueElement {
00025 public:
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 TransportControlElement(const ACE_Message_Block* msg_block,
00038 const RepoId& pub_id = GUID_UNKNOWN,
00039 bool owner = true);
00040
00041 virtual ~TransportControlElement();
00042
00043 virtual bool owned_by_transport();
00044
00045 protected:
00046
00047 virtual bool requires_exclusive_packet() const;
00048
00049 virtual RepoId publication_id() const;
00050
00051 virtual const ACE_Message_Block* msg() const;
00052
00053 virtual const ACE_Message_Block* msg_payload() const;
00054
00055 virtual void release_element(bool dropped_by_transport);
00056
00057 virtual void data_delivered();
00058
00059 private:
00060
00061
00062 ACE_Message_Block* msg_;
00063
00064
00065 bool owner_;
00066 };
00067
00068 }
00069 }
00070
00071 #if defined (__ACE_INLINE__)
00072 #include "TransportControlElement.inl"
00073 #endif
00074
00075 #endif