Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame^] | 1 | /** |
| 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 |
| 15 | extern "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 | */ |
| 25 | ndn_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 | */ |
| 34 | ndn_Error ndn_decodeBinaryXMLPublisherPublicKeyDigest |
| 35 | (struct ndn_PublisherPublicKeyDigest *publisherPublicKeyDigest, struct ndn_BinaryXMLDecoder *decoder); |
| 36 | |
| 37 | #ifdef __cplusplus |
| 38 | } |
| 39 | #endif |
| 40 | |
| 41 | #endif |