Jeff Thompson | 990599b | 2013-08-27 15:14:25 -0700 | [diff] [blame^] | 1 | /** |
| 2 | * @author: Jeff Thompson |
| 3 | * See COPYING for copyright and distribution information. |
| 4 | */ |
| 5 | |
| 6 | #ifndef NDN_BINARY_XML_FORWARDING_ENTRY_H |
| 7 | #define NDN_BINARY_XML_FORWARDING_ENTRY_H |
| 8 | |
| 9 | #include "../errors.h" |
| 10 | #include "../forwarding-entry.h" |
| 11 | #include "binary-xml-encoder.h" |
| 12 | #include "binary-xml-decoder.h" |
| 13 | |
| 14 | #ifdef __cplusplus |
| 15 | extern "C" { |
| 16 | #endif |
| 17 | |
| 18 | /** |
| 19 | * Encode the ndn_ForwardingEntry struct using Binary XML. |
| 20 | * @param forwardingEntry pointer to the ndn_ForwardingEntry struct |
| 21 | * @param encoder pointer to the ndn_BinaryXmlEncoder struct |
| 22 | * @return 0 for success, else an error code |
| 23 | */ |
| 24 | ndn_Error ndn_encodeBinaryXmlForwardingEntry(struct ndn_ForwardingEntry *forwardingEntry, struct ndn_BinaryXmlEncoder *encoder); |
| 25 | |
| 26 | /** |
| 27 | * Expect the next element to be a Binary XML ForwardingEntry and decode into the ndn_ForwardingEntry struct. |
| 28 | * @param forwardingEntry pointer to the ndn_ForwardingEntry struct |
| 29 | * @param decoder pointer to the ndn_BinaryXmlDecoder struct |
| 30 | * @return 0 for success, else an error code, including if the next element is not KeyLocator. |
| 31 | */ |
| 32 | ndn_Error ndn_decodeBinaryXmlForwardingEntry(struct ndn_ForwardingEntry *forwardingEntry, struct ndn_BinaryXmlDecoder *decoder); |
| 33 | |
| 34 | #ifdef __cplusplus |
| 35 | } |
| 36 | #endif |
| 37 | |
| 38 | #endif |