blob: 8ae508e89125604056986ff6516bd946cb7340e9 [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;
Alexander Afanasyeve289b532014-02-09 22:14:44 -080025
26class Controller
27{
28public:
29 typedef function<void()> SuccessCallback;
30 typedef function<void(const std::string&)> FailCallback;
31
32 virtual
33 ~Controller()
34 {
35 }
Alexander Afanasyevdfa52c42014-04-24 21:10:11 -070036
Alexander Afanasyeve289b532014-02-09 22:14:44 -080037 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