Rename ndn_BinaryXMLDecoder_readDTag to ndn_BinaryXMLDecoder_readElementStartDTag
diff --git a/ndn-cpp/c/encoding/BinaryXMLDecoder.c b/ndn-cpp/c/encoding/BinaryXMLDecoder.c
index 6a8900a..62300ff 100644
--- a/ndn-cpp/c/encoding/BinaryXMLDecoder.c
+++ b/ndn-cpp/c/encoding/BinaryXMLDecoder.c
@@ -57,7 +57,7 @@
return 0;
}
-char *ndn_BinaryXMLDecoder_readDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag)
+char *ndn_BinaryXMLDecoder_readElementStartDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag)
{
char *error;
unsigned int type;
@@ -66,10 +66,10 @@
return error;
if (type != ndn_BinaryXML_DTAG)
- return "ndn_BinaryXMLDecoder_readDTag: header type is not a DTAG";
+ return "ndn_BinaryXMLDecoder_readElementStartDTag: header type is not a DTAG";
if (value != expectedTag)
- return "ndn_BinaryXMLDecoder_readDTag: did not get the expected DTAG";
+ return "ndn_BinaryXMLDecoder_readElementStartDTag: did not get the expected DTAG";
return 0;
}
@@ -80,7 +80,7 @@
return "ndn_BinaryXMLDecoder_readElementClose: read past the end of the input";
if (unsafeReadOctet(self) != ndn_BinaryXML_CLOSE)
- return "ndn_BinaryXMLDecoder_readDTag: did not get the expected element close";
+ return "ndn_BinaryXMLDecoder_readElementStartDTag: did not get the expected element close";
return 0;
}
@@ -116,7 +116,7 @@
(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag, int allowNull, unsigned char **value, unsigned int *valueLen)
{
char *error;
- if (error = ndn_BinaryXMLDecoder_readDTag(self, expectedTag))
+ if (error = ndn_BinaryXMLDecoder_readElementStartDTag(self, expectedTag))
return error;
if (allowNull) {
diff --git a/ndn-cpp/c/encoding/BinaryXMLDecoder.h b/ndn-cpp/c/encoding/BinaryXMLDecoder.h
index 0f3285b..fc151a4 100644
--- a/ndn-cpp/c/encoding/BinaryXMLDecoder.h
+++ b/ndn-cpp/c/encoding/BinaryXMLDecoder.h
@@ -40,7 +40,7 @@
* @param expectedTag the expected value for DTAG
* @return 0 for success, else an error string, including an error if not the expected tag
*/
-char *ndn_BinaryXMLDecoder_readDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag);
+char *ndn_BinaryXMLDecoder_readElementStartDTag(struct ndn_BinaryXMLDecoder *self, unsigned int expectedTag);
/**
* Read one byte from self's input starting at offset, expecting it to be the element close.
diff --git a/ndn-cpp/c/encoding/BinaryXMLName.c b/ndn-cpp/c/encoding/BinaryXMLName.c
index 6a4aebb..603cae3 100644
--- a/ndn-cpp/c/encoding/BinaryXMLName.c
+++ b/ndn-cpp/c/encoding/BinaryXMLName.c
@@ -8,13 +8,18 @@
#include "BinaryXML.h"
#include "BinaryXMLName.h"
+char *ndn_encodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLEncoder *encoder)
+{
+
+}
+
char *ndn_decodeBinaryXMLName(struct ndn_Name *name, unsigned char *input, unsigned int inputLength)
{
struct ndn_BinaryXMLDecoder decoder;
ndn_BinaryXMLDecoder_init(&decoder, input, inputLength);
char *error;
- if (error = ndn_BinaryXMLDecoder_readDTag(&decoder, ndn_BinaryXML_DTag_Name))
+ if (error = ndn_BinaryXMLDecoder_readElementStartDTag(&decoder, ndn_BinaryXML_DTag_Name))
return error;
while (1) {
diff --git a/ndn-cpp/c/encoding/BinaryXMLName.h b/ndn-cpp/c/encoding/BinaryXMLName.h
index 3a83b8c..ce46097 100644
--- a/ndn-cpp/c/encoding/BinaryXMLName.h
+++ b/ndn-cpp/c/encoding/BinaryXMLName.h
@@ -8,11 +8,14 @@
#define NDN_BINARYXMLNAME_H
#include "../Name.h"
+#include "../util/DynamicUCharArray.h"
#ifdef __cplusplus
extern "C" {
#endif
+char *ndn_encodeBinaryXMLName(struct ndn_Name *name, struct ndn_BinaryXMLEncoder *encoder);
+
char *ndn_decodeBinaryXMLName(struct ndn_Name *name, unsigned char *input, unsigned int inputLength);
#ifdef __cplusplus