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/management/nfd-controller.cpp b/src/management/nfd-controller.cpp
index c72c5d3..b75f0e0 100644
--- a/src/management/nfd-controller.cpp
+++ b/src/management/nfd-controller.cpp
@@ -5,7 +5,7 @@
*/
#include "common.hpp"
-#include "../node.hpp"
+#include "../face.hpp"
#include "nfd-controller.hpp"
#include "nfd-fib-management-options.hpp"
@@ -14,7 +14,7 @@
namespace ndn {
namespace nfd {
-Controller::Controller(Node& face)
+Controller::Controller(Face& face)
: m_face(face)
, m_faceId(0)
{
@@ -82,18 +82,18 @@
}
// void
-// processFaceActionResponse(const shared_ptr<Data>& data,
+// processFaceActionResponse(Data& data,
// const FaceOperationSucceedCallback& onSuccess,
// const FailCallback& onFail);
void
-Controller::processFibCommandResponse(const shared_ptr<Data>& data,
+Controller::processFibCommandResponse(Data& data,
const FibCommandSucceedCallback& onSuccess,
const FailCallback& onFail)
{
try
{
- ControlResponse response(data->getContent().blockFromValue());
+ ControlResponse response(data.getContent().blockFromValue());
if (response.getCode() != 200)
return onFail(response.getText());