Rename BinaryXMLWireFormat to BinaryXmlWireFormat
diff --git a/js/ContentObject.js b/js/ContentObject.js
index ec2efde..255550e 100644
--- a/js/ContentObject.js
+++ b/js/ContentObject.js
@@ -118,36 +118,36 @@
};
/**
- * @deprecated Use BinaryXMLWireFormat.decodeContentObject.
+ * @deprecated Use BinaryXmlWireFormat.decodeContentObject.
*/
ContentObject.prototype.from_ccnb = function(/*XMLDecoder*/ decoder) {
- BinaryXMLWireFormat.decodeContentObject(this, decoder);
+ BinaryXmlWireFormat.decodeContentObject(this, decoder);
};
/**
- * @deprecated Use BinaryXMLWireFormat.encodeContentObject.
+ * @deprecated Use BinaryXmlWireFormat.encodeContentObject.
*/
ContentObject.prototype.to_ccnb = function(/*XMLEncoder*/ encoder) {
- BinaryXMLWireFormat.encodeContentObject(this, encoder);
+ BinaryXmlWireFormat.encodeContentObject(this, encoder);
};
/**
* Encode this ContentObject for a particular wire format.
- * @param {WireFormat} wireFormat if null, use BinaryXMLWireFormat.
+ * @param {WireFormat} wireFormat if null, use BinaryXmlWireFormat.
* @returns {Uint8Array}
*/
ContentObject.prototype.encode = function(wireFormat) {
- wireFormat = (wireFormat || BinaryXMLWireFormat.instance);
+ wireFormat = (wireFormat || BinaryXmlWireFormat.instance);
return wireFormat.encodeContentObject(this);
};
/**
* Decode the input using a particular wire format and update this ContentObject.
* @param {Uint8Array} input
- * @param {WireFormat} wireFormat if null, use BinaryXMLWireFormat.
+ * @param {WireFormat} wireFormat if null, use BinaryXmlWireFormat.
*/
ContentObject.prototype.decode = function(input, wireFormat) {
- wireFormat = (wireFormat || BinaryXMLWireFormat.instance);
+ wireFormat = (wireFormat || BinaryXmlWireFormat.instance);
wireFormat.decodeContentObject(this, input);
};
diff --git a/js/Interest.js b/js/Interest.js
index 8a507eb..dba23b2 100644
--- a/js/Interest.js
+++ b/js/Interest.js
@@ -50,36 +50,36 @@
Interest.DEFAULT_ANSWER_ORIGIN_KIND = Interest.ANSWER_CONTENT_STORE | Interest.ANSWER_GENERATED;
/**
- * @deprecated Use BinaryXMLWireFormat.decodeInterest.
+ * @deprecated Use BinaryXmlWireFormat.decodeInterest.
*/
Interest.prototype.from_ccnb = function(/*XMLDecoder*/ decoder) {
- BinaryXMLWireFormat.decodeInterest(this, decoder);
+ BinaryXmlWireFormat.decodeInterest(this, decoder);
};
/**
- * @deprecated Use BinaryXMLWireFormat.encodeInterest.
+ * @deprecated Use BinaryXmlWireFormat.encodeInterest.
*/
Interest.prototype.to_ccnb = function(/*XMLEncoder*/ encoder){
- BinaryXMLWireFormat.encodeInterest(this, encoder);
+ BinaryXmlWireFormat.encodeInterest(this, encoder);
};
/**
* Encode this Interest for a particular wire format.
- * @param {WireFormat} wireFormat if null, use BinaryXMLWireFormat.
+ * @param {WireFormat} wireFormat if null, use BinaryXmlWireFormat.
* @returns {Uint8Array}
*/
Interest.prototype.encode = function(wireFormat) {
- wireFormat = (wireFormat || BinaryXMLWireFormat.instance);
+ wireFormat = (wireFormat || BinaryXmlWireFormat.instance);
return wireFormat.encodeInterest(this);
};
/**
* Decode the input using a particular wire format and update this Interest.
* @param {Uint8Array} input
- * @param {WireFormat} wireFormat if null, use BinaryXMLWireFormat.
+ * @param {WireFormat} wireFormat if null, use BinaryXmlWireFormat.
*/
Interest.prototype.decode = function(input, wireFormat) {
- wireFormat = (wireFormat || BinaryXMLWireFormat.instance);
+ wireFormat = (wireFormat || BinaryXmlWireFormat.instance);
wireFormat.decodeInterest(this, input);
};
diff --git a/js/encoding/BinaryXMLWireFormat.js b/js/encoding/BinaryXMLWireFormat.js
index b4859a0..3120d8c 100644
--- a/js/encoding/BinaryXMLWireFormat.js
+++ b/js/encoding/BinaryXMLWireFormat.js
@@ -5,10 +5,10 @@
*/
/**
- * A BinaryXMLWireFormat implements the WireFormat interface for encoding and decoding in binary XML.
+ * A BinaryXmlWireFormat implements the WireFormat interface for encoding and decoding in binary XML.
* @constructor
*/
-var BinaryXMLWireFormat = function BinaryXMLWireFormat() {
+var BinaryXmlWireFormat = function BinaryXmlWireFormat() {
};
/**
@@ -16,9 +16,9 @@
* @param {Interest} interest
* @returns {UInt8Array}
*/
-BinaryXMLWireFormat.prototype.encodeInterest = function(interest) {
+BinaryXmlWireFormat.prototype.encodeInterest = function(interest) {
var encoder = new BinaryXMLEncoder();
- BinaryXMLWireFormat.encodeInterest(interest, encoder);
+ BinaryXmlWireFormat.encodeInterest(interest, encoder);
return encoder.getReducedOstream();
};
@@ -27,9 +27,9 @@
* @param {Interest} interest
* @param {Uint8Array} input
*/
-BinaryXMLWireFormat.prototype.decodeInterest = function(interest, input) {
+BinaryXmlWireFormat.prototype.decodeInterest = function(interest, input) {
var decoder = new BinaryXMLDecoder(input);
- BinaryXMLWireFormat.decodeInterest(interest, decoder);
+ BinaryXmlWireFormat.decodeInterest(interest, decoder);
};
/**
@@ -37,9 +37,9 @@
* @param {ContentObject} contentObject
* @returns {Uint8Array}
*/
-BinaryXMLWireFormat.prototype.encodeContentObject = function(contentObject) {
+BinaryXmlWireFormat.prototype.encodeContentObject = function(contentObject) {
var encoder = new BinaryXMLEncoder();
- BinaryXMLWireFormat.encodeContentObject(contentObject, encoder);
+ BinaryXmlWireFormat.encodeContentObject(contentObject, encoder);
return encoder.getReducedOstream();
};
@@ -48,20 +48,20 @@
* @param {ContentObject} contentObject
* @param {Uint8Array} input
*/
-BinaryXMLWireFormat.prototype.decodeContentObject = function(contentObject, input) {
+BinaryXmlWireFormat.prototype.decodeContentObject = function(contentObject, input) {
var decoder = new BinaryXMLDecoder(input);
- BinaryXMLWireFormat.decodeContentObject(contentObject, decoder);
+ BinaryXmlWireFormat.decodeContentObject(contentObject, decoder);
};
// Default object.
-BinaryXMLWireFormat.instance = new BinaryXMLWireFormat();
+BinaryXmlWireFormat.instance = new BinaryXmlWireFormat();
/**
* Encode the interest by calling the operations on the encoder.
* @param {Interest} interest
* @param {BinaryXMLEncoder} encoder
*/
-BinaryXMLWireFormat.encodeInterest = function(interest, encoder) {
+BinaryXmlWireFormat.encodeInterest = function(interest, encoder) {
encoder.writeStartElement(CCNProtocolDTags.Interest);
interest.name.to_ccnb(encoder);
@@ -102,7 +102,7 @@
* @param {Interest} interest
* @param {BinaryXMLDecoder} decoder
*/
-BinaryXMLWireFormat.decodeInterest = function(interest, decoder) {
+BinaryXmlWireFormat.decodeInterest = function(interest, decoder) {
decoder.readStartElement(CCNProtocolDTags.Interest);
interest.name = new Name();
@@ -166,7 +166,7 @@
* @param {ContentObject} contentObject
* @param {BinaryXMLEncoder} encoder
*/
-BinaryXMLWireFormat.encodeContentObject = function(contentObject, encoder) {
+BinaryXmlWireFormat.encodeContentObject = function(contentObject, encoder) {
//TODO verify name, SignedInfo and Signature is present
encoder.writeStartElement(contentObject.getElementLabel());
@@ -195,7 +195,7 @@
* @param {ContentObject} contentObject
* @param {BinaryXMLDecoder} decoder
*/
-BinaryXMLWireFormat.decodeContentObject = function(contentObject, decoder) {
+BinaryXmlWireFormat.decodeContentObject = function(contentObject, decoder) {
// TODO VALIDATE THAT ALL FIELDS EXCEPT SIGNATURE ARE PRESENT
decoder.readStartElement(contentObject.getElementLabel());
diff --git a/wscript b/wscript
index 2ffa3b5..2533254 100644
--- a/wscript
+++ b/wscript
@@ -100,7 +100,7 @@
"js/encoding/BinaryXMLEncoder.js",
"js/encoding/BinaryXMLDecoder.js",
"js/encoding/BinaryXMLStructureDecoder.js",
- "js/encoding/BinaryXMLWireFormat.js",
+ "js/encoding/BinaryXmlWireFormat.js",
"js/encoding/DataUtils.js",
"js/encoding/EncodingUtils.js",
"js/security/KeyManager.js",