blob: 40ac782145f24dfcf4630b1b36f09be59b4e797a [file] [log] [blame]
Jeff Thompson76317aa2013-06-25 19:11:48 -07001/*
2 * Author: Jeff Thompson
3 *
4 * BSD license, See the LICENSE file for more information.
5 */
6
7#ifndef NDN_BINARYXMLSTRUCTUREDECODER_H
8#define NDN_BINARYXMLSTRUCTUREDECODER_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14struct ndn_BinaryXMLStructureDecoder {
15 int gotElementEnd; // boolean
16 unsigned int offset;
17 int level;
18 int state;
19 unsigned int headerLength;
20 int useHeaderBuffer; // boolean
21 // 10 bytes is enough to hold an encoded header with a type and a 64 bit value.
22 unsigned char headerBuffer[10];
23 int nBytesToRead;
24};
25
26const int ndn_BinaryXMLStructureDecoder_READ_HEADER_OR_CLOSE = 0;
27const int ndn_BinaryXMLStructureDecoder_READ_BYTES = 1;
28
29void ndn_BinaryXMLStructureDecoder_init(struct ndn_BinaryXMLStructureDecoder *self);
30
31#ifdef __cplusplus
32}
33#endif
34
35#endif