abaddon/abaddon.hpp

41 lines
975 B
C++
Raw Normal View History

2020-08-17 06:40:03 +00:00
#include <gtkmm.h>
2020-08-19 05:07:55 +00:00
#include <memory>
#include <mutex>
2020-08-19 05:07:55 +00:00
#include <string>
2020-08-17 06:40:03 +00:00
#include "discord/discord.hpp"
2020-08-19 05:07:55 +00:00
#include "windows/mainwindow.hpp"
#include "settings.hpp"
2020-08-17 06:40:03 +00:00
class Abaddon {
public:
2020-08-19 05:07:55 +00:00
Abaddon();
~Abaddon();
int StartGTK();
void StartDiscord();
void StopDiscord();
void LoadFromSettings();
2020-08-17 06:40:03 +00:00
void ActionConnect();
2020-08-19 05:07:55 +00:00
void ActionDisconnect();
void ActionSetToken();
void ActionMoveGuildUp(Snowflake id);
void ActionMoveGuildDown(Snowflake id);
2020-08-19 05:07:55 +00:00
std::string GetDiscordToken() const;
bool IsDiscordActive() const;
2020-08-17 06:40:03 +00:00
const DiscordClient &GetDiscordClient() const;
void DiscordNotifyReady();
void DiscordNotifyChannelListFullRefresh();
2020-08-17 06:40:03 +00:00
private:
2020-08-19 05:07:55 +00:00
std::string m_discord_token;
mutable std::mutex m_mutex;
2020-08-17 06:40:03 +00:00
Glib::RefPtr<Gtk::Application> m_gtk_app;
DiscordClient m_discord;
2020-08-19 05:07:55 +00:00
SettingsManager m_settings;
std::unique_ptr<MainWindow> m_main_window; // wah wah cant create a gtkstylecontext fuck you
};