blob: 370364bd1c2e8994d7240b583358b2189caed200 [file] [log] [blame]
Yanbiao Li6704a4a2015-08-19 16:30:16 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Davide Pesavento78ddcab2019-02-28 22:00:03 -05002/*
3 * Copyright (c) 2014-2019, Regents of the University of California,
Yanbiao Li6704a4a2015-08-19 16:30:16 -07004 * Arizona Board of Regents,
5 * Colorado State University,
6 * University Pierre & Marie Curie, Sorbonne University,
7 * Washington University in St. Louis,
8 * Beijing Institute of Technology,
9 * The University of Memphis.
10 *
11 * This file is part of NFD (Named Data Networking Forwarding Daemon).
12 * See AUTHORS.md for complete list of NFD authors and contributors.
13 *
14 * NFD is free software: you can redistribute it and/or modify it under the terms
15 * of the GNU General Public License as published by the Free Software Foundation,
16 * either version 3 of the License, or (at your option) any later version.
17 *
18 * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
19 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20 * PURPOSE. See the GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License along with
23 * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26#ifndef NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
27#define NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
28
Davide Pesavento78ddcab2019-02-28 22:00:03 -050029#include "manager-base.hpp"
Yanbiao Li6704a4a2015-08-19 16:30:16 -070030
31namespace nfd {
32
Junxiao Shiff10da62016-07-13 17:57:43 +000033namespace strategy_choice {
Yanbiao Li6704a4a2015-08-19 16:30:16 -070034class StrategyChoice;
Junxiao Shiff10da62016-07-13 17:57:43 +000035} // namespace strategy_choice
Yanbiao Li6704a4a2015-08-19 16:30:16 -070036
37/**
Davide Pesavento78ddcab2019-02-28 22:00:03 -050038 * @brief Implements the Strategy Choice Management of NFD Management Protocol.
39 * @sa https://redmine.named-data.net/projects/nfd/wiki/StrategyChoice
Yanbiao Li6704a4a2015-08-19 16:30:16 -070040 */
Davide Pesavento78ddcab2019-02-28 22:00:03 -050041class StrategyChoiceManager : public ManagerBase
Yanbiao Li6704a4a2015-08-19 16:30:16 -070042{
43public:
Junxiao Shiff10da62016-07-13 17:57:43 +000044 StrategyChoiceManager(strategy_choice::StrategyChoice& table,
Davide Pesavento78ddcab2019-02-28 22:00:03 -050045 Dispatcher& dispatcher, CommandAuthenticator& authenticator);
Yanbiao Li6704a4a2015-08-19 16:30:16 -070046
47private:
48 void
Junxiao Shi65800d22016-12-25 21:05:45 +000049 setStrategy(ControlParameters parameters,
Yanbiao Li6704a4a2015-08-19 16:30:16 -070050 const ndn::mgmt::CommandContinuation& done);
51
52 void
Junxiao Shi65800d22016-12-25 21:05:45 +000053 unsetStrategy(ControlParameters parameters,
Yanbiao Li6704a4a2015-08-19 16:30:16 -070054 const ndn::mgmt::CommandContinuation& done);
55
56 void
Junxiao Shi65800d22016-12-25 21:05:45 +000057 listChoices(ndn::mgmt::StatusDatasetContext& context);
Yanbiao Li6704a4a2015-08-19 16:30:16 -070058
59private:
Junxiao Shiff10da62016-07-13 17:57:43 +000060 strategy_choice::StrategyChoice& m_table;
Yanbiao Li6704a4a2015-08-19 16:30:16 -070061};
62
63} // namespace nfd
64
65#endif // NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP