25 lines
664 B
C++
25 lines
664 B
C++
#pragma once
|
|
|
|
#include "config.h"
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace posts {
|
|
enum PostSource {
|
|
SRC_VK, SRC_TELEGRAM
|
|
};
|
|
|
|
struct AbstractPost {
|
|
inline AbstractPost(PostSource src, long id, long date, std::string text) : source(src), id(id), date(date), text(text) {}
|
|
long id;
|
|
long date;
|
|
std::string text;
|
|
PostSource source;
|
|
};
|
|
|
|
bool filter_and_transform(AbstractPost &post);
|
|
|
|
std::string_view add_signature(AbstractPost &post, config::AppConfig *cfg);
|
|
std::string_view add_vk_signature(std::string &text, config::AppConfig *cfg);
|
|
std::string_view add_tg_signature(std::string &text, config::AppConfig *cfg);
|
|
} |