Files
NFD/daemon/face/channel.hpp
T
Junxiao Shi 61e3cc51ed faces: Channel base class
refs #1261

Change-Id: If17037c4802cb6ccec0201c3bff7fc4b6db41c6a
2014-03-05 11:56:10 -07:00

51 lines
1018 B
C++

/* -*- 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