libaria2cpp 0.2.0
Basic CPP library to connect to an ARIA2 daemon via the RPC interface.
func.h
1/*
2 * aria2cpp: Basic CPP library to connect to an ARIA2 daemon
3 * via the RPC interface.
4 *
5 * *ALPHA VERSION!*
6 *
7 * Copyright (C) 2021 Dennis Katsonis dennisk@netspace.net.au
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 *
22 */
23
24#include <inttypes.h>
25#include <memory>
26
31bool StringToBool(std::string b);
35const char * const BoolToString(bool b);
39const char *humanSize(uint64_t bytes);
44const char *percent(const uint64_t numerator, const uint64_t denominator);
48std::string loadFileBase64(const char *filename);
53std::string secondsToTime(const int time);