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