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; |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame^] | 25 | class IdentityCertificate; |
Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame] | 26 | |
| 27 | class Controller |
| 28 | { |
| 29 | public: |
| 30 | typedef function<void()> SuccessCallback; |
| 31 | typedef function<void(const std::string&)> FailCallback; |
| 32 | |
| 33 | virtual |
| 34 | ~Controller() |
| 35 | { |
| 36 | } |
Alexander Afanasyev | dfa52c4 | 2014-04-24 21:10:11 -0700 | [diff] [blame] | 37 | |
Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame] | 38 | virtual void |
| 39 | selfRegisterPrefix(const Name& prefixToRegister, |
| 40 | const SuccessCallback& onSuccess, |
| 41 | const FailCallback& onFail) = 0; |
| 42 | |
| 43 | virtual void |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame^] | 44 | selfRegisterPrefix(const Name& prefixToRegister, |
| 45 | const SuccessCallback& onSuccess, |
| 46 | const FailCallback& onFail, |
| 47 | const IdentityCertificate& certificate) = 0; |
| 48 | |
| 49 | virtual void |
| 50 | selfRegisterPrefix(const Name& prefixToRegister, |
| 51 | const SuccessCallback& onSuccess, |
| 52 | const FailCallback& onFail, |
| 53 | const Name& identity) = 0; |
| 54 | |
| 55 | virtual void |
Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame] | 56 | selfDeregisterPrefix(const Name& prefixToRegister, |
| 57 | const SuccessCallback& onSuccess, |
| 58 | const FailCallback& onFail) = 0; |
Yingdi Yu | e66bf2a | 2014-04-28 17:07:36 -0700 | [diff] [blame^] | 59 | |
| 60 | virtual void |
| 61 | selfDeregisterPrefix(const Name& prefixToRegister, |
| 62 | const SuccessCallback& onSuccess, |
| 63 | const FailCallback& onFail, |
| 64 | const IdentityCertificate& certificate) = 0; |
| 65 | |
| 66 | virtual void |
| 67 | selfDeregisterPrefix(const Name& prefixToRegister, |
| 68 | const SuccessCallback& onSuccess, |
| 69 | const FailCallback& onFail, |
| 70 | const Name& identity) = 0; |
Alexander Afanasyev | e289b53 | 2014-02-09 22:14:44 -0800 | [diff] [blame] | 71 | }; |
| 72 | |
| 73 | } // namespace ndn |
| 74 | |
| 75 | #endif // NDN_MANAGEMENT_CONTROLLER_HPP |