/* * This file is part of corelibs. (https://git.redxen.eu/corelibs) * Copyright (c) 2021 Alex-David Denes * * corelibs 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, either version 3 of the License, or * any later version. * * corelibs 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 corelibs. If not, see . */ #include "types/error/error.h" #include // bool #include // size_t #include // uintmax_t #ifndef CORELIBS_GUARD_BASEVEN #define CORELIBS_GUARD_BASEVEN typedef struct cl_baseven_t cl_baseven_t; struct corelibs_baseven_interface { cl_error_t (*const encode) (const uint8_t *src, size_t len, uint8_t *dest, size_t cap), (*const decode) (const uint8_t *src, size_t len, uint8_t *dest, size_t cap); const struct { uintmax_t (*const decoded) (uintmax_t enc_size), (*const encoded) (uintmax_t dec_size); } size; }; extern const struct corelibs_baseven_interface cl_baseven; #endif /* CORELIBS_GUARD_BASEVEN */