ZaStoGram_desktop/Telegram/SourceFiles/info/profile/info_profile_free_codes.h
John Preston 971fcc0b8d Offer temporary and permanent payment-free QR codes.
Task: 2026/10/15/offer-temporary-and-permanent-payment-free-codes-in-the-own-qr-box
2026-10-20 17:07:53 +04:00

37 lines
750 B
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
namespace Main {
class Session;
} // namespace Main
namespace Info::Profile {
enum class FreeCodeRequest {
Temporary,
ResetTemporary,
Permanent,
ResetPermanent,
};
struct FreeCode {
QString link;
TimeId expires = 0;
};
[[nodiscard]] rpl::producer<int> FreeMessagesPriceValue(
not_null<Main::Session*> session);
void RequestFreeMessagesCode(
not_null<Main::Session*> session,
FreeCodeRequest request,
Fn<void(FreeCode)> done,
Fn<void(QString)> fail);
} // namespace Info::Profile