api: Major API change. OnInterest/OnData callbacks now use just references, not shared pointers
If shared pointer is necessary, it can be obtained using
.shared_from_this() on Interest or Data object.
This commit also corrects all internal uses of expressInterest/setIntersetFilter.
Change-Id: I20207a5789fd189902f2c6e3827260b6b27a2514
diff --git a/src/security/validator-null.hpp b/src/security/validator-null.hpp
index 27dc63d..d1d8faa 100644
--- a/src/security/validator-null.hpp
+++ b/src/security/validator-null.hpp
@@ -21,20 +21,20 @@
protected:
virtual void
- checkPolicy (const shared_ptr<const Data>& data,
+ checkPolicy (const Data& data,
int stepCount,
const OnDataValidated &onValidated,
const OnDataValidationFailed &onValidationFailed,
std::vector<shared_ptr<ValidationRequest> > &nextSteps)
- { onValidated(data); }
+ { onValidated(data.shared_from_this()); }
virtual void
- checkPolicy (const shared_ptr<const Interest>& interest,
+ checkPolicy (const Interest& interest,
int stepCount,
const OnInterestValidated &onValidated,
const OnInterestValidationFailed &onValidationFailed,
std::vector<shared_ptr<ValidationRequest> > &nextSteps)
- { onValidated(interest); }
+ { onValidated(interest.shared_from_this()); }
};
}