45 lines
890 B
C++
45 lines
890 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
|
|
|
|
#include "mtproto/sender.h"
|
|
|
|
class UserData;
|
|
|
|
namespace Api {
|
|
struct GiftCode;
|
|
} // namespace Api
|
|
|
|
namespace Ui {
|
|
class GenericBox;
|
|
} // namespace Ui
|
|
|
|
namespace Window {
|
|
class SessionController;
|
|
} // namespace Window
|
|
|
|
class GiftPremiumValidator final {
|
|
public:
|
|
GiftPremiumValidator(not_null<Window::SessionController*> controller);
|
|
|
|
void showBox(not_null<UserData*> user);
|
|
void cancel();
|
|
|
|
private:
|
|
const not_null<Window::SessionController*> _controller;
|
|
MTP::Sender _api;
|
|
|
|
mtpRequestId _requestId = 0;
|
|
|
|
};
|
|
|
|
void GiftCodeBox(
|
|
not_null<Ui::GenericBox*> box,
|
|
not_null<Window::SessionController*> controller,
|
|
const QString &slug);
|