diff options
Diffstat (limited to 'src/abaddon.hpp')
-rw-r--r-- | src/abaddon.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/abaddon.hpp b/src/abaddon.hpp index 2fbbcc0..12f942a 100644 --- a/src/abaddon.hpp +++ b/src/abaddon.hpp @@ -15,6 +15,8 @@ #define APP_TITLE "Abaddon" +class AudioManager; + class Abaddon { private: Abaddon(); @@ -55,6 +57,11 @@ public: void ActionViewPins(Snowflake channel_id); void ActionViewThreads(Snowflake channel_id); +#ifdef WITH_VOICE + void ActionJoinVoiceChannel(Snowflake channel_id); + void ActionDisconnectVoice(); +#endif + std::optional<Glib::ustring> ShowTextPrompt(const Glib::ustring &prompt, const Glib::ustring &title, const Glib::ustring &placeholder = "", Gtk::Window *window = nullptr); bool ShowConfirm(const Glib::ustring &prompt, Gtk::Window *window = nullptr); @@ -63,6 +70,10 @@ public: ImageManager &GetImageManager(); EmojiResource &GetEmojis(); +#ifdef WITH_VOICE + AudioManager &GetAudio(); +#endif + std::string GetDiscordToken() const; bool IsDiscordActive() const; @@ -81,6 +92,13 @@ public: void DiscordOnDisconnect(bool is_reconnecting, GatewayCloseCode close_code); void DiscordOnThreadUpdate(const ThreadUpdateData &data); +#ifdef WITH_VOICE + void OnVoiceConnected(); + void OnVoiceDisconnected(); + + void ShowVoiceWindow(); +#endif + SettingsManager::Settings &GetSettings(); Glib::RefPtr<Gtk::CssProvider> GetStyleProvider(); @@ -151,6 +169,11 @@ private: ImageManager m_img_mgr; EmojiResource m_emojis; +#ifdef WITH_VOICE + std::unique_ptr<AudioManager> m_audio; + Gtk::Window *m_voice_window = nullptr; +#endif + mutable std::mutex m_mutex; Glib::RefPtr<Gtk::Application> m_gtk_app; Glib::RefPtr<Gtk::CssProvider> m_css_provider; |