2021-03-15 16:32:28 +01:00
|
|
|
//
|
2024-01-01 01:07:21 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
|
2021-03-15 16:32:28 +01:00
|
|
|
//
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
//
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "td/utils/common.h"
|
|
|
|
#include "td/utils/StringBuilder.h"
|
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
|
|
|
class GroupCallParticipantOrder {
|
2021-07-12 17:29:55 +02:00
|
|
|
bool has_video_ = false;
|
|
|
|
int32 active_date_ = 0;
|
|
|
|
int32 joined_date_ = 0;
|
|
|
|
int64 raise_hand_rating_ = 0;
|
2021-03-15 16:32:28 +01:00
|
|
|
|
|
|
|
friend StringBuilder &operator<<(StringBuilder &string_builder,
|
|
|
|
const GroupCallParticipantOrder &group_call_participant_order);
|
|
|
|
|
|
|
|
friend bool operator==(const GroupCallParticipantOrder &lhs, const GroupCallParticipantOrder &rhs);
|
|
|
|
|
|
|
|
friend bool operator<(const GroupCallParticipantOrder &lhs, const GroupCallParticipantOrder &rhs);
|
|
|
|
|
|
|
|
public:
|
|
|
|
GroupCallParticipantOrder() = default;
|
|
|
|
|
2021-07-09 17:48:10 +02:00
|
|
|
GroupCallParticipantOrder(bool has_video, int32 active_date, int64 raise_hand_rating, int32 joined_date)
|
2021-07-12 17:29:55 +02:00
|
|
|
: has_video_(has_video)
|
|
|
|
, active_date_(active_date)
|
|
|
|
, joined_date_(joined_date)
|
|
|
|
, raise_hand_rating_(raise_hand_rating) {
|
2021-03-15 16:32:28 +01:00
|
|
|
}
|
|
|
|
|
2021-05-07 01:10:37 +02:00
|
|
|
static GroupCallParticipantOrder min();
|
|
|
|
|
2021-03-15 16:32:28 +01:00
|
|
|
static GroupCallParticipantOrder max();
|
|
|
|
|
|
|
|
bool is_valid() const;
|
|
|
|
|
2021-07-13 02:14:48 +02:00
|
|
|
bool has_video() const {
|
|
|
|
return has_video_;
|
|
|
|
}
|
|
|
|
|
2021-03-15 16:53:51 +01:00
|
|
|
string get_group_call_participant_order_object() const;
|
2021-03-15 16:32:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
bool operator==(const GroupCallParticipantOrder &lhs, const GroupCallParticipantOrder &rhs);
|
|
|
|
|
|
|
|
bool operator!=(const GroupCallParticipantOrder &lhs, const GroupCallParticipantOrder &rhs);
|
|
|
|
|
|
|
|
bool operator<(const GroupCallParticipantOrder &lhs, const GroupCallParticipantOrder &rhs);
|
|
|
|
|
|
|
|
bool operator<=(const GroupCallParticipantOrder &lhs, const GroupCallParticipantOrder &rhs);
|
|
|
|
|
|
|
|
bool operator>(const GroupCallParticipantOrder &lhs, const GroupCallParticipantOrder &rhs);
|
|
|
|
|
|
|
|
bool operator>=(const GroupCallParticipantOrder &lhs, const GroupCallParticipantOrder &rhs);
|
|
|
|
|
|
|
|
StringBuilder &operator<<(StringBuilder &string_builder, const GroupCallParticipantOrder &group_call_participant_order);
|
|
|
|
|
|
|
|
} // namespace td
|