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
|
|
|
|
|
2021-07-27 18:09:13 +00:00
|
|
|
#include "base/object_ptr.h"
|
|
|
|
|
2021-01-14 00:25:59 +00:00
|
|
|
class UserData;
|
|
|
|
|
2021-07-27 18:09:13 +00:00
|
|
|
namespace Ui {
|
|
|
|
class GenericBox;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2021-01-14 00:25:59 +00:00
|
|
|
namespace Calls::Group {
|
|
|
|
|
|
|
|
constexpr auto kDefaultVolume = 10000;
|
|
|
|
constexpr auto kMaxVolume = 20000;
|
2021-05-07 13:01:54 +00:00
|
|
|
constexpr auto kBlobsEnterDuration = crl::time(250);
|
2021-01-14 00:25:59 +00:00
|
|
|
|
|
|
|
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-04-05 10:29:03 +00:00
|
|
|
TimeId scheduleDate = 0;
|
2021-03-05 15:21:11 +00:00
|
|
|
};
|
|
|
|
|
2021-04-22 16:05:17 +00:00
|
|
|
enum class PanelMode {
|
|
|
|
Default,
|
|
|
|
Wide,
|
|
|
|
};
|
|
|
|
|
2021-05-12 15:02:45 +00:00
|
|
|
enum class VideoQuality {
|
|
|
|
Thumbnail,
|
|
|
|
Medium,
|
|
|
|
Full,
|
|
|
|
};
|
|
|
|
|
2021-05-28 09:23:24 +00:00
|
|
|
enum class Error {
|
|
|
|
NoCamera,
|
2021-06-23 08:04:05 +00:00
|
|
|
CameraFailed,
|
2021-05-28 09:23:24 +00:00
|
|
|
ScreenFailed,
|
|
|
|
MutedNoCamera,
|
|
|
|
MutedNoScreen,
|
|
|
|
DisabledNoCamera,
|
|
|
|
DisabledNoScreen,
|
|
|
|
};
|
|
|
|
|
2021-06-18 13:45:22 +00:00
|
|
|
enum class StickedTooltip {
|
|
|
|
Camera = 0x01,
|
|
|
|
Microphone = 0x02,
|
|
|
|
};
|
|
|
|
constexpr inline bool is_flag_type(StickedTooltip) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
using StickedTooltips = base::flags<StickedTooltip>;
|
|
|
|
|
2021-07-27 18:09:13 +00:00
|
|
|
[[nodiscard]] object_ptr<Ui::GenericBox> ScreenSharingPrivacyRequestBox();
|
|
|
|
|
2021-01-14 00:25:59 +00:00
|
|
|
} // namespace Calls::Group
|