blob: ad10fcf8a5c07531ec48623cef5a715539dd790a [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 {
Jeff Thompson4e278992013-06-26 18:59:17 -070015 int gotElementEnd; /**< boolean */
Jeff Thompson76317aa2013-06-25 19:11:48 -070016 unsigned int offset;
17 int level;
18 int state;
19 unsigned int headerLength;
Jeff Thompson4e278992013-06-26 18:59:17 -070020 int useHeaderBuffer; /**< boolean */
Jeff Thompson76317aa2013-06-25 19:11:48 -070021 // 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