libravatarserv/src/types.hpp

40 lines
1.1 KiB
C++

/* 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>
#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;
std::string magick;
};
} // namespace libravatarserv
#endif // LIBRAVATARSERV_TYPES_HPP