All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
controller.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
7 #ifndef NDN_MANAGEMENT_CONTROLLER_HPP
8 #define NDN_MANAGEMENT_CONTROLLER_HPP
9 
10 #include "../common.hpp"
11 #include "../name.hpp"
12 #include "../interest.hpp"
13 #include "../data.hpp"
14 
15 namespace ndn {
16 
17 class Name;
18 class Face;
19 
21 {
22 public:
23  typedef function<void()> SuccessCallback;
24  typedef function<void(const std::string&)> FailCallback;
25 
26  virtual
28  {
29  }
30 
31  virtual void
32  selfRegisterPrefix(const Name& prefixToRegister,
33  const SuccessCallback& onSuccess,
34  const FailCallback& onFail) = 0;
35 
36  virtual void
37  selfDeregisterPrefix(const Name& prefixToRegister,
38  const SuccessCallback& onSuccess,
39  const FailCallback& onFail) = 0;
40 };
41 
42 } // namespace ndn
43 
44 #endif // NDN_MANAGEMENT_CONTROLLER_HPP
virtual void selfRegisterPrefix(const Name &prefixToRegister, const SuccessCallback &onSuccess, const FailCallback &onFail)=0
function< void()> SuccessCallback
Definition: controller.hpp:23
virtual ~Controller()
Definition: controller.hpp:27
function< void(const std::string &)> FailCallback
Definition: controller.hpp:24
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:26
virtual void selfDeregisterPrefix(const Name &prefixToRegister, const SuccessCallback &onSuccess, const FailCallback &onFail)=0