blob: c4692c2a42a47f55ecd1fd212ca9f2197a67b878 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2019 Luxoft Sweden AB
// Copyright (C) 2018 Pelagicore AG
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#pragma once
#include <QtAppManCommon/global.h>
#include <QtAppManCommon/exception.h>
#include <QVariantMap>
struct archive;
QT_FORWARD_DECLARE_CLASS(QFileInfo)
QT_FORWARD_DECLARE_CLASS(QCryptographicHash)
QT_BEGIN_NAMESPACE_AM
namespace PackageUtilities
{
void addFileMetadataToDigest(const QString &entryFilePath, const QFileInfo &fi, QCryptographicHash &digest);
void addHeaderDataToDigest(const QVariantMap &header, QCryptographicHash &digest) Q_DECL_NOEXCEPT_EXPR(false);
// key == field name, value == type to choose correct hashing algorithm
extern QVariantMap headerDataForDigest;
};
enum PackageEntryType {
PackageEntry_Header,
PackageEntry_File,
PackageEntry_Dir,
PackageEntry_Footer
};
class ArchiveException : public Exception
{
public:
ArchiveException(struct ::archive *ar, const char *errorString);
};
QT_END_NAMESPACE_AM
// We mean it. Dummy comment since syncqt needs this also for completely private Qt modules.
|