ZaStoGram_desktop/Telegram/SourceFiles/_other/widget_helper.h
John Preston 15c2c8bab5 Run widget validators and renderers in the macOS helper
Task: 2026/11/14/run-widget-validators-and-renderers-in-the-macos-helper
2026-11-19 23:17:09 +04:00

33 lines
844 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 <functional>
#include <memory>
#include <string>
#include <string_view>
#include <vector>
namespace twidget {
class SandboxRemoteStream;
} // namespace twidget
namespace WidgetHelper {
[[nodiscard]] std::unique_ptr<twidget::SandboxRemoteStream> Adopt(
std::string_view token);
[[nodiscard]] std::string Lockdown();
[[nodiscard]] std::string Serve(
twidget::SandboxRemoteStream &stream,
const std::string &build,
const std::function<std::string()> &lockdown);
[[noreturn]] void ServeService(
std::function<void(std::vector<std::string>)> run);
} // namespace WidgetHelper