Added expressInterest which takes the Interest directly.
diff --git a/ndn-cpp/node.hpp b/ndn-cpp/node.hpp
index 911298b..277628f 100644
--- a/ndn-cpp/node.hpp
+++ b/ndn-cpp/node.hpp
@@ -57,9 +57,29 @@
}
/**
+ * Send the Interest through the transport, read the entire response and call onData(interest, data).
+ * @param interest A reference to the Interest. This copies the Interest.
+ * @param onData A function object to call when a matching data packet is received. This copies the function object, so you may need to
+ * use func_lib::ref() as appropriate.
+ * @param onTimeout A function object to call if the interest times out. If onTimeout is an empty OnTimeout(), this does not use it.
+ * This copies the function object, so you may need to use func_lib::ref() as appropriate.
+ */
+ void expressInterest(const Interest &interest, const OnData &onData, const OnTimeout &onTimeout);
+
+ /**
+ * Send the Interest through the transport, read the entire response and call onData(interest, data).
+ * @param interest A reference to the Interest. This copies the Interest.
+ * @param onData A function object to call when a matching data packet is received. This copies the function object, so you may need to
+ * use func_lib::ref() as appropriate.
+ */
+ void expressInterest(const Interest &interest, const OnData &onData) {
+ expressInterest(interest, onData, OnTimeout());
+ }
+
+ /**
* Encode name as an Interest. If interestTemplate is not 0, use its interest selectors.
* Send the interest through the transport, read the entire response and call onData(interest, data).
- * @param name A reference to a Name for the interest. This does not keep a pointer to the Name object.
+ * @param name A reference to a Name for the interest. This copies the Name.
* @param interestTemplate if not 0, copy interest selectors from the template. This does not keep a pointer to the Interest object.
* @param onData A function object to call when a matching data packet is received. This copies the function object, so you may need to
* use func_lib::ref() as appropriate.
@@ -71,7 +91,7 @@
/**
* Encode name as an Interest, using a default interest lifetime.
* Send the interest through the transport, read the entire response and call onData(interest, data).
- * @param name A reference to a Name for the interest. This does not keep a pointer to the Name object.
+ * @param name A reference to a Name for the interest. This copies the Name.
* @param onData A function object to call when a matching data packet is received. This copies the function object, so you may need to
* use func_lib::ref() as appropriate.
* @param onTimeout A function object to call if the interest times out. If onTimeout is an empty OnTimeout(), this does not use it.
@@ -85,7 +105,7 @@
/**
* Encode name as an Interest. If interestTemplate is not 0, use its interest selectors.
* Send the interest through the transport, read the entire response and call onData(interest, data).
- * @param name A reference to a Name for the interest. This does not keep a pointer to the Name object.
+ * @param name A reference to a Name for the interest. This copies the Name.
* @param interestTemplate if not 0, copy interest selectors from the template. This does not keep a pointer to the Interest object.
* @param onData A function object to call when a matching data packet is received. This copies the function object, so you may need to
* use func_lib::ref() as appropriate.
@@ -98,7 +118,7 @@
/**
* Encode name as an Interest, using a default interest lifetime.
* Send the interest through the transport, read the entire response and call onData(interest, data).
- * @param name A reference to a Name for the interest. This does not keep a pointer to the Name object.
+ * @param name A reference to a Name for the interest. This copies the Name.
* @param onData A function object to call when a matching data packet is received. This copies the function object, so you may need to
* use func_lib::ref() as appropriate.
*/