Jeff Thompson | 56ec9e2 | 2013-08-02 11:34:07 -0700 | [diff] [blame] | 1 | /** |
| 2 | * @author: Jeff Thompson |
| 3 | * See COPYING for copyright and distribution information. |
| 4 | */ |
| 5 | |
| 6 | #ifndef NDN_BINARY_XML_DATA_H |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 7 | #define NDN_BINARY_XML_DATA_H |
Jeff Thompson | 56ec9e2 | 2013-08-02 11:34:07 -0700 | [diff] [blame] | 8 | |
| 9 | #include "../errors.h" |
| 10 | #include "../data.h" |
Jeff Thompson | 5341219 | 2013-08-06 13:35:50 -0700 | [diff] [blame] | 11 | #include "binary-xml-encoder.h" |
| 12 | #include "binary-xml-decoder.h" |
Jeff Thompson | 56ec9e2 | 2013-08-02 11:34:07 -0700 | [diff] [blame] | 13 | |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 14 | #ifdef __cplusplus |
Jeff Thompson | 56ec9e2 | 2013-08-02 11:34:07 -0700 | [diff] [blame] | 15 | extern "C" { |
| 16 | #endif |
| 17 | |
Jeff Thompson | aa02071 | 2013-08-08 21:20:06 -0700 | [diff] [blame^] | 18 | /** |
| 19 | * Encode the data as binary XML. |
| 20 | * @param data Pointer to the data object the encode. |
| 21 | * @param signedFieldsBeginOffset Return the offset in the encoding of the beginning of the fields which are signed. |
| 22 | * If you are not encoding in order to sign, you can ignore this. |
| 23 | * @param signedFieldsEndOffset Return the offset in the encoding of the end of the fields which are signed. |
| 24 | * If you are not encoding in order to sign, you can ignore this. |
| 25 | * @param encoder Pointer to the encoder object which receives the encoding. |
| 26 | * @return |
| 27 | */ |
| 28 | ndn_Error ndn_encodeBinaryXmlData |
| 29 | (struct ndn_Data *data, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset, struct ndn_BinaryXmlEncoder *encoder); |
Jeff Thompson | 56ec9e2 | 2013-08-02 11:34:07 -0700 | [diff] [blame] | 30 | |
| 31 | ndn_Error ndn_decodeBinaryXmlData(struct ndn_Data *data, struct ndn_BinaryXmlDecoder *decoder); |
| 32 | |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 33 | #ifdef __cplusplus |
Jeff Thompson | 56ec9e2 | 2013-08-02 11:34:07 -0700 | [diff] [blame] | 34 | } |
| 35 | #endif |
| 36 | |
| 37 | #endif |