summaryrefslogtreecommitdiff
path: root/src/discord/voiceclient.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/discord/voiceclient.hpp')
-rw-r--r--src/discord/voiceclient.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/discord/voiceclient.hpp b/src/discord/voiceclient.hpp
index c052f28..1dc6e1a 100644
--- a/src/discord/voiceclient.hpp
+++ b/src/discord/voiceclient.hpp
@@ -1,14 +1,17 @@
#pragma once
#ifdef WITH_VOICE
- // clang-format off
+// clang-format off
+
#include "snowflake.hpp"
#include "waiter.hpp"
#include "websocket.hpp"
+#include <optional>
#include <mutex>
#include <queue>
#include <string>
#include <glibmm/dispatcher.h>
#include <sigc++/sigc++.h>
+#include <unordered_map>
// clang-format on
enum class VoiceGatewayCloseCode : uint16_t {
@@ -190,6 +193,8 @@ public:
void SetServerID(Snowflake id);
void SetUserID(Snowflake id);
+ [[nodiscard]] std::optional<uint32_t> GetSSRCOfUser(Snowflake id) const;
+
[[nodiscard]] bool IsConnected() const noexcept;
private:
@@ -218,6 +223,8 @@ private:
uint16_t m_port;
uint32_t m_ssrc;
+ std::unordered_map<Snowflake, uint32_t> m_ssrc_map;
+
std::array<uint8_t, 32> m_secret_key;
Websocket m_ws;