blob: df77d692a41a58b2f899c9c52369434935fb465f [file] [log] [blame]
Jeff Thompson56ec9e22013-08-02 11:34:07 -07001/**
2 * @author: Jeff Thompson
3 * See COPYING for copyright and distribution information.
4 */
5
6#ifndef NDN_BINARY_XML_DATA_H
Jeff Thompsona0d18c92013-08-06 13:55:32 -07007#define NDN_BINARY_XML_DATA_H
Jeff Thompson56ec9e22013-08-02 11:34:07 -07008
9#include "../errors.h"
10#include "../data.h"
Jeff Thompson53412192013-08-06 13:35:50 -070011#include "binary-xml-encoder.h"
12#include "binary-xml-decoder.h"
Jeff Thompson56ec9e22013-08-02 11:34:07 -070013
Jeff Thompsona0d18c92013-08-06 13:55:32 -070014#ifdef __cplusplus
Jeff Thompson56ec9e22013-08-02 11:34:07 -070015extern "C" {
16#endif
17
Jeff Thompsonaa020712013-08-08 21:20:06 -070018/**
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 */
28ndn_Error ndn_encodeBinaryXmlData
29 (struct ndn_Data *data, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset, struct ndn_BinaryXmlEncoder *encoder);
Jeff Thompson56ec9e22013-08-02 11:34:07 -070030
31ndn_Error ndn_decodeBinaryXmlData(struct ndn_Data *data, struct ndn_BinaryXmlDecoder *decoder);
32
Jeff Thompsona0d18c92013-08-06 13:55:32 -070033#ifdef __cplusplus
Jeff Thompson56ec9e22013-08-02 11:34:07 -070034}
35#endif
36
37#endif