All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
ndntools::ContentMetaInfo Class Reference

ContentMetaInfo represents the information in the _meta packet of a Generalized Content. More...

#include <content-meta-info.hpp>

Public Member Functions

 ContentMetaInfo ()
 Create a ContentMetaInfo where all the fields have default unspecified values.
 
const std::string & getContentType () const
 Get the content type. More...
 
ndn::MillisecondsSince1970 getTimestamp () const
 Get the time stamp. More...
 
bool getHasSegments () const
 Get the hasSegments flag. More...
 
const ndn::BlobgetOther () const
 Get the Blob containing the optional other info. More...
 
ContentMetaInfosetContentType (const std::string &contentType)
 Set the content type. More...
 
ContentMetaInfosetTimestamp (ndn::MillisecondsSince1970 timestamp)
 Set the time stamp. More...
 
ContentMetaInfosetHasSegments (bool hasSegments)
 Set the hasSegments flag. More...
 
ContentMetaInfosetOther (const ndn::Blob &other)
 Set the Blob containing the optional other info. More...
 
void clear ()
 Set all the fields to their default unspecified values.
 
ndn::Blob wireEncode () const
 Encode this ContentMetaInfo. More...
 
void wireDecode (const uint8_t *input, size_t inputLength)
 Decode the input and update this ContentMetaInfo. More...
 
void wireDecode (const std::vector< uint8_t > &input)
 Decode the input and update this Schedule. More...
 
void wireDecode (const ndn::Blob &input)
 Decode the input and update this Schedule. More...
 

Detailed Description

ContentMetaInfo represents the information in the _meta packet of a Generalized Content.

Member Function Documentation

const std::string& ndntools::ContentMetaInfo::getContentType ( ) const
inline

Get the content type.

Returns
The content type. If not specified, return an empty string.
bool ndntools::ContentMetaInfo::getHasSegments ( ) const
inline

Get the hasSegments flag.

Returns
The hasSegments flag.
const ndn::Blob& ndntools::ContentMetaInfo::getOther ( ) const
inline

Get the Blob containing the optional other info.

Returns
The other info. If not specified, return an isNull Blob.
ndn::MillisecondsSince1970 ndntools::ContentMetaInfo::getTimestamp ( ) const
inline

Get the time stamp.

Returns
The time stamp as milliseconds since Jan 1, 1970 UTC. If not specified, return -1.
ContentMetaInfo& ndntools::ContentMetaInfo::setContentType ( const std::string &  contentType)
inline

Set the content type.

Parameters
contentTypeThe content type.
Returns
This ContentMetaInfo so that you can chain calls to update values.
ContentMetaInfo& ndntools::ContentMetaInfo::setHasSegments ( bool  hasSegments)
inline

Set the hasSegments flag.

Parameters
hasSegmentsThe hasSegments flag.
Returns
This ContentMetaInfo so that you can chain calls to update values.
ContentMetaInfo& ndntools::ContentMetaInfo::setOther ( const ndn::Blob other)
inline

Set the Blob containing the optional other info.

Parameters
otherThe other info, or a default null Blob() if not specified.
Returns
This ContentMetaInfo so that you can chain calls to update values.
ContentMetaInfo& ndntools::ContentMetaInfo::setTimestamp ( ndn::MillisecondsSince1970  timestamp)
inline

Set the time stamp.

Parameters
timestampThe time stamp.
Returns
This ContentMetaInfo so that you can chain calls to update values.
void ndntools::ContentMetaInfo::wireDecode ( const uint8_t *  input,
size_t  inputLength 
)

Decode the input and update this ContentMetaInfo.

Parameters
inputThe input byte array to be decoded.
inputLengthThe length of input.
void ndntools::ContentMetaInfo::wireDecode ( const std::vector< uint8_t > &  input)
inline

Decode the input and update this Schedule.

Parameters
inputThe input byte array to be decoded.
void ndntools::ContentMetaInfo::wireDecode ( const ndn::Blob input)
inline

Decode the input and update this Schedule.

Parameters
inputThe input byte array to be decoded as an immutable Blob.
ndn::Blob ndntools::ContentMetaInfo::wireEncode ( ) const

Encode this ContentMetaInfo.

Returns
The encoded byte array.

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