faces: Channel base class

refs #1261

Change-Id: If17037c4802cb6ccec0201c3bff7fc4b6db41c6a
diff --git a/daemon/face/channel.hpp b/daemon/face/channel.hpp
new file mode 100644
index 0000000..5993363
--- /dev/null
+++ b/daemon/face/channel.hpp
@@ -0,0 +1,50 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (C) 2014 Named Data Networking Project
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NFD_FACE_CHANNEL_HPP
+#define NFD_FACE_CHANNEL_HPP
+
+#include "face.hpp"
+
+namespace nfd {
+
+class Channel : noncopyable
+{
+public:
+  /** \brief Prototype for the callback called when face is created
+   *         (as a response to incoming connection or after connection
+   *         is established)
+   */
+  typedef function<void(const shared_ptr<Face>& newFace)> FaceCreatedCallback;
+
+  /** \brief Prototype for the callback that is called when face is failed to
+   *         get created
+   */
+  typedef function<void(const std::string& reason)> ConnectFailedCallback;
+
+  virtual
+  ~Channel();
+
+  const FaceUri&
+  getUri() const;
+
+protected:
+  void
+  setUri(const FaceUri& uri);
+
+private:
+  FaceUri m_uri;
+};
+
+inline const FaceUri&
+Channel::getUri() const
+{
+  return m_uri;
+}
+
+} // namespace nfd
+
+#endif // NFD_FACE_CHANNEL_HPP