2020-08-23 23:43:31 +02:00
|
|
|
//
|
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2020
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2020-08-24 13:39:03 +02:00
|
|
|
#include "td/actor/actor.h"
|
2020-08-23 23:43:31 +02:00
|
|
|
#include "td/actor/PromiseFuture.h"
|
|
|
|
|
|
|
|
#include "td/utils/common.h"
|
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
|
|
|
class Td;
|
|
|
|
|
2020-08-24 13:39:03 +02:00
|
|
|
class CountryInfoManager : public Actor {
|
2020-08-23 23:43:31 +02:00
|
|
|
public:
|
2020-08-24 13:39:03 +02:00
|
|
|
explicit CountryInfoManager(Td *td, ActorShared<> parent);
|
2020-08-23 23:43:31 +02:00
|
|
|
|
|
|
|
void get_current_country_code(Promise<string> &&promise);
|
|
|
|
|
|
|
|
private:
|
2020-08-24 13:39:03 +02:00
|
|
|
void tear_down() override;
|
|
|
|
|
2020-08-23 23:43:31 +02:00
|
|
|
Td *td_;
|
2020-08-24 13:39:03 +02:00
|
|
|
ActorShared<> parent_;
|
2020-08-23 23:43:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace td
|