tdesktop/Telegram/SourceFiles/calls/group/calls_group_common.h

90 lines
1.6 KiB
C
Raw Normal View History

/*
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
#include "base/object_ptr.h"
class UserData;
namespace Ui {
class GenericBox;
} // namespace Ui
namespace Calls::Group {
constexpr auto kDefaultVolume = 10000;
constexpr auto kMaxVolume = 20000;
constexpr auto kBlobsEnterDuration = crl::time(250);
struct MuteRequest {
2021-03-03 15:29:33 +00:00
not_null<PeerData*> peer;
bool mute = false;
bool locallyOnly = false;
};
struct VolumeRequest {
2021-03-03 15:29:33 +00:00
not_null<PeerData*> peer;
int volume = kDefaultVolume;
bool finalized = true;
bool locallyOnly = false;
};
struct ParticipantState {
2021-03-03 15:29:33 +00:00
not_null<PeerData*> peer;
std::optional<int> volume;
bool mutedByMe = false;
bool locallyOnly = false;
};
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;
TimeId scheduleDate = 0;
};
enum class PanelMode {
Default,
Wide,
};
2021-05-12 15:02:45 +00:00
enum class VideoQuality {
Thumbnail,
Medium,
Full,
};
enum class Error {
NoCamera,
CameraFailed,
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>;
[[nodiscard]] object_ptr<Ui::GenericBox> ScreenSharingPrivacyRequestBox();
} // namespace Calls::Group