blob: f9194894d3a37993376b1b3a791283205b9ded4c [file] [log] [blame]
Alexander Afanasyeve289b532014-02-09 22:14:44 -08001/* -*- 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
15namespace ndn {
16
17class Node;
18
19class Controller
20{
21public:
22 typedef function<void()> SuccessCallback;
23 typedef function<void(const std::string&)> FailCallback;
24
25 virtual
26 ~Controller()
27 {
28 }
29
30 virtual void
31 selfRegisterPrefix(const Name& prefixToRegister,
32 const SuccessCallback& onSuccess,
33 const FailCallback& onFail) = 0;
34
35 virtual void
36 selfDeregisterPrefix(const Name& prefixToRegister,
37 const SuccessCallback& onSuccess,
38 const FailCallback& onFail) = 0;
39};
40
41} // namespace ndn
42
43#endif // NDN_MANAGEMENT_CONTROLLER_HPP