1 // 2 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021 3 // 4 // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 // 7 #pragma once 8 9 #include "td/telegram/td_api.h" 10 #include "td/telegram/telegram_api.h" 11 12 #include "td/utils/common.h" 13 #include "td/utils/Slice.h" 14 15 namespace td { 16 17 enum class TopDialogCategory : int32 { 18 Correspondent, 19 BotPM, 20 BotInline, 21 Group, 22 Channel, 23 Call, 24 ForwardUsers, 25 ForwardChats, 26 Size 27 }; 28 29 CSlice get_top_dialog_category_name(TopDialogCategory category); 30 31 TopDialogCategory get_top_dialog_category(const td_api::object_ptr<td_api::TopChatCategory> &category); 32 33 TopDialogCategory get_top_dialog_category(const telegram_api::object_ptr<telegram_api::TopPeerCategory> &category); 34 35 telegram_api::object_ptr<telegram_api::TopPeerCategory> get_input_top_peer_category(TopDialogCategory category); 36 37 } // namespace td 38