ndn::tools::autoconfig::Base Class Referenceabstract

Base class for discovery stages. More...

#include <base.hpp>

Inheritance diagram for ndn::tools::autoconfig::Base:
Collaboration diagram for ndn::tools::autoconfig::Base:

Classes

class  Error
 

Public Types

typedef std::function< void(const std::string &)> NextStageCallback
 Callback to be called when the stage fails. More...
 

Public Member Functions

virtual void start ()=0
 Start the stage. More...
 

Protected Member Functions

 Base (Face &face, KeyChain &keyChain, const NextStageCallback &nextStageOnFailure)
 Initialize variables and create Controller instance. More...
 
void connectToHub (const std::string &uri)
 Attempt to connect to local hub using the uri FaceUri. More...
 

Protected Attributes

Face & m_face
 
KeyChain & m_keyChain
 
ndn::nfd::Controller m_controller
 
NextStageCallback m_nextStageOnFailure
 

Detailed Description

Base class for discovery stages.

Definition at line 48 of file base.hpp.

Member Typedef Documentation

typedef std::function<void(const std::string&)> ndn::tools::autoconfig::Base::NextStageCallback

Callback to be called when the stage fails.

Definition at line 64 of file base.hpp.

Constructor & Destructor Documentation

ndn::tools::autoconfig::Base::Base ( Face &  face,
KeyChain &  keyChain,
const NextStageCallback nextStageOnFailure 
)
protected

Initialize variables and create Controller instance.

Parameters
faceFace to be used for all operations (e.g., will send registration commands)
keyChainKeyChain object
nextStageOnFailureCallback to be called after the stage failed

Definition at line 32 of file base.cpp.

Member Function Documentation

void ndn::tools::autoconfig::Base::connectToHub ( const std::string &  uri)
protected

Attempt to connect to local hub using the uri FaceUri.

Exceptions
Base::Errorwhen failed to establish the tunnel

Definition at line 41 of file base.cpp.

Member Data Documentation

ndn::nfd::Controller ndn::tools::autoconfig::Base::m_controller
protected

Definition at line 113 of file base.hpp.

Face& ndn::tools::autoconfig::Base::m_face
protected

Definition at line 111 of file base.hpp.

KeyChain& ndn::tools::autoconfig::Base::m_keyChain
protected

Definition at line 112 of file base.hpp.

NextStageCallback ndn::tools::autoconfig::Base::m_nextStageOnFailure
protected

Definition at line 114 of file base.hpp.