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