blob: 5c32b3b2c1358b8e5bfd4af6dddea487d90ab9b3 [file] [log] [blame]
Alexander Afanasyeve289b532014-02-09 22:14:44 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
Alexander Afanasyevdfa52c42014-04-24 21:10:11 -07003 * 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 Afanasyeve289b532014-02-09 22:14:44 -080011 */
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
21namespace ndn {
22
Alexander Afanasyev0222fba2014-02-09 23:16:02 -080023class Name;
24class Face;
Yingdi Yue66bf2a2014-04-28 17:07:36 -070025class IdentityCertificate;
Alexander Afanasyeve289b532014-02-09 22:14:44 -080026
27class Controller
28{
29public:
30 typedef function<void()> SuccessCallback;
31 typedef function<void(const std::string&)> FailCallback;
32
33 virtual
34 ~Controller()
35 {
36 }
Alexander Afanasyevdfa52c42014-04-24 21:10:11 -070037
Alexander Afanasyeve289b532014-02-09 22:14:44 -080038 virtual void
39 selfRegisterPrefix(const Name& prefixToRegister,
40 const SuccessCallback& onSuccess,
41 const FailCallback& onFail) = 0;
42
43 virtual void
Yingdi Yue66bf2a2014-04-28 17:07:36 -070044 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 Afanasyeve289b532014-02-09 22:14:44 -080056 selfDeregisterPrefix(const Name& prefixToRegister,
57 const SuccessCallback& onSuccess,
58 const FailCallback& onFail) = 0;
Yingdi Yue66bf2a2014-04-28 17:07:36 -070059
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 Afanasyeve289b532014-02-09 22:14:44 -080071};
72
73} // namespace ndn
74
75#endif // NDN_MANAGEMENT_CONTROLLER_HPP