ZaStoGram_desktop/Telegram/SourceFiles/info/profile/info_profile_qr_link.h
John Preston b004476dc4 Share own QR links and free codes without a username
Task: 2026/10/17/open-ones-own-qr-box-without-a-username-with-temporary-only-codes
2026-10-20 17:07:54 +04:00

35 lines
754 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 OwnQrLinkKind {
Username,
Phone,
Contact,
};
struct OwnQrLink {
OwnQrLinkKind kind = OwnQrLinkKind::Contact;
QString link;
QString label = u"0:00"_q;
TimeId expires = 0;
friend inline bool operator==(const OwnQrLink &, const OwnQrLink &) = default;
};
[[nodiscard]] rpl::producer<OwnQrLink> OwnQrLinkValue(
not_null<Main::Session*> session,
Fn<void(QString)> fail);
} // namespace Info::Profile