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 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 17 | class Name; |
| 18 | class Face; |
Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame] | 19 | |
| 20 | class Controller |
| 21 | { |
| 22 | public: |
| 23 | typedef function<void()> SuccessCallback; |
| 24 | typedef function<void(const std::string&)> FailCallback; |
| 25 | |
| 26 | virtual |
| 27 | ~Controller() |
| 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 |