1
0
forked from blue/pica
pica/handler/poll.h
2023-12-28 17:26:08 -03:00

32 lines
597 B
C++

// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include "handler.h"
#include "request/request.h"
#include "response/response.h"
class Server;
namespace Handler {
class Poll : public Handler {
public:
Poll(Server* server);
void handle(Request& request) override;
enum class Result {
success,
tokenProblem,
replace,
timeout,
unknownError
};
void error(Request& request, Result result, Response::Status status) const;
private:
Server* server;
};
}