2022-06-11 03:37:09 +02:00
|
|
|
/* This file is part of libravatarserv.
|
|
|
|
* Copyright © 2022 tastytea <tastytea@tastytea.de>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, version 3.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LIBRAVATARSERV_TYPES_HPP
|
|
|
|
#define LIBRAVATARSERV_TYPES_HPP
|
|
|
|
|
|
|
|
#include <cstdint>
|
2022-06-11 06:40:00 +02:00
|
|
|
#include <optional>
|
2022-06-11 03:37:09 +02:00
|
|
|
#include <string>
|
|
|
|
namespace libravatarserv {
|
|
|
|
|
|
|
|
enum class algorithm_t {
|
|
|
|
SHA256,
|
|
|
|
MD5
|
|
|
|
};
|
|
|
|
|
|
|
|
struct request_t {
|
|
|
|
std::string hash;
|
|
|
|
algorithm_t algo;
|
|
|
|
std::int16_t size;
|
|
|
|
std::string fallback;
|
2022-06-11 06:40:00 +02:00
|
|
|
std::optional<std::string> magick;
|
2022-06-11 03:37:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace libravatarserv
|
|
|
|
|
|
|
|
#endif // LIBRAVATARSERV_TYPES_HPP
|