Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /** |
Alexander Afanasyev | dfa52c4 | 2014-04-24 21:10:11 -0700 | [diff] [blame] | 3 | * Copyright (c) 2013-2014, Regents of the University of California. |
| 4 | * All rights reserved. |
| 5 | * |
| 6 | * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions). |
| 7 | * See AUTHORS.md for complete list of ndn-cxx authors and contributors. |
| 8 | * |
| 9 | * This file licensed under New BSD License. See COPYING for detailed information about |
| 10 | * ndn-cxx library copyright, permissions, and redistribution restrictions. |
Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #ifndef NDN_MANAGEMENT_CONTROLLER_HPP |
| 14 | #define NDN_MANAGEMENT_CONTROLLER_HPP |
| 15 | |
| 16 | #include "../common.hpp" |
| 17 | #include "../name.hpp" |
| 18 | #include "../interest.hpp" |
| 19 | #include "../data.hpp" |
| 20 | |
| 21 | namespace ndn { |
| 22 | |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 23 | class Name; |
| 24 | class Face; |
Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame] | 25 | |
| 26 | class Controller |
| 27 | { |
| 28 | public: |
| 29 | typedef function<void()> SuccessCallback; |
| 30 | typedef function<void(const std::string&)> FailCallback; |
| 31 | |
| 32 | virtual |
| 33 | ~Controller() |
| 34 | { |
| 35 | } |
Alexander Afanasyev | dfa52c4 | 2014-04-24 21:10:11 -0700 | [diff] [blame] | 36 | |
Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame] | 37 | virtual void |
| 38 | selfRegisterPrefix(const Name& prefixToRegister, |
| 39 | const SuccessCallback& onSuccess, |
| 40 | const FailCallback& onFail) = 0; |
| 41 | |
| 42 | virtual void |
| 43 | selfDeregisterPrefix(const Name& prefixToRegister, |
| 44 | const SuccessCallback& onSuccess, |
| 45 | const FailCallback& onFail) = 0; |
| 46 | }; |
| 47 | |
| 48 | } // namespace ndn |
| 49 | |
| 50 | #endif // NDN_MANAGEMENT_CONTROLLER_HPP |