SNode.C
Loading...
Searching...
No Matches
RequestCommand.h
Go to the documentation of this file.
1/*
2 * snode.c - a slim toolkit for network communication
3 * Copyright (C) 2020, 2021, 2022, 2023 Volker Christian <me@vchrist.at>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef WEB_HTTP_CLIENT_REQUESTCOMMAND_H
20#define WEB_HTTP_CLIENT_REQUESTCOMMAND_H
21
22namespace web::http::client {
23 class Request; // IWYU pragma: export
24}
25
26#ifndef DOXYGEN_SHOULD_SKIP_THIS
27
28#endif // DOXYGEN_SHOULD_SKIP_THIS
29
30namespace web::http::client {
31
33 public:
34 RequestCommand() = default;
36 RequestCommand(RequestCommand&&) noexcept = delete;
37
39 RequestCommand& operator=(RequestCommand&&) noexcept = delete;
40
41 virtual ~RequestCommand();
42
43 virtual bool execute(Request* request) = 0;
44
45 bool getError() const;
46
47 protected:
48 bool error = false;
49 };
50
51} // namespace web::http::client
52
53#endif // WEB_HTTP_CLIENT_REQUESTCOMMAND_H
RequestCommand & operator=(const RequestCommand &)=delete
virtual bool execute(Request *request)=0
RequestCommand & operator=(RequestCommand &&) noexcept=delete
RequestCommand(const RequestCommand &)=delete
RequestCommand(RequestCommand &&) noexcept=delete
bool execute(Request *request) override