Public Member Functions | |
| Data () | |
| Create a new Data object with default values and where the signature is a blank Sha256WithRsaSignature. | |
| Data (const Name &name) | |
| Create a new Data object with the given name and default values and where the signature is a blank Sha256WithRsaSignature. More... | |
| Data (const Data &data) | |
| The copy constructor: Create a deep copy of the given data object, including a clone of the signature object. More... | |
| virtual | ~Data () |
| The virtual destructor. | |
| Data & | operator= (const Data &data) |
| The assignment operator: Copy fields and make a clone of the signature. More... | |
| SignedBlob | wireEncode (WireFormat &wireFormat=*WireFormat::getDefaultWireFormat()) const |
| Encode this Data for a particular wire format. More... | |
| virtual void | wireDecode (const Blob &input, WireFormat &wireFormat=*WireFormat::getDefaultWireFormat()) |
| Decode the input using a particular wire format and update this Data. More... | |
| void | wireDecode (const uint8_t *input, size_t inputLength, WireFormat &wireFormat=*WireFormat::getDefaultWireFormat()) |
| Decode the input using a particular wire format and update this Data. More... | |
| void | wireDecode (const std::vector< uint8_t > &input, WireFormat &wireFormat=*WireFormat::getDefaultWireFormat()) |
| Decode the input using a particular wire format and update this Data. More... | |
| void | get (struct ndn_Data &dataStruct) const |
| Set the dataStruct to point to the values in this interest, without copying any memory. More... | |
| void | set (const struct ndn_Data &dataStruct) |
| Clear this data object, and set the values by copying from the ndn_Data struct. More... | |
| const Signature * | getSignature () const |
| Signature * | getSignature () |
| const Name & | getName () const |
| Name & | getName () |
| const MetaInfo & | getMetaInfo () const |
| MetaInfo & | getMetaInfo () |
| const Blob & | getContent () const |
| const SignedBlob & | getDefaultWireEncoding () const |
| Return a reference to the defaultWireEncoding, which was encoded with getDefaultWireEncodingFormat(). More... | |
| WireFormat * | getDefaultWireEncodingFormat () const |
| Get the WireFormat which is used by getDefaultWireEncoding(). More... | |
| Data & | setSignature (const Signature &signature) |
| Set the signature to a copy of the given signature. More... | |
| virtual Data & | setName (const Name &name) |
| Set name to a copy of the given Name. More... | |
| Data & | setMetaInfo (const MetaInfo &metaInfo) |
| Set metaInfo to a copy of the given MetaInfo. More... | |
| Data & | setContent (const std::vector< uint8_t > &content) |
| Set the content to a copy of the data in the vector. More... | |
| Data & | setContent (const uint8_t *content, size_t contentLength) |
| Data & | setContent (const Blob &content) |
| uint64_t | getChangeCount () const |
| Get the change count, which is incremented each time this object (or a child object) is changed. More... | |
| ndn::Data::Data | ( | const Name & | name | ) |
Create a new Data object with the given name and default values and where the signature is a blank Sha256WithRsaSignature.
| name | A reference to the name which is copied. |
| ndn::Data::Data | ( | const Data & | data | ) |
The copy constructor: Create a deep copy of the given data object, including a clone of the signature object.
| data | The data object to copy. |
| void ndn::Data::get | ( | struct ndn_Data & dataStruct | ) | const |
Set the dataStruct to point to the values in this interest, without copying any memory.
WARNING: The resulting pointers in dataStruct are invalid after a further use of this object which could reallocate memory.
| dataStruct | a C ndn_Data struct where the name components array is already allocated. |
|
inline |
Get the change count, which is incremented each time this object (or a child object) is changed.
|
inline |
Return a reference to the defaultWireEncoding, which was encoded with getDefaultWireEncodingFormat().
The SignedBlob may have a null pointer.
|
inline |
Get the WireFormat which is used by getDefaultWireEncoding().
The assignment operator: Copy fields and make a clone of the signature.
| data | The other object to copy from. |
| void ndn::Data::set | ( | const struct ndn_Data & dataStruct | ) |
|
inline |
Set the content to a copy of the data in the vector.
| content | A vector whose contents are copied. |
Set name to a copy of the given Name.
This is virtual so that a subclass can override to validate the name.
| name | The Name which is copied. |
Reimplemented in ndn::IdentityCertificate.
Set the signature to a copy of the given signature.
| signature | The signature object which is cloned. |
|
virtual |
Decode the input using a particular wire format and update this Data.
If wireFormat is the default wire format, also set the defaultWireEncoding to another pointer to the input Blob.
| input | The input byte array to be decoded as an immutable Blob. |
| wireFormat | A WireFormat object used to decode the input. If omitted, use WireFormat getDefaultWireFormat(). |
Reimplemented in ndn::IdentityCertificate, and ndn::Certificate.
|
inline |
Decode the input using a particular wire format and update this Data.
If wireFormat is the default wire format, also set the defaultWireEncoding field to a copy of the input. (To not copy the input, see wireDecode(Blob).)
| input | The input byte array to be decoded. |
| inputLength | The length of input. |
| wireFormat | A WireFormat object used to decode the input. If omitted, use WireFormat getDefaultWireFormat(). |
|
inline |
Decode the input using a particular wire format and update this Data.
If wireFormat is the default wire format, also set the defaultWireEncoding field to a copy of the input. (To not copy the input, see wireDecode(Blob).)
| input | The input byte array to be decoded. |
| wireFormat | A WireFormat object used to decode the input. If omitted, use WireFormat getDefaultWireFormat(). |
| SignedBlob ndn::Data::wireEncode | ( | WireFormat & | wireFormat = *WireFormat::getDefaultWireFormat() | ) | const |
Encode this Data for a particular wire format.
If wireFormat is the default wire format, also set the defaultWireEncoding field to the encoded result. Even though this is const, if wireFormat is the default wire format we update the defaultWireEncoding.
| wireFormat | A WireFormat object used to encode the input. If omitted, use WireFormat getDefaultWireFormat(). |
1.8.9.1