face: Enable KeyChain customization in DummyClientFace
This feature also required two new Face constructors
Change-Id: I25c6d9d0d94a065176ed348d25e7b99a6c7999c0
Refs: #3435
diff --git a/src/face.cpp b/src/face.cpp
index 51519c9..4d68927 100644
--- a/src/face.cpp
+++ b/src/face.cpp
@@ -66,8 +66,16 @@
construct(transport, *m_internalKeyChain);
}
-Face::Face(shared_ptr<Transport> transport,
- boost::asio::io_service& ioService)
+Face::Face(shared_ptr<Transport> transport, KeyChain& keyChain)
+ : m_internalIoService(new boost::asio::io_service())
+ , m_ioService(*m_internalIoService)
+ , m_internalKeyChain(nullptr)
+ , m_impl(new Impl(*this))
+{
+ construct(transport, keyChain);
+}
+
+Face::Face(shared_ptr<Transport> transport, boost::asio::io_service& ioService)
: m_ioService(ioService)
, m_internalKeyChain(new KeyChain())
, m_impl(new Impl(*this))
@@ -75,9 +83,7 @@
construct(transport, *m_internalKeyChain);
}
-Face::Face(shared_ptr<Transport> transport,
- boost::asio::io_service& ioService,
- KeyChain& keyChain)
+Face::Face(shared_ptr<Transport> transport, boost::asio::io_service& ioService, KeyChain& keyChain)
: m_ioService(ioService)
, m_internalKeyChain(nullptr)
, m_impl(new Impl(*this))