All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | List of all members
ndn::MetaInfoLite Class Reference

A MetaInfoLite holds a type and other info to represent the meta info of a Data packet. More...

#include <meta-info-lite.hpp>

Inheritance diagram for ndn::MetaInfoLite:
ndn_MetaInfo

Public Member Functions

 MetaInfoLite ()
 Create a MetaInfoLite with default field values.
 
ndn_ContentType getType () const
 Get the content type. More...
 
int getOtherTypeCode () const
 Get the content type code from the packet which is other than a recognized ContentType enum value. More...
 
Milliseconds getFreshnessPeriod () const
 
const NameLite::Component getFinalBlockId () const
 
void setType (ndn_ContentType type)
 Set the content type. More...
 
void setOtherTypeCode (int otherTypeCode)
 Set the packet's content type code to use when the content type enum is ndn_ContentType_OTHER_CODE. More...
 
void setFreshnessPeriod (Milliseconds freshnessPeriod)
 
void setFinalBlockId (const NameLite::Component &finalBlockId)
 Set the final block ID. More...
 

Static Public Member Functions

static MetaInfoLitedownCast (ndn_MetaInfo &metaInfo)
 Downcast the reference to the ndn_MetaInfo struct to a MetaInfoLite. More...
 
static const MetaInfoLitedownCast (const ndn_MetaInfo &metaInfo)
 

Detailed Description

A MetaInfoLite holds a type and other info to represent the meta info of a Data packet.

Member Function Documentation

static MetaInfoLite& ndn::MetaInfoLite::downCast ( ndn_MetaInfo metaInfo)
inlinestatic

Downcast the reference to the ndn_MetaInfo struct to a MetaInfoLite.

Parameters
metaInfoA reference to the ndn_MetaInfo struct.
Returns
The same reference as MetaInfoLite.
int ndn::MetaInfoLite::getOtherTypeCode ( ) const
inline

Get the content type code from the packet which is other than a recognized ContentType enum value.

This is only meaningful if getType() is ndn_ContentType_OTHER_CODE.

Returns
The type code.
ndn_ContentType ndn::MetaInfoLite::getType ( ) const
inline

Get the content type.

Returns
The content type enum value. If this is ndn_ContentType_OTHER_CODE, then call getOtherTypeCode() to get the unrecognized content type code.
void ndn::MetaInfoLite::setFinalBlockId ( const NameLite::Component finalBlockId)
inline

Set the final block ID.

Parameters
finalBlockIdThe final block ID. This takes the pointer but does not copy the bytes of the name component.
void ndn::MetaInfoLite::setOtherTypeCode ( int  otherTypeCode)
inline

Set the packet's content type code to use when the content type enum is ndn_ContentType_OTHER_CODE.

If the packet's content type code is a recognized enum value, just call setType().

Parameters
otherTypeCodeThe packet's unrecognized content type code, which must be non-negative.
void ndn::MetaInfoLite::setType ( ndn_ContentType  type)
inline

Set the content type.

Parameters
typeThe content type enum value. If the packet's content type is not a recognized ContentType enum value, use ndn_ContentType_OTHER_CODE and call setOtherTypeCode().

The documentation for this class was generated from the following files: