util: Add BroadcastLink to DummyClientFace

Change-Id: I2bfe3156016a098b91ff375f2bb83b5e4351317c
Refs: #3913
diff --git a/src/util/dummy-client-face.hpp b/src/util/dummy-client-face.hpp
index 781a797..7d40f65 100644
--- a/src/util/dummy-client-face.hpp
+++ b/src/util/dummy-client-face.hpp
@@ -72,6 +72,12 @@
     std::function<void(time::milliseconds)> processEventsOverride;
   };
 
+  class AlreadyLinkedError : public Error
+  {
+  public:
+    AlreadyLinkedError();
+  };
+
   /** \brief Create a dummy face with internal IO service
    */
   explicit
@@ -92,6 +98,8 @@
   DummyClientFace(boost::asio::io_service& ioService, KeyChain& keyChain,
                   const Options& options = Options());
 
+  ~DummyClientFace();
+
   /** \brief cause the Face to receive an interest
    */
   void
@@ -107,6 +115,16 @@
   void
   receive(const lp::Nack& nack);
 
+  /** \brief link another DummyClientFace through a broadcast media
+   */
+  void
+  linkTo(DummyClientFace& other);
+
+  /** \brief unlink the broadcast media if previously linked
+   */
+  void
+  unlink();
+
 private:
   class Transport;
 
@@ -114,6 +132,9 @@
   construct(const Options& options);
 
   void
+  enableBroadcastLink();
+
+  void
   enablePacketLogging();
 
   void
@@ -165,7 +186,9 @@
    */
   Signal<DummyClientFace, lp::Nack> onSendNack;
 
-private:
+NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
+  struct BroadcastLink;
+  shared_ptr<BroadcastLink> m_bcastLink;
   std::unique_ptr<KeyChain> m_internalKeyChain;
   KeyChain& m_keyChain;
   std::function<void(time::milliseconds)> m_processEventsOverride;