#include <OfferTLV.h>
Definition at line 27 of file OfferTLV.h.
Public Member Functions | |
OfferTLV (const BundleOfferList &list) | |
Constructor. | |
virtual | ~OfferTLV () |
Destructor. | |
size_t | serialize (u_char *bp, size_t len) const |
Virtual from BaseTLV. | |
const BundleOfferList | list () const |
Accessors. | |
Protected Member Functions | |
OfferTLV () | |
Constructor. | |
bool | deserialize (const u_char *bp, size_t len) |
Virtual from BaseTLV. | |
Protected Attributes | |
BundleOfferList | list_ |
Priority sorted list of Bundles to offer to peer. | |
Friends | |
class | TLVFactory< OfferTLV > |
prophet::OfferTLV::OfferTLV | ( | const BundleOfferList & | list | ) |
virtual prophet::OfferTLV::~OfferTLV | ( | ) | [inline, virtual] |
prophet::OfferTLV::OfferTLV | ( | ) | [protected] |
Constructor.
Protected to force access through TLVFactory.
Definition at line 27 of file OfferTLV.cc.
size_t prophet::OfferTLV::serialize | ( | u_char * | bp, | |
size_t | len | |||
) | const [virtual] |
Virtual from BaseTLV.
Implements prophet::BaseTLV.
Definition at line 31 of file OfferTLV.cc.
References prophet::BundleTLVEntry::accept(), prophet::BundleTLVEntry::ack(), prophet::BundleEntryList< BundleEntryType >::begin(), prophet::BundleTLV::BundleEntrySize, prophet::BundleTLV::BundleTLVHeaderSize, prophet::BundleTLVEntry::creation_ts(), prophet::BundleTLVEntry::custody(), prophet::BundleEntryList< BundleEntryType >::end(), prophet::BundleTLV::BundleTLVHeader::flags, prophet::BundleEntryList< BundleEntryType >::guess_size(), prophet::BundleTLV::BundleTLVHeader::length, prophet::BaseTLV::length_, list_, prophet::BundleTLV::BundleTLVHeader::offer_count, prophet::BaseTLV::OFFER_TLV, prophet::BundleTLVEntry::seqno(), prophet::BundleTLVEntry::sid(), prophet::BundleEntryList< BundleEntryType >::size(), prophet::BundleTLVEntry::type(), prophet::BundleTLV::BundleTLVHeader::type, prophet::BaseTLV::typecode_, and prophet::BundleTLV::write_bundle_entry().
const BundleOfferList prophet::OfferTLV::list | ( | ) | const [inline] |
bool prophet::OfferTLV::deserialize | ( | const u_char * | bp, | |
size_t | len | |||
) | [protected, virtual] |
Virtual from BaseTLV.
Implements prophet::BaseTLV.
Definition at line 80 of file OfferTLV.cc.
References prophet::BundleOfferList::add_offer(), prophet::BundleTLV::BundleEntrySize, prophet::BundleTLV::BundleTLVHeaderSize, custody, prophet::BundleEntryList< BundleEntryType >::empty(), prophet::BundleTLV::BundleTLVHeader::flags, prophet::BaseTLV::flags_, prophet::BundleTLV::BundleTLVHeader::length, prophet::BaseTLV::length_, list_, prophet::BundleTLVEntry::OFFER, prophet::BundleTLV::BundleTLVHeader::offer_count, prophet::BaseTLV::OFFER_TLV, prophet::BundleTLV::read_bundle_entry(), prophet::BundleTLV::BundleTLVHeader::type, prophet::BaseTLV::typecode_, and prophet::BundleTLVEntry::UNDEFINED.
friend class TLVFactory< OfferTLV > [friend] |
Definition at line 50 of file OfferTLV.h.
BundleOfferList prophet::OfferTLV::list_ [protected] |
Priority sorted list of Bundles to offer to peer.
Definition at line 62 of file OfferTLV.h.
Referenced by deserialize(), list(), and serialize().