2024-05-29 11:48:40 +02:00
|
|
|
//
|
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2024-05-29 12:19:53 +02:00
|
|
|
#include "td/telegram/td_api.h"
|
2024-05-29 12:37:21 +02:00
|
|
|
#include "td/telegram/UserId.h"
|
2024-05-29 12:19:53 +02:00
|
|
|
|
2024-05-29 11:48:40 +02:00
|
|
|
#include "td/actor/actor.h"
|
|
|
|
|
|
|
|
#include "td/utils/common.h"
|
2024-05-29 12:19:53 +02:00
|
|
|
#include "td/utils/Promise.h"
|
2024-05-29 11:48:40 +02:00
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
|
|
|
class Td;
|
|
|
|
|
|
|
|
class InlineMessageManager final : public Actor {
|
|
|
|
public:
|
|
|
|
InlineMessageManager(Td *td, ActorShared<> parent);
|
|
|
|
|
2024-05-29 12:19:53 +02:00
|
|
|
void edit_inline_message_text(const string &inline_message_id, td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
|
|
|
|
td_api::object_ptr<td_api::InputMessageContent> &&input_message_content,
|
|
|
|
Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void edit_inline_message_live_location(const string &inline_message_id,
|
|
|
|
td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
|
|
|
|
td_api::object_ptr<td_api::location> &&input_location, int32 live_period,
|
|
|
|
int32 heading, int32 proximity_alert_radius, Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void edit_inline_message_media(const string &inline_message_id,
|
|
|
|
td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
|
|
|
|
td_api::object_ptr<td_api::InputMessageContent> &&input_message_content,
|
|
|
|
Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void edit_inline_message_caption(const string &inline_message_id,
|
|
|
|
td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
|
|
|
|
td_api::object_ptr<td_api::formattedText> &&input_caption, bool invert_media,
|
|
|
|
Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void edit_inline_message_reply_markup(const string &inline_message_id,
|
|
|
|
td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
|
|
|
|
Promise<Unit> &&promise);
|
|
|
|
|
2024-05-29 12:37:21 +02:00
|
|
|
void set_inline_game_score(const string &inline_message_id, bool edit_message, UserId user_id, int32 score,
|
|
|
|
bool force, Promise<Unit> &&promise);
|
|
|
|
|
|
|
|
void get_inline_game_high_scores(const string &inline_message_id, UserId user_id,
|
|
|
|
Promise<td_api::object_ptr<td_api::gameHighScores>> &&promise);
|
|
|
|
|
2024-05-29 11:48:40 +02:00
|
|
|
private:
|
|
|
|
void tear_down() final;
|
|
|
|
|
|
|
|
Td *td_;
|
|
|
|
ActorShared<> parent_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace td
|