// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // // 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/DialogBoostLinkInfo.h" #include "td/telegram/DialogId.h" #include "td/telegram/td_api.h" #include "td/actor/actor.h" #include "td/utils/common.h" #include "td/utils/Promise.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include namespace td { class Td; class BoostManager final : public Actor { public: BoostManager(Td *td, ActorShared<> parent); void get_boost_slots(Promise> &&promise); void get_dialog_boost_status(DialogId dialog_id, Promise> &&promise); void boost_dialog(DialogId dialog_id, vector slot_ids, Promise> &&promise); Result> get_dialog_boost_link(DialogId dialog_id); void get_dialog_boost_link_info(Slice url, Promise &&promise); td_api::object_ptr get_chat_boost_link_info_object(const DialogBoostLinkInfo &info) const; void get_dialog_boosts(DialogId dialog_id, bool only_gift_codes, const string &offset, int32 limit, Promise> &&promise); void get_user_dialog_boosts(DialogId dialog_id, UserId user_id, Promise> &&promise); void on_update_dialog_boost(DialogId dialog_id, telegram_api::object_ptr &&boost); private: void tear_down() final; Td *td_; ActorShared<> parent_; }; } // namespace td