blob: 4a23371ea243a7b00eb1e6c7f3e010c7a5ddd207 [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
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
16extern "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
35#ifdef __cplusplus
36}
37#endif
38
39#endif