Major update: refactored the API of all classes to make attributes start with a lower case letter and rename encode=>to_ccnb() and decode()=>from_ccnb.
(according to the API notes: http://sea.remap.ucla.edu:8080/attachments/download/23/lwndn_api-notes_21020830.txt )
diff --git a/js/ExcludeComponent.js b/js/ExcludeComponent.js
index ed2bbeb..d723d93 100644
--- a/js/ExcludeComponent.js
+++ b/js/ExcludeComponent.js
@@ -3,19 +3,19 @@
* This class represents Exclude Component OBjects
*/
-var ExcludeComponent = function ExcludeComponent(_Body) {
+var ExcludeComponent = function ExcludeComponent(_body) {
//TODO Check BODY is an Array of componenets.
- this.Body = _Body
+ this.body = _body
};
-ExcludeComponent.prototype.decode = function( decoder) {
- body = decoder.readBinaryElement(this.getElementLabel());
+ExcludeComponent.prototype.from_ccnb = function( decoder) {
+ this.body = decoder.readBinaryElement(this.getElementLabel());
};
-ExcludeComponent.prototype.encode = function(encoder) {
- encoder.writeElement(this.getElementLabel(), body);
+ExcludeComponent.prototype.to_ccnb = function(encoder) {
+ encoder.writeElement(this.getElementLabel(), this.body);
};
ExcludeComponent.prototype.getElementLabel = function() { return CCNProtocolDTags.Component; };