blob: 65f04c77bf0f3c09a59096fe96f0b679d761a860 [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_BINARYXMLDECODER_H
8#define NDN_BINARYXMLDECODER_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14struct ndn_BinaryXMLDecoder {
15 const unsigned char *input;
16 unsigned int inputLen;
17 unsigned int offset;
18};
19
20static void ndn_BinaryXMLDecoder_init(struct ndn_BinaryXMLDecoder *self, const unsigned char *input, unsigned int inputLen) {
21 self->input = input;
22 self->inputLen = inputLen;
23 self->offset = 0;
24}
25
26// Even though the first byte should not be zero, this silently ignores initial zeros.
27const char *ndn_BinaryXMLDecoder_decodeTypeAndValue(struct ndn_BinaryXMLDecoder *self, unsigned int *type, unsigned int *value);
28
29#ifdef __cplusplus
30}
31#endif
32
33#endif