Teaspeak-Server/server/src/services/VirtualServerBroadcastServi...

31 lines
1.1 KiB
C++

#pragma once
#include <memory>
#include <deque>
#include <Properties.h>
namespace ts::server {
class ConnectedClient;
}
namespace ts::server::vserver {
class VirtualServerBase;
class BroadcastService {
public:
explicit BroadcastService(VirtualServerBase*);
bool client_updated(const std::shared_ptr<ConnectedClient>& /* client */,
const std::deque<std::shared_ptr<property::PropertyDescription>>& /* keys */, bool /* notify_client */ = true);
inline bool client_updated(const std::shared_ptr<ConnectedClient>& client, const std::deque<property::ClientProperties>& keys, bool notify_client = true) {
if(keys.empty()) return false;
std::deque<std::shared_ptr<property::PropertyDescription>> _keys{};
for(const auto& key : keys) _keys.push_back(property::impl::info<property::ClientProperties>(key));
return this->client_updated(client, _keys, notify_client);
};
private:
VirtualServerBase* virtual_server_;
};
}