diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-02 01:25:33 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-02 01:25:33 -0400 |
commit | 0a049856782397a7464d03c317ce3788559cdeda (patch) | |
tree | 9412d17c0ab9335d591d7b4590043b9cc4e3cc45 /src/discord/discord.hpp | |
parent | 9c8d9e54fe96f97bdda2be26bab571e4cbf0c597 (diff) | |
download | abaddon-portaudio-0a049856782397a7464d03c317ce3788559cdeda.tar.gz abaddon-portaudio-0a049856782397a7464d03c317ce3788559cdeda.zip |
make compile work if voice support is disabled
Diffstat (limited to 'src/discord/discord.hpp')
-rw-r--r-- | src/discord/discord.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/discord/discord.hpp b/src/discord/discord.hpp index a6eabd9..907c3e6 100644 --- a/src/discord/discord.hpp +++ b/src/discord/discord.hpp @@ -181,7 +181,9 @@ public: void GetVerificationGateInfo(Snowflake guild_id, const sigc::slot<void(std::optional<VerificationGateInfoObject>)> &callback); void AcceptVerificationGate(Snowflake guild_id, VerificationGateInfoObject info, const sigc::slot<void(DiscordError code)> &callback); +#ifdef WITH_VOICE void ConnectToVoice(Snowflake channel_id); +#endif void SetReferringChannel(Snowflake id); @@ -262,11 +264,15 @@ private: void HandleGatewayMessageAck(const GatewayMessage &msg); void HandleGatewayUserGuildSettingsUpdate(const GatewayMessage &msg); void HandleGatewayGuildMembersChunk(const GatewayMessage &msg); - void HandleGatewayVoiceStateUpdate(const GatewayMessage &msg); - void HandleGatewayVoiceServerUpdate(const GatewayMessage &msg); void HandleGatewayReadySupplemental(const GatewayMessage &msg); void HandleGatewayReconnect(const GatewayMessage &msg); void HandleGatewayInvalidSession(const GatewayMessage &msg); + +#ifdef WITH_VOICE + void HandleGatewayVoiceStateUpdate(const GatewayMessage &msg); + void HandleGatewayVoiceServerUpdate(const GatewayMessage &msg); +#endif + void HeartbeatThread(); void SendIdentify(); void SendResume(); @@ -326,7 +332,9 @@ private: bool m_wants_resume = false; // reconnecting specifically to resume std::string m_session_id; +#ifdef WITH_VOICE DiscordVoiceClient m_voice; +#endif mutable std::mutex m_msg_mutex; Glib::Dispatcher m_msg_dispatch; |