NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
protocol-factory.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_FACE_PROTOCOL_FACTORY_HPP
27
#define NFD_DAEMON_FACE_PROTOCOL_FACTORY_HPP
28
29
#include "
face.hpp
"
30
31
namespace
nfd {
32
33
class
Channel
;
34
40
typedef
function<void(const shared_ptr<Face>& newFace)>
FaceCreatedCallback
;
41
46
typedef
function<void(const std::string& reason)>
FaceConnectFailedCallback
;
47
48
49
class
ProtocolFactory
50
{
51
public
:
55
struct
Error
:
public
std::runtime_error
56
{
57
Error
(
const
std::string& what) : std::runtime_error(what) {}
58
};
59
67
virtual
void
68
createFace
(
const
FaceUri& uri,
69
const
FaceCreatedCallback
& onCreated,
70
const
FaceConnectFailedCallback
& onConnectFailed) = 0;
71
72
virtual
std::list<shared_ptr<const Channel> >
73
getChannels
()
const
= 0;
74
75
};
76
77
}
// namespace nfd
78
79
#endif // NFD_DAEMON_FACE_PROTOCOL_FACTORY_HPP
nfd::FaceConnectFailedCallback
function< void(const std::string &reason)> FaceConnectFailedCallback
Prototype for the callback that is called when face is failed to get created.
Definition:
protocol-factory.hpp:46
nfd::ProtocolFactory::createFace
virtual void createFace(const FaceUri &uri, const FaceCreatedCallback &onCreated, const FaceConnectFailedCallback &onConnectFailed)=0
Try to create Face using the supplied Face URI.
nfd::Channel
Definition:
channel.hpp:32
nfd::ProtocolFactory::Error::Error
Error(const std::string &what)
Definition:
protocol-factory.hpp:57
face.hpp
nfd::ProtocolFactory
Definition:
protocol-factory.hpp:49
nfd::ProtocolFactory::Error
Base class for all exceptions thrown by channel factories.
Definition:
protocol-factory.hpp:55
nfd::ProtocolFactory::getChannels
virtual std::list< shared_ptr< const Channel > > getChannels() const =0
nfd::FaceCreatedCallback
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:
protocol-factory.hpp:33
ndnSIM
NFD
daemon
face
protocol-factory.hpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7