Code style: Rename BinaryXML to BinaryXml
diff --git a/ndn-cpp/c/encoding/BinaryXMLEncoder.h b/ndn-cpp/c/encoding/BinaryXMLEncoder.h
index ac20ae8..c300d17 100644
--- a/ndn-cpp/c/encoding/BinaryXMLEncoder.h
+++ b/ndn-cpp/c/encoding/BinaryXMLEncoder.h
@@ -14,24 +14,24 @@
extern "C" {
#endif
-/** An ndn_BinaryXMLEncoder struct is used by all the encoding functions. You should initialize it with
- * ndn_BinaryXMLEncoder_init.
+/** An ndn_BinaryXmlEncoder struct is used by all the encoding functions. You should initialize it with
+ * ndn_BinaryXmlEncoder_init.
*/
-struct ndn_BinaryXMLEncoder {
+struct ndn_BinaryXmlEncoder {
struct ndn_DynamicUCharArray output; /**< receives the encoded output */
unsigned int offset; /**< the offset into output.array for the next encoding */
};
/**
- * Initialize an ndn_BinaryXMLEncoder_init struct with the arguments for initializing the ndn_DynamicUCharArray.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * Initialize an ndn_BinaryXmlEncoder_init struct with the arguments for initializing the ndn_DynamicUCharArray.
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param outputArray the allocated array buffer to receive the encoding
* @param outputArrayLength the length of outputArray
* @param reallocFunction the realloc function used by ndn_DynamicUCharArray_ensureLength. If outputArrayLength
* is large enough to receive the entire encoding, this can be 0.
*/
-static inline void ndn_BinaryXMLEncoder_init
- (struct ndn_BinaryXMLEncoder *self, unsigned char *outputArray, unsigned int outputArrayLength,
+static inline void ndn_BinaryXmlEncoder_init
+ (struct ndn_BinaryXmlEncoder *self, unsigned char *outputArray, unsigned int outputArrayLength,
unsigned char * (*reallocFunction)(unsigned char *, unsigned int))
{
ndn_DynamicUCharArray_init(&self->output, outputArray, outputArrayLength, reallocFunction);
@@ -40,134 +40,134 @@
/**
* Encode a header with the type and value and write it to self->output.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param type the header type
* @param value the header value
* @return 0 for success, else an error code
*/
-ndn_Error ndn_BinaryXMLEncoder_encodeTypeAndValue(struct ndn_BinaryXMLEncoder *self, unsigned int type, unsigned int value);
+ndn_Error ndn_BinaryXmlEncoder_encodeTypeAndValue(struct ndn_BinaryXmlEncoder *self, unsigned int type, unsigned int value);
/**
* Write an element start header using DTAG with the tag to self->output.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param tag the DTAG tag
* @return 0 for success, else an error code
*/
-static inline ndn_Error ndn_BinaryXMLEncoder_writeElementStartDTag(struct ndn_BinaryXMLEncoder *self, unsigned int tag)
+static inline ndn_Error ndn_BinaryXmlEncoder_writeElementStartDTag(struct ndn_BinaryXmlEncoder *self, unsigned int tag)
{
- return ndn_BinaryXMLEncoder_encodeTypeAndValue(self, ndn_BinaryXML_DTAG, tag);
+ return ndn_BinaryXmlEncoder_encodeTypeAndValue(self, ndn_BinaryXml_DTAG, tag);
}
/**
* Write an element close to self->output.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @return 0 for success, else an error code
*/
-ndn_Error ndn_BinaryXMLEncoder_writeElementClose(struct ndn_BinaryXMLEncoder *self);
+ndn_Error ndn_BinaryXmlEncoder_writeElementClose(struct ndn_BinaryXmlEncoder *self);
/**
* Write a BLOB header, then the bytes of the blob value to self->output.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param value an array of bytes for the blob value
* @param valueLength the length of the array
* @return 0 for success, else an error code
*/
-ndn_Error ndn_BinaryXMLEncoder_writeBlob(struct ndn_BinaryXMLEncoder *self, unsigned char *value, unsigned int valueLength);
+ndn_Error ndn_BinaryXmlEncoder_writeBlob(struct ndn_BinaryXmlEncoder *self, unsigned char *value, unsigned int valueLength);
/**
* Write an element start header using DTAG with the tag to self->output, then the blob, then an element close.
- * (If you want to just write the blob, use ndn_BinaryXMLEncoder_writeBlob .)
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * (If you want to just write the blob, use ndn_BinaryXmlEncoder_writeBlob .)
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param tag the DTAG tag
* @param value an array of bytes for the blob value
* @param valueLength the length of the array
* @return 0 for success, else an error code
*/
-ndn_Error ndn_BinaryXMLEncoder_writeBlobDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength);
+ndn_Error ndn_BinaryXmlEncoder_writeBlobDTagElement(struct ndn_BinaryXmlEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength);
/**
- * If value or valueLen is 0 then do nothing, otherwise call ndn_BinaryXMLEncoder_writeBlobDTagElement.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * If value or valueLen is 0 then do nothing, otherwise call ndn_BinaryXmlEncoder_writeBlobDTagElement.
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param tag the DTAG tag
* @param value an array of bytes for the blob value
* @param valueLength the length of the array
* @return 0 for success, else an error code
*/
-static inline ndn_Error ndn_BinaryXMLEncoder_writeOptionalBlobDTagElement
- (struct ndn_BinaryXMLEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength)
+static inline ndn_Error ndn_BinaryXmlEncoder_writeOptionalBlobDTagElement
+ (struct ndn_BinaryXmlEncoder *self, unsigned int tag, unsigned char *value, unsigned int valueLength)
{
if (value && valueLength > 0)
- return ndn_BinaryXMLEncoder_writeBlobDTagElement(self, tag, value, valueLength);
+ return ndn_BinaryXmlEncoder_writeBlobDTagElement(self, tag, value, valueLength);
else
return (ndn_Error)0;
}
/**
* Write a UDATA header, then the value as an unsigned decimal integer.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param value the unsigned int
* @return 0 for success, else an error code
*/
-ndn_Error ndn_BinaryXMLEncoder_writeUnsignedDecimalInt(struct ndn_BinaryXMLEncoder *self, unsigned int value);
+ndn_Error ndn_BinaryXmlEncoder_writeUnsignedDecimalInt(struct ndn_BinaryXmlEncoder *self, unsigned int value);
/**
* Write an element start header using DTAG with the tag to self->output, then the value as an unsigned decimal integer,
* then an element close.
- * (If you want to just write the integer, use ndn_BinaryXMLEncoder_writeUnsignedDecimalInt .)
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * (If you want to just write the integer, use ndn_BinaryXmlEncoder_writeUnsignedDecimalInt .)
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param tag the DTAG tag
* @param value the unsigned int
* @return 0 for success, else an error code
*/
-ndn_Error ndn_BinaryXMLEncoder_writeUnsignedDecimalIntDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, unsigned int value);
+ndn_Error ndn_BinaryXmlEncoder_writeUnsignedDecimalIntDTagElement(struct ndn_BinaryXmlEncoder *self, unsigned int tag, unsigned int value);
/**
- * If value is negative then do nothing, otherwise call ndn_BinaryXMLEncoder_writeUnsignedDecimalIntDTagElement.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * If value is negative then do nothing, otherwise call ndn_BinaryXmlEncoder_writeUnsignedDecimalIntDTagElement.
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param tag the DTAG tag
* @param value negative for none, otherwise use (unsigned int)value
* @return 0 for success, else an error code
*/
-static inline ndn_Error ndn_BinaryXMLEncoder_writeOptionalUnsignedDecimalIntDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, int value)
+static inline ndn_Error ndn_BinaryXmlEncoder_writeOptionalUnsignedDecimalIntDTagElement(struct ndn_BinaryXmlEncoder *self, unsigned int tag, int value)
{
if (value >= 0)
- return ndn_BinaryXMLEncoder_writeUnsignedDecimalIntDTagElement(self, tag, (unsigned int)value);
+ return ndn_BinaryXmlEncoder_writeUnsignedDecimalIntDTagElement(self, tag, (unsigned int)value);
else
return (ndn_Error)0;
}
/**
* Write a BLOB header, then the absolute value of value to self->output encoded as big endian.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param value the double to encode as big endian. If value is 0, the big endian encoding has zero bytes.
* The value is converted to absolute value.
* @return 0 for success, else an error code
*/
-ndn_Error ndn_BinaryXMLEncoder_writeAbsDoubleBigEndianBlob(struct ndn_BinaryXMLEncoder *self, double value);
+ndn_Error ndn_BinaryXmlEncoder_writeAbsDoubleBigEndianBlob(struct ndn_BinaryXmlEncoder *self, double value);
/**
* Write an element start header using DTAG with the tag to self->output, then the absolute value of milliseconds
* as a big endian BLOB converted to 4096 ticks per second, then an element close.
- * (If you want to just write the integer, use ndn_BinaryXMLEncoder_writeUnsignedDecimalInt .)
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * (If you want to just write the integer, use ndn_BinaryXmlEncoder_writeUnsignedDecimalInt .)
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param tag the DTAG tag
* @param milliseconds the the number of milliseconds
* @return 0 for success, else an error code
*/
-ndn_Error ndn_BinaryXMLEncoder_writeTimeMillisecondsDTagElement(struct ndn_BinaryXMLEncoder *self, unsigned int tag, double milliseconds);
+ndn_Error ndn_BinaryXmlEncoder_writeTimeMillisecondsDTagElement(struct ndn_BinaryXmlEncoder *self, unsigned int tag, double milliseconds);
/**
- * If milliseconds is negative then do nothing, otherwise call ndn_BinaryXMLEncoder_writeTimeMillisecondsDTagElement.
- * @param self pointer to the ndn_BinaryXMLEncoder struct
+ * If milliseconds is negative then do nothing, otherwise call ndn_BinaryXmlEncoder_writeTimeMillisecondsDTagElement.
+ * @param self pointer to the ndn_BinaryXmlEncoder struct
* @param tag the DTAG tag
* @param milliseconds negative for none, otherwise the number of milliseconds
* @return 0 for success, else an error code
*/
-static inline ndn_Error ndn_BinaryXMLEncoder_writeOptionalTimeMillisecondsDTagElement
- (struct ndn_BinaryXMLEncoder *self, unsigned int tag, double milliseconds)
+static inline ndn_Error ndn_BinaryXmlEncoder_writeOptionalTimeMillisecondsDTagElement
+ (struct ndn_BinaryXmlEncoder *self, unsigned int tag, double milliseconds)
{
if (milliseconds >= 0)
- return ndn_BinaryXMLEncoder_writeTimeMillisecondsDTagElement(self, tag, milliseconds);
+ return ndn_BinaryXmlEncoder_writeTimeMillisecondsDTagElement(self, tag, milliseconds);
else
return (ndn_Error)0;
}