21 #ifndef NDN_BINARYXMLDECODER_H
22 #define NDN_BINARYXMLDECODER_H
24 #include <ndn-cpp/c/common.h>
25 #include <ndn-cpp/c/errors.h>
26 #include "../util/blob.h"
27 #include "binary-xml.h"
38 size_t previouslyPeekedDTagStartOffset;
39 size_t previouslyPeekedDTagEndOffset;
40 unsigned int previouslyPeekedDTag;
43 static __inline
void ndn_BinaryXmlDecoder_initialize(
struct ndn_BinaryXmlDecoder *
self,
const uint8_t *input,
size_t inputLength)
46 self->inputLength = inputLength;
48 self->previouslyPeekedDTagStartOffset = (size_t)-1;
58 ndn_Error ndn_BinaryXmlDecoder_decodeTypeAndValue(
struct ndn_BinaryXmlDecoder *
self,
unsigned int *type,
unsigned int *value);
67 ndn_Error ndn_BinaryXmlDecoder_readElementStartDTag(
struct ndn_BinaryXmlDecoder *
self,
unsigned int expectedTag);
84 ndn_Error ndn_BinaryXmlDecoder_peekDTag(
struct ndn_BinaryXmlDecoder *
self,
unsigned int expectedTag,
int *gotExpectedTag);
99 ndn_Error ndn_BinaryXmlDecoder_readBinaryDTagElement
112 ndn_Error ndn_BinaryXmlDecoder_readOptionalBinaryDTagElement
124 ndn_Error ndn_BinaryXmlDecoder_readUDataDTagElement
136 ndn_Error ndn_BinaryXmlDecoder_readOptionalUDataDTagElement
149 ndn_Error ndn_BinaryXmlDecoder_readUnsignedIntegerDTagElement
161 ndn_Error ndn_BinaryXmlDecoder_readOptionalUnsignedIntegerDTagElement
173 ndn_Error ndn_BinaryXmlDecoder_readTimeMillisecondsDTagElement
184 ndn_Error ndn_BinaryXmlDecoder_readOptionalTimeMillisecondsDTagElement
194 double ndn_BinaryXmlDecoder_unsignedBigEndianToDouble(
const uint8_t *bytes,
size_t bytesLength);
201 static __inline
void ndn_BinaryXmlDecoder_seek(
struct ndn_BinaryXmlDecoder *
self,
size_t offset)
203 self->offset = offset;
Copyright (C) 2015 Regents of the University of California.
Definition: blob-types.h:33
Copyright (C) 2013-2015 Regents of the University of California.
Definition: binary-xml-decoder.h:33