NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
channel.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
25 #ifndef NFD_DAEMON_FACE_CHANNEL_HPP
26 #define NFD_DAEMON_FACE_CHANNEL_HPP
27 
28 #include "face.hpp"
29 
30 namespace nfd {
31 
32 class Channel : noncopyable
33 {
34 public:
39  typedef function<void(const shared_ptr<Face>& newFace)> FaceCreatedCallback;
40 
44  typedef function<void(const std::string& reason)> ConnectFailedCallback;
45 
46  virtual
47  ~Channel();
48 
49  const FaceUri&
50  getUri() const;
51 
52 protected:
53  void
54  setUri(const FaceUri& uri);
55 
56 private:
57  FaceUri m_uri;
58 };
59 
60 inline const FaceUri&
62 {
63  return m_uri;
64 }
65 
66 } // namespace nfd
67 
68 #endif // NFD_DAEMON_FACE_CHANNEL_HPP
const FaceUri & getUri() const
Definition: channel.hpp:61
void setUri(const FaceUri &uri)
Definition: channel.cpp:34
function< void(const std::string &reason)> ConnectFailedCallback
Prototype for the callback that is called when face is failed to get created.
Definition: channel.hpp:44
virtual ~Channel()
Definition: channel.cpp:29
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback called when face is created (as a response to incoming connection or after...
Definition: channel.hpp:39