b6c5bd07bb
- Memory manager - TD_SKIP_TEST/TD_SKIP_BENCHMARK/TD_SKIP_TG_CLI - Rebranding - github workflow - .gitignore - Add crypt32 to windows - Fatal crash log handler - optionally unencrypted database - malloc_trim support - getMemoryStatistics Options: - disable_document_filenames - disable_minithumbnails - disable_notifications - disable_group_calls - disable_auto_download - ignore_server_deletes_and_reads - ignore_update_chat_last_message - ignore_update_chat_read_inbox - ignore_update_user_chat_action - receive_access_hashes - message_unload_delay modification
50 lines
1.0 KiB
C++
50 lines
1.0 KiB
C++
//
|
|
// 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
|
|
|
|
#include "td/telegram/telegram_api.h"
|
|
|
|
#include "td/actor/actor.h"
|
|
|
|
#include "td/utils/common.h"
|
|
#include "td/utils/Status.h"
|
|
|
|
namespace td {
|
|
|
|
class Td;
|
|
|
|
class PromoDataManager final : public Actor {
|
|
public:
|
|
PromoDataManager(Td *td, ActorShared<> parent);
|
|
|
|
void init();
|
|
|
|
void reload_promo_data();
|
|
|
|
void memory_stats(vector<string> &output);
|
|
|
|
private:
|
|
void tear_down() final;
|
|
|
|
void start_up() final;
|
|
|
|
void timeout_expired() final;
|
|
|
|
void on_get_promo_data(Result<telegram_api::object_ptr<telegram_api::help_PromoData>> r_promo_data, bool dummy);
|
|
|
|
void schedule_get_promo_data(int32 expires_in);
|
|
|
|
Td *td_;
|
|
ActorShared<> parent_;
|
|
|
|
bool is_inited_ = false;
|
|
bool reloading_promo_data_ = false;
|
|
bool need_reload_promo_data_ = false;
|
|
};
|
|
|
|
} // namespace td
|