2020-04-19 15:30:04 +02:00
|
|
|
//
|
2022-12-31 22:28:08 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023
|
2020-04-19 15:30:04 +02: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/telegram/telegram_api.h"
|
|
|
|
|
|
|
|
#include "td/utils/common.h"
|
2022-11-23 17:37:32 +01:00
|
|
|
#include "td/utils/HashTableUtils.h"
|
2021-12-01 17:59:45 +01:00
|
|
|
|
2020-04-19 15:30:04 +02:00
|
|
|
namespace td {
|
|
|
|
|
2021-12-01 17:59:45 +01:00
|
|
|
class SpecialStickerSetType {
|
|
|
|
explicit SpecialStickerSetType(string type) : type_(type) {
|
|
|
|
}
|
|
|
|
|
|
|
|
friend struct SpecialStickerSetTypeHash;
|
|
|
|
|
|
|
|
public:
|
2020-04-19 15:30:04 +02:00
|
|
|
string type_;
|
|
|
|
|
2021-12-01 17:59:45 +01:00
|
|
|
static SpecialStickerSetType animated_emoji();
|
2020-04-19 15:30:04 +02:00
|
|
|
|
2021-12-01 17:59:45 +01:00
|
|
|
static SpecialStickerSetType animated_emoji_click();
|
2021-09-15 13:44:11 +02:00
|
|
|
|
2021-12-01 17:59:45 +01:00
|
|
|
static SpecialStickerSetType animated_dice(const string &emoji);
|
2020-04-19 15:30:04 +02:00
|
|
|
|
2022-07-15 14:24:08 +02:00
|
|
|
static SpecialStickerSetType premium_gifts();
|
|
|
|
|
2022-09-02 12:59:49 +02:00
|
|
|
static SpecialStickerSetType generic_animations();
|
|
|
|
|
|
|
|
static SpecialStickerSetType default_statuses();
|
|
|
|
|
2023-12-21 20:44:59 +01:00
|
|
|
static SpecialStickerSetType default_channel_statuses();
|
|
|
|
|
2022-10-27 09:06:13 +02:00
|
|
|
static SpecialStickerSetType default_topic_icons();
|
|
|
|
|
2020-04-19 20:21:17 +02:00
|
|
|
string get_dice_emoji() const;
|
|
|
|
|
2021-12-01 17:59:45 +01:00
|
|
|
bool is_empty() const {
|
|
|
|
return type_.empty();
|
|
|
|
}
|
|
|
|
|
2020-04-19 15:30:04 +02:00
|
|
|
SpecialStickerSetType() = default;
|
|
|
|
|
|
|
|
explicit SpecialStickerSetType(const telegram_api::object_ptr<telegram_api::InputStickerSet> &input_sticker_set);
|
|
|
|
|
|
|
|
telegram_api::object_ptr<telegram_api::InputStickerSet> get_input_sticker_set() const;
|
|
|
|
};
|
|
|
|
|
2021-12-01 17:59:45 +01:00
|
|
|
inline bool operator==(const SpecialStickerSetType &lhs, const SpecialStickerSetType &rhs) {
|
|
|
|
return lhs.type_ == rhs.type_;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline bool operator!=(const SpecialStickerSetType &lhs, const SpecialStickerSetType &rhs) {
|
|
|
|
return !(lhs == rhs);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct SpecialStickerSetTypeHash {
|
2022-11-23 17:37:32 +01:00
|
|
|
uint32 operator()(SpecialStickerSetType type) const {
|
|
|
|
return Hash<string>()(type.type_);
|
2021-12-01 17:59:45 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-04-19 15:30:04 +02:00
|
|
|
} // namespace td
|