2022-05-24 00:21:03 +02:00
|
|
|
//
|
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2022-05-24 00:36:55 +02:00
|
|
|
#include "td/telegram/td_api.h"
|
|
|
|
|
2022-05-24 00:21:03 +02:00
|
|
|
#include "td/utils/common.h"
|
2022-06-27 12:30:18 +02:00
|
|
|
#include "td/utils/Promise.h"
|
2022-05-24 00:21:03 +02:00
|
|
|
#include "td/utils/Slice.h"
|
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
2022-05-24 14:42:46 +02:00
|
|
|
class Td;
|
|
|
|
|
2022-05-24 00:21:03 +02:00
|
|
|
const vector<Slice> &get_premium_limit_keys();
|
|
|
|
|
2022-05-24 01:55:03 +02:00
|
|
|
void get_premium_limit(const td_api::object_ptr<td_api::PremiumLimitType> &limit_type,
|
|
|
|
Promise<td_api::object_ptr<td_api::premiumLimit>> &&promise);
|
|
|
|
|
2022-05-24 14:42:46 +02:00
|
|
|
void get_premium_features(Td *td, const td_api::object_ptr<td_api::PremiumSource> &source,
|
2022-05-24 01:19:30 +02:00
|
|
|
Promise<td_api::object_ptr<td_api::premiumFeatures>> &&promise);
|
2022-05-24 00:36:55 +02:00
|
|
|
|
2022-05-24 19:45:03 +02:00
|
|
|
void view_premium_feature(Td *td, const td_api::object_ptr<td_api::PremiumFeature> &feature, Promise<Unit> &&promise);
|
|
|
|
|
2022-05-25 14:34:36 +02:00
|
|
|
void click_premium_subscription_button(Td *td, Promise<Unit> &&promise);
|
|
|
|
|
2022-06-01 14:14:09 +02:00
|
|
|
void get_premium_state(Td *td, Promise<td_api::object_ptr<td_api::premiumState>> &&promise);
|
|
|
|
|
2022-07-15 13:09:37 +02:00
|
|
|
void can_purchase_premium(Td *td, td_api::object_ptr<td_api::StorePaymentPurpose> &&purpose, Promise<Unit> &&promise);
|
2022-06-24 16:07:10 +02:00
|
|
|
|
2022-07-01 18:27:59 +02:00
|
|
|
void assign_app_store_transaction(Td *td, const string &receipt,
|
|
|
|
td_api::object_ptr<td_api::StorePaymentPurpose> &&purpose, Promise<Unit> &&promise);
|
2022-06-24 17:14:00 +02:00
|
|
|
|
2022-07-18 14:17:01 +02:00
|
|
|
void assign_play_market_transaction(Td *td, const string &package_name, const string &store_product_id,
|
|
|
|
const string &purchase_token,
|
2022-07-01 18:27:59 +02:00
|
|
|
td_api::object_ptr<td_api::StorePaymentPurpose> &&purpose, Promise<Unit> &&promise);
|
2022-06-24 16:27:03 +02:00
|
|
|
|
2022-05-24 00:21:03 +02:00
|
|
|
} // namespace td
|