Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame^] | 1 | /* |
| 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 |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
| 14 | struct ndn_BinaryXMLDecoder { |
| 15 | const unsigned char *input; |
| 16 | unsigned int inputLen; |
| 17 | unsigned int offset; |
| 18 | }; |
| 19 | |
| 20 | static 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. |
| 27 | const char *ndn_BinaryXMLDecoder_decodeTypeAndValue(struct ndn_BinaryXMLDecoder *self, unsigned int *type, unsigned int *value); |
| 28 | |
| 29 | #ifdef __cplusplus |
| 30 | } |
| 31 | #endif |
| 32 | |
| 33 | #endif |