ZaStoGram_desktop/Telegram/SourceFiles/core/update_unpack.h
John Preston 576bf1ec10 Add a root update-install mode to the Linux binary
Task: 2026/09/29/add-a-root-update-install-mode-to-the-linux-binary
2026-10-01 14:06:56 +04:00

30 lines
752 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 <QtCore/QByteArray>
#include <QtCore/QString>
#include <optional>
namespace Core::Updates {
struct VerifiedUpdate;
[[nodiscard]] std::optional<QByteArray> DecompressUpdatePayload(
const VerifiedUpdate &verified,
QString *error = nullptr);
// Extraction requires a fresh caller-controlled directory.
[[nodiscard]] bool ExtractUpdateFiles(
const QByteArray &uncompressed,
quint64 expectedVersion,
const QString &directory,
QString *error = nullptr);
} // namespace Core::Updates