Moved classes Signature and SignedInfo into ContentObject.js, and deleted Signature.js and SignedInfo.js.
Moved classes Exclude, ExcludeAny and ExcludeComponent into Interest.js, and deleted Exclude.js, ExcludeAny.js and ExcludeComponent.js.
diff --git a/js/Interest.js b/js/Interest.js
index 04cc290..a04c463 100644
--- a/js/Interest.js
+++ b/js/Interest.js
@@ -134,3 +134,95 @@
return true;
}
+/**
+ * Exclude
+ */
+var Exclude = function Exclude(_values){
+
+ this.OPTIMUM_FILTER_SIZE = 100;
+
+
+ this.values = _values; //array of elements
+
+}
+
+Exclude.prototype.from_ccnb = function(/*XMLDecoder*/ decoder) {
+
+
+
+ decoder.readStartElement(this.getElementLabel());
+
+ //TODO APPLY FILTERS/EXCLUDE
+
+ //TODO
+ /*var component;
+ var any = false;
+ while ((component = decoder.peekStartElement(CCNProtocolDTags.Component)) ||
+ (any = decoder.peekStartElement(CCNProtocolDTags.Any)) ||
+ decoder.peekStartElement(CCNProtocolDTags.Bloom)) {
+ var ee = component?new ExcludeComponent(): any ? new ExcludeAny() : new BloomFilter();
+ ee.decode(decoder);
+ _values.add(ee);
+ }*/
+
+ decoder.readEndElement();
+
+};
+
+Exclude.prototype.to_ccnb=function(/*XMLEncoder*/ encoder) {
+ if (!validate()) {
+ throw new ContentEncodingException("Cannot encode " + this.getClass().getName() + ": field values missing.");
+ }
+
+ if (empty())
+ return;
+
+ encoder.writeStartElement(getElementLabel());
+
+ encoder.writeEndElement();
+
+ };
+
+Exclude.prototype.getElementLabel = function() { return CCNProtocolDTags.Exclude; };
+
+
+/**
+ * ExcludeAny
+ */
+var ExcludeAny = function ExcludeAny() {
+
+};
+
+ExcludeAny.prototype.from_ccnb = function(decoder) {
+ decoder.readStartElement(this.getElementLabel());
+ decoder.readEndElement();
+};
+
+
+ExcludeAny.prototype.to_ccnb = function( encoder) {
+ encoder.writeStartElement(this.getElementLabel());
+ encoder.writeEndElement();
+};
+
+ExcludeAny.prototype.getElementLabel=function() { return CCNProtocolDTags.Any; };
+
+
+/**
+ * ExcludeComponent
+ */
+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; };