tlv-0_1_1-wire-format-lite.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
22 #ifndef NDN_TLV_0_1_1_WIRE_FORMAT_LITE_HPP
23 #define NDN_TLV_0_1_1_WIRE_FORMAT_LITE_HPP
24 
25 #include "../interest-lite.hpp"
26 #include "../data-lite.hpp"
27 #include "../util/dynamic-uint8-array-lite.hpp"
28 
29 namespace ndn {
30 
36 public:
54  static ndn_Error
56  (const InterestLite& interest, size_t* signedPortionBeginOffset,
57  size_t* signedPortionEndOffset, DynamicUInt8ArrayLite& output,
58  size_t* encodingLength);
59 
76  static ndn_Error
78  (InterestLite& interest, const uint8_t* input, size_t inputLength,
79  size_t* signedPortionBeginOffset, size_t* signedPortionEndOffset);
80 
96  static ndn_Error
98  (const DataLite& data, size_t* signedPortionBeginOffset,
99  size_t* signedPortionEndOffset, DynamicUInt8ArrayLite& output,
100  size_t* encodingLength);
101 
115  static ndn_Error
116  decodeData
117  (DataLite& data, const uint8_t* input, size_t inputLength,
118  size_t* signedPortionBeginOffset, size_t* signedPortionEndOffset);
119 };
120 
121 }
122 
123 #endif
Copyright (C) 2013-2015 Regents of the University of California.
Definition: common.hpp:35
static ndn_Error encodeInterest(const InterestLite &interest, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset, DynamicUInt8ArrayLite &output, size_t *encodingLength)
Encode interest as NDN-TLV.
Definition: tlv-0_1_1-wire-format-lite.cpp:29
static ndn_Error encodeData(const DataLite &data, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset, DynamicUInt8ArrayLite &output, size_t *encodingLength)
Encode the data packet as NDN-TLV.
Definition: tlv-0_1_1-wire-format-lite.cpp:50
A DynamicUInt8ArrayLite holds a pointer to an allocated array, the length of the allocated array...
Definition: dynamic-uint8-array-lite.hpp:35
An InterestLite holds a NameLite and other fields for an interest.
Definition: interest-lite.hpp:35
A Tlv0_1_1WireFormatLite implements implement encoding and decoding using NDN-TLV version 0...
Definition: tlv-0_1_1-wire-format-lite.hpp:35
static ndn_Error decodeInterest(InterestLite &interest, const uint8_t *input, size_t inputLength, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset)
Decode input as an interest in NDN-TLV and set the fields of the interest object. ...
Definition: tlv-0_1_1-wire-format-lite.cpp:40
static ndn_Error decodeData(DataLite &data, const uint8_t *input, size_t inputLength, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset)
Decode input as a data packet in NDN-TLV and set the fields in the data object.
Definition: tlv-0_1_1-wire-format-lite.cpp:61
A DataLite holds a NameLite and other fields to represent an NDN Data packet.
Definition: data-lite.hpp:34