Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame^] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2013 Regents of the University of California. |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 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 Node; |
| 18 | |
| 19 | class Controller |
| 20 | { |
| 21 | public: |
| 22 | typedef function<void()> SuccessCallback; |
| 23 | typedef function<void(const std::string&)> FailCallback; |
| 24 | |
| 25 | virtual |
| 26 | ~Controller() |
| 27 | { |
| 28 | } |
| 29 | |
| 30 | virtual void |
| 31 | selfRegisterPrefix(const Name& prefixToRegister, |
| 32 | const SuccessCallback& onSuccess, |
| 33 | const FailCallback& onFail) = 0; |
| 34 | |
| 35 | virtual void |
| 36 | selfDeregisterPrefix(const Name& prefixToRegister, |
| 37 | const SuccessCallback& onSuccess, |
| 38 | const FailCallback& onFail) = 0; |
| 39 | }; |
| 40 | |
| 41 | } // namespace ndn |
| 42 | |
| 43 | #endif // NDN_MANAGEMENT_CONTROLLER_HPP |