Format and .clang-format
This commit is contained in:
1 parent
6aed7b0027
commit
b94b634a87
47 files changed
+42341
-39711
No files matched your search
@@ -1,79 +1,85 @@
|
||||
#pragma once
|
||||
#include <glaze/core/common.hpp>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <teamspeak/public_definitions.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <glaze/core/common.hpp>
|
||||
|
||||
namespace definitions {
|
||||
namespace definitions
|
||||
{
|
||||
|
||||
struct StreamInfo {
|
||||
std::string url;
|
||||
int itag = 0;
|
||||
std::string mimeType;
|
||||
int bitrate = 0;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
};
|
||||
|
||||
struct StreamInfo {
|
||||
std::string url;
|
||||
int itag = 0;
|
||||
std::string mimeType;
|
||||
int bitrate = 0;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
};
|
||||
struct Streams {
|
||||
StreamInfo audio;
|
||||
StreamInfo video;
|
||||
};
|
||||
|
||||
struct Streams {
|
||||
StreamInfo audio;
|
||||
StreamInfo video;
|
||||
};
|
||||
struct QueueItem {
|
||||
std::string name;
|
||||
std::string videoId;
|
||||
std::string shortUrl;
|
||||
std::string length;
|
||||
std::string requester;
|
||||
std::optional<Streams> streams;
|
||||
|
||||
struct QueueItem {
|
||||
std::string name;
|
||||
std::string videoId;
|
||||
std::string shortUrl;
|
||||
std::string length;
|
||||
std::string requester;
|
||||
std::optional<Streams> streams;
|
||||
QueueItem() = default;
|
||||
|
||||
QueueItem() = default;
|
||||
QueueItem(std::string name, std::string videoId,
|
||||
std::string shortUrl, std::string length,
|
||||
std::string requested_by,
|
||||
const std::optional<Streams> &streams)
|
||||
: name{std::move(name)}, videoId(std::move(videoId)),
|
||||
shortUrl(std::move(shortUrl)), length(std::move(length)),
|
||||
requester{std::move(requested_by)}, streams{streams}
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
QueueItem(std::string name, std::string videoId,std::string shortUrl,std::string length, std::string requested_by, const std::optional<Streams> & streams)
|
||||
: name{std::move(name)}, videoId(std::move(videoId)),shortUrl(std::move(shortUrl)), length(std::move(length)), requester{std::move(requested_by)}, streams{streams} {}
|
||||
};
|
||||
struct SearchResultItem {
|
||||
std::string name;
|
||||
std::string length;
|
||||
std::string thumbnail;
|
||||
std::string viewCount;
|
||||
std::string url;
|
||||
std::string shortUrl;
|
||||
std::string videoId;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct SearchResultItem {
|
||||
std::string name;
|
||||
std::string length;
|
||||
std::string thumbnail;
|
||||
std::string viewCount;
|
||||
std::string url;
|
||||
std::string shortUrl;
|
||||
std::string videoId;
|
||||
};
|
||||
|
||||
struct PluginState {
|
||||
std::vector<QueueItem> queue;
|
||||
std::vector<anyID> onlineSubscribers;
|
||||
std::vector<anyID> offlineSubscribers;
|
||||
std::uint64_t serverConnection;
|
||||
bool wasPlaying = false;
|
||||
};
|
||||
}
|
||||
struct PluginState {
|
||||
std::vector<QueueItem> queue;
|
||||
std::vector<anyID> onlineSubscribers;
|
||||
std::vector<anyID> offlineSubscribers;
|
||||
std::uint64_t serverConnection;
|
||||
bool wasPlaying = false;
|
||||
};
|
||||
} // namespace definitions
|
||||
|
||||
template <> struct glz::meta<definitions::StreamInfo> {
|
||||
using T = definitions::StreamInfo;
|
||||
static constexpr auto value =
|
||||
object("url", &T::url, "itag", &T::itag, "mimeType", &T::mimeType,
|
||||
"bitrate", &T::bitrate, "width", &T::width, "height", &T::height);
|
||||
using T = definitions::StreamInfo;
|
||||
static constexpr auto value = object(
|
||||
"url", &T::url, "itag", &T::itag, "mimeType", &T::mimeType,
|
||||
"bitrate", &T::bitrate, "width", &T::width, "height", &T::height);
|
||||
};
|
||||
|
||||
template <> struct glz::meta<definitions::Streams> {
|
||||
using T = definitions::Streams;
|
||||
static constexpr auto value =
|
||||
object("audio", &T::audio, "video", &T::video);
|
||||
using T = definitions::Streams;
|
||||
static constexpr auto value =
|
||||
object("audio", &T::audio, "video", &T::video);
|
||||
};
|
||||
|
||||
template <> struct glz::meta<definitions::QueueItem> {
|
||||
using T = definitions::QueueItem;
|
||||
static constexpr auto value =
|
||||
object("name", &T::name, "videoId", &T::videoId, "shortUrl", &T::shortUrl, "length", &T::length, "requester", &T::requester,
|
||||
"streams", &T::streams);
|
||||
};
|
||||
using T = definitions::QueueItem;
|
||||
static constexpr auto value =
|
||||
object("name", &T::name, "videoId", &T::videoId, "shortUrl",
|
||||
&T::shortUrl, "length", &T::length, "requester",
|
||||
&T::requester, "streams", &T::streams);
|
||||
};
|
||||
Reference in new issue
Block a user