22 #ifndef NDN_PROTOBUF_TLV_HPP
23 #define NDN_PROTOBUF_TLV_HPP
25 #include <ndn-cpp/util/blob.hpp>
27 namespace google {
namespace protobuf {
class Message; } }
53 encode(
const google::protobuf::Message& message);
65 (google::protobuf::Message& message,
const uint8_t *input,
size_t inputLength);
75 decode(google::protobuf::Message& message,
const std::vector<uint8_t>& input)
77 decode(message, &input[0], input.size());
88 decode(google::protobuf::Message& message,
const Blob& input)
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
ProtobufTlv has static methods to encode and decode an Protobuf Message object as NDN-TLV...
Definition: protobuf-tlv.hpp:44
A Blob holds a pointer to an immutable byte array implemented as const std::vector.
Definition: blob.hpp:42
const uint8_t * buf() const
Return a const pointer to the first byte of the immutable byte array, or 0 if the pointer is null...
Definition: blob.hpp:159
size_t size() const
Return the length of the immutable byte array.
Definition: blob.hpp:147
static void decode(google::protobuf::Message &message, const std::vector< uint8_t > &input)
Decode the input as NDN-TLV and update the fields of the Protobuf Message object. ...
Definition: protobuf-tlv.hpp:75
static void decode(google::protobuf::Message &message, const Blob &input)
Decode the input as NDN-TLV and update the fields of the Protobuf Message object. ...
Definition: protobuf-tlv.hpp:88
Copyright (C) 2014-2016 Regents of the University of California.
Definition: channel-status.pb.h:315
static Blob encode(const google::protobuf::Message &message)
Encode the Protobuf Message object as NDN-TLV.
static void decode(google::protobuf::Message &message, const uint8_t *input, size_t inputLength)
Decode the input as NDN-TLV and update the fields of the Protobuf Message object. ...