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>
|
2018-08-25 14:23:58 +02:00
|
|
|
#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);
|
2018-04-14 13:57:03 +02:00
|
|
|
const bool write_config();
|
2018-02-22 02:51:58 +01:00
|
|
|
|
2018-09-20 05:06:10 +02: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
|
|
|
|
2018-02-10 10:01:17 +01:00
|
|
|
const std::uint16_t http_get(const string &feedurl,
|
2018-01-26 02:33:58 +01:00
|
|
|
string &answer, const string &useragent = "");
|
2018-02-10 12:58:21 +01:00
|
|
|
void curlpp_init();
|
2018-01-26 02:33:58 +01:00
|
|
|
|
2018-02-10 12:35:06 +01:00
|
|
|
#endif // mastorss_HPP
|