mastorss/src/mastorss.hpp

44 lines
1.3 KiB
C++
Raw Normal View History

2019-04-21 03:38:15 +02:00
/* This file is part of mastorss.
* Copyright © 2018, 2019 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/>.
*/
2018-02-10 12:35:06 +01:00
#ifndef mastorss_HPP
#define mastorss_HPP
2018-01-26 02:33:58 +01:00
#include <cstdint>
#include <string>
#include <vector>
2018-04-14 13:57:03 +02:00
#include <jsoncpp/json/json.h>
#include <mastodon-cpp/easy/easy.hpp>
2018-01-26 02:33:58 +01:00
using std::string;
2018-02-18 14:27:01 +01:00
extern std::uint16_t max_size;
extern const string filepath;
2018-04-14 13:57:03 +02:00
extern Json::Value config;
2018-03-15 13:20:26 +01:00
extern std::string profile;
2018-02-18 14:27:01 +01:00
2018-03-15 13:20:26 +01:00
std::uint16_t read_config(string &instance, string &access_token, string &feedurl);
2019-04-21 03:38:15 +02:00
bool write_config();
2018-02-22 02:51:58 +01:00
std::vector<Mastodon::Easy::Status> parse_feed(const string &xml);
2018-03-11 15:40:25 +01:00
void individual_fixes(string &str);
2018-01-26 02:33:58 +01:00
2019-04-21 03:38:15 +02:00
std::uint16_t http_get(const string &feedurl,
2018-01-26 02:33:58 +01:00
string &answer, const string &useragent = "");
void curlpp_init();
2018-01-26 02:33:58 +01:00
2018-02-10 12:35:06 +01:00
#endif // mastorss_HPP