2021-01-14 00:25:59 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class UserData;
|
|
|
|
|
|
|
|
namespace Calls::Group {
|
|
|
|
|
|
|
|
constexpr auto kDefaultVolume = 10000;
|
|
|
|
constexpr auto kMaxVolume = 20000;
|
|
|
|
|
|
|
|
struct MuteRequest {
|
2021-03-03 15:29:33 +00:00
|
|
|
not_null<PeerData*> peer;
|
2021-01-14 00:25:59 +00:00
|
|
|
bool mute = false;
|
2021-01-15 11:22:12 +00:00
|
|
|
bool locallyOnly = false;
|
2021-01-14 00:25:59 +00:00
|
|
|
};
|
2021-02-09 08:58:19 +00:00
|
|
|
|
2021-01-14 00:25:59 +00:00
|
|
|
struct VolumeRequest {
|
2021-03-03 15:29:33 +00:00
|
|
|
not_null<PeerData*> peer;
|
2021-01-14 00:25:59 +00:00
|
|
|
int volume = kDefaultVolume;
|
|
|
|
bool finalized = true;
|
2021-01-15 11:22:12 +00:00
|
|
|
bool locallyOnly = false;
|
2021-01-14 00:25:59 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 16:05:34 +00:00
|
|
|
struct ParticipantState {
|
2021-03-03 15:29:33 +00:00
|
|
|
not_null<PeerData*> peer;
|
2021-01-15 16:05:34 +00:00
|
|
|
std::optional<int> volume;
|
|
|
|
bool mutedByMe = false;
|
|
|
|
bool locallyOnly = false;
|
|
|
|
};
|
|
|
|
|
2021-03-05 15:21:11 +00:00
|
|
|
struct RejoinEvent {
|
|
|
|
not_null<PeerData*> wasJoinAs;
|
|
|
|
not_null<PeerData*> nowJoinAs;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct JoinInfo {
|
|
|
|
not_null<PeerData*> peer;
|
|
|
|
not_null<PeerData*> joinAs;
|
|
|
|
std::vector<not_null<PeerData*>> possibleJoinAs;
|
2021-03-10 20:03:20 +00:00
|
|
|
QString joinHash;
|
2021-03-05 15:21:11 +00:00
|
|
|
};
|
|
|
|
|
2021-01-14 00:25:59 +00:00
|
|
|
} // namespace Calls::Group
|