blob: b08f292a5c4645652321c5f3648b3ce6f0dcae84 [file] [log] [blame]
Jeff Thompson990599b2013-08-27 15:14:25 -07001/**
Jeff Thompson7687dc02013-09-13 11:54:07 -07002 * Copyright (C) 2013 Regents of the University of California.
3 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
Jeff Thompson990599b2013-08-27 15:14:25 -07004 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NDN_BINARY_XML_FORWARDING_ENTRY_H
Jeff Thompsone589c3f2013-10-12 17:30:50 -07008#define NDN_BINARY_XML_FORWARDING_ENTRY_H
Jeff Thompson990599b2013-08-27 15:14:25 -07009
10#include "../errors.h"
11#include "../forwarding-entry.h"
12#include "binary-xml-encoder.h"
13#include "binary-xml-decoder.h"
14
Jeff Thompsone589c3f2013-10-12 17:30:50 -070015#ifdef __cplusplus
Jeff Thompson990599b2013-08-27 15:14:25 -070016extern "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 */
25ndn_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 */
33ndn_Error ndn_decodeBinaryXmlForwardingEntry(struct ndn_ForwardingEntry *forwardingEntry, struct ndn_BinaryXmlDecoder *decoder);
34
Jeff Thompsone589c3f2013-10-12 17:30:50 -070035#ifdef __cplusplus
Jeff Thompson990599b2013-08-27 15:14:25 -070036}
37#endif
38
39#endif