2018-11-26 15:55:02 +04:00
|
|
|
/*
|
|
|
|
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 qthelp {
|
|
|
|
class RegularExpressionMatch;
|
|
|
|
} // namespace qthelp
|
|
|
|
|
2025-01-07 14:52:25 +04:00
|
|
|
namespace ChatHelpers {
|
|
|
|
class Show;
|
|
|
|
} // namespace ChatHelpers
|
|
|
|
|
2025-01-07 20:47:43 +04:00
|
|
|
namespace Settings {
|
|
|
|
struct CreditsEntryBoxStyleOverrides;
|
|
|
|
} // namespace Settings
|
|
|
|
|
2020-06-24 11:56:16 +04:00
|
|
|
namespace Window {
|
|
|
|
class SessionController;
|
|
|
|
} // namespace Window
|
2019-07-24 16:00:30 +02:00
|
|
|
|
2018-11-26 15:55:02 +04:00
|
|
|
namespace Core {
|
|
|
|
|
|
|
|
struct LocalUrlHandler {
|
|
|
|
QString expression;
|
|
|
|
Fn<bool(
|
2020-06-24 11:56:16 +04:00
|
|
|
Window::SessionController *controller,
|
2018-11-26 15:55:02 +04:00
|
|
|
const qthelp::RegularExpressionMatch &match,
|
|
|
|
const QVariant &context)> handler;
|
|
|
|
};
|
|
|
|
|
2019-08-06 15:43:26 +01:00
|
|
|
[[nodiscard]] const std::vector<LocalUrlHandler> &LocalUrlHandlers();
|
2019-12-25 18:20:02 +03:00
|
|
|
[[nodiscard]] const std::vector<LocalUrlHandler> &InternalUrlHandlers();
|
2018-11-26 15:55:02 +04:00
|
|
|
|
2019-08-06 15:43:26 +01:00
|
|
|
[[nodiscard]] QString TryConvertUrlToLocal(QString url);
|
2019-01-21 17:42:21 +04:00
|
|
|
|
2019-08-06 15:43:26 +01:00
|
|
|
[[nodiscard]] bool InternalPassportLink(const QString &url);
|
|
|
|
|
|
|
|
[[nodiscard]] bool StartUrlRequiresActivate(const QString &url);
|
2019-01-21 17:42:21 +04:00
|
|
|
|
2025-01-07 20:47:43 +04:00
|
|
|
void ResolveAndShowUniqueGift(
|
|
|
|
std::shared_ptr<ChatHelpers::Show> show,
|
|
|
|
const QString &slug,
|
|
|
|
::Settings::CreditsEntryBoxStyleOverrides st);
|
2025-01-07 14:52:25 +04:00
|
|
|
void ResolveAndShowUniqueGift(
|
|
|
|
std::shared_ptr<ChatHelpers::Show> show,
|
|
|
|
const QString &slug);
|
|
|
|
|
2025-01-28 11:49:45 +04:00
|
|
|
[[nodiscard]] TimeId ParseVideoTimestamp(QStringView value);
|
|
|
|
|
2018-11-26 15:55:02 +04:00
|
|
|
} // namespace Core
|