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
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 "common.hpp"
30
31
namespace
nfd
{
32
33
class
Channel;
34
class
Face
;
35
41
typedef
function<void(const shared_ptr<Face>& newFace)>
FaceCreatedCallback
;
42
47
typedef
function<void(const std::string& reason)>
FaceConnectFailedCallback
;
48
49
50
class
ProtocolFactory
51
{
52
public
:
56
struct
Error
:
public
std::runtime_error
57
{
58
Error
(
const
std::string& what) :
std
::runtime_error(what) {}
59
};
60
69
virtual
void
70
createFace
(
const
FaceUri
& uri,
71
ndn::nfd::FacePersistency
persistency,
72
const
FaceCreatedCallback
& onCreated,
73
const
FaceConnectFailedCallback& onConnectFailed) = 0;
74
75
virtual
std::list<shared_ptr<const Channel>>
76
getChannels
()
const
= 0;
77
};
78
79
}
// namespace nfd
80
81
#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:47
nfd::ProtocolFactory::getChannels
virtual std::list< shared_ptr< const Channel > > getChannels() const =0
ndn::util::FaceUri
represents the underlying protocol and address used by a Face
Definition:
face-uri.hpp:44
std
STL namespace.
nfd::ProtocolFactory::Error::Error
Error(const std::string &what)
Definition:
protocol-factory.hpp:58
nfd::Face
represents a face
Definition:
face.hpp:57
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:38
nfd::ProtocolFactory
Definition:
protocol-factory.hpp:50
nfd::ProtocolFactory::Error
Base class for all exceptions thrown by channel factories.
Definition:
protocol-factory.hpp:56
ndn::nfd::FacePersistency
FacePersistency
Definition:
nfd-constants.hpp:48
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:34
nfd::ProtocolFactory::createFace
virtual void createFace(const FaceUri &uri, ndn::nfd::FacePersistency persistency, const FaceCreatedCallback &onCreated, const FaceConnectFailedCallback &onConnectFailed)=0
Try to create Face using the supplied FaceUri.
ndnSIM
NFD
daemon
face
protocol-factory.hpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11