blob: 430395cf2e373984661182d823286248f0bab778 [file] [log] [blame]
Jeff Thompson8238d002013-07-10 11:56:49 -07001/**
2 * @author: Jeff Thompson
3 * See COPYING for copyright and distribution information.
4 */
5
6#ifndef NDN_BINARYXMLPUBLISHERPUBLICKEYDIGEST_H
7#define NDN_BINARYXMLPUBLISHERPUBLICKEYDIGEST_H
8
9#include "../errors.h"
10#include "../PublisherPublicKeyDigest.h"
11#include "BinaryXMLEncoder.h"
12#include "BinaryXMLDecoder.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/**
19 * Encode the ndn_PublisherPublicKeyDigest struct using Binary XML. If publisherPublicKeyDigest->publisherPublicKeyDigest or
20 * publisherPublicKeyDigestLength is 0, then do nothing.
21 * @param publisherPublicKeyDigest pointer to the ndn_PublisherPublicKeyDigest struct
22 * @param encoder pointer to the ndn_BinaryXMLEncoder struct
23 * @return 0 for success, else an error code
24 */
25ndn_Error ndn_encodeBinaryXMLPublisherPublicKeyDigest
26 (struct ndn_PublisherPublicKeyDigest *publisherPublicKeyDigest, struct ndn_BinaryXMLEncoder *encoder);
27
28/**
29 * Expect the next element to be a Binary XML PublisherPublicKeyDigest and decode into the ndn_PublisherPublicKeyDigest struct.
30 * @param publisherPublicKeyDigest pointer to the ndn_PublisherPublicKeyDigest struct
31 * @param decoder pointer to the ndn_BinaryXMLDecoder struct
32 * @return 0 for success, else an error code, including if the next element is not PublisherPublicKeyDigest.
33 */
34ndn_Error ndn_decodeBinaryXMLPublisherPublicKeyDigest
35 (struct ndn_PublisherPublicKeyDigest *publisherPublicKeyDigest, struct ndn_BinaryXMLDecoder *decoder);
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif