blob: 658e4c172d6aa7b90629bbf3d31fed8515f0b4ae [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/*
Davide Pesavento45c1f6a2025-01-01 19:30:30 -05003 * Copyright (c) 2014-2025, 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 Pesavento3db98072021-03-09 23:03:27 -050041class StrategyChoiceManager final : 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
Davide Pesavento45c1f6a2025-01-01 19:30:30 -050049 setStrategy(ControlParameters parameters, const CommandContinuation& done);
Yanbiao Li6704a4a2015-08-19 16:30:16 -070050
51 void
Davide Pesavento45c1f6a2025-01-01 19:30:30 -050052 unsetStrategy(ControlParameters parameters, const CommandContinuation& done);
Yanbiao Li6704a4a2015-08-19 16:30:16 -070053
54 void
Junxiao Shi65800d22016-12-25 21:05:45 +000055 listChoices(ndn::mgmt::StatusDatasetContext& context);
Yanbiao Li6704a4a2015-08-19 16:30:16 -070056
57private:
Junxiao Shiff10da62016-07-13 17:57:43 +000058 strategy_choice::StrategyChoice& m_table;
Yanbiao Li6704a4a2015-08-19 16:30:16 -070059};
60
61} // namespace nfd
62
63#endif // NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP