tdlight/td/telegram/SpecialStickerSetType.h

66 lines
1.6 KiB
C++

//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022
//
// 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"
#include <functional>
namespace td {
class SpecialStickerSetType {
explicit SpecialStickerSetType(string type) : type_(type) {
}
friend struct SpecialStickerSetTypeHash;
public:
string type_;
static SpecialStickerSetType animated_emoji();
static SpecialStickerSetType animated_emoji_click();
static SpecialStickerSetType animated_dice(const string &emoji);
static SpecialStickerSetType premium_gifts();
static SpecialStickerSetType generic_animations();
static SpecialStickerSetType default_statuses();
string get_dice_emoji() const;
bool is_empty() const {
return type_.empty();
}
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;
};
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 {
std::size_t operator()(SpecialStickerSetType type) const {
return std::hash<string>()(type.type_);
}
};
} // namespace td