blob: d723d932e91351f40ee22b7f2175218c94a1a2dd [file] [log] [blame]
/*
* @author: ucla-cs
* This class represents Exclude Component OBjects
*/
var ExcludeComponent = function ExcludeComponent(_body) {
//TODO Check BODY is an Array of componenets.
this.body = _body
};
ExcludeComponent.prototype.from_ccnb = function( decoder) {
this.body = decoder.readBinaryElement(this.getElementLabel());
};
ExcludeComponent.prototype.to_ccnb = function(encoder) {
encoder.writeElement(this.getElementLabel(), this.body);
};
ExcludeComponent.prototype.getElementLabel = function() { return CCNProtocolDTags.Component; };