Messagelib

updatedatabaseinfo.h
1 /*
2  SPDX-FileCopyrightText: 2016-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "webengineviewer_export.h"
10 #include <QList>
11 #include <QObject>
12 #include <QVector>
13 namespace WebEngineViewer
14 {
15 struct Addition;
16 struct Removal;
17 struct WEBENGINEVIEWER_EXPORT UpdateDataBaseInfo {
18  UpdateDataBaseInfo();
19  Q_REQUIRED_RESULT bool isValid() const;
20 
21  enum ResponseType { Unknown = 0, FullUpdate = 1, PartialUpdate = 2 };
22 
23  enum CompressionType { UnknownCompression = 0, RiceCompression = 1, RawCompression = 2 };
24 
25  QVector<Addition> additionList;
26  QVector<Removal> removalList;
27  QString minimumWaitDuration;
28  QString threatType;
29  QString threatEntryType;
30  ResponseType responseType = Unknown;
31  QString platformType;
32  QString newClientState;
33  QByteArray sha256;
34  void clear();
35  bool operator==(const UpdateDataBaseInfo &other) const;
36 };
37 
38 struct WEBENGINEVIEWER_EXPORT RiceDeltaEncoding {
39  RiceDeltaEncoding();
40  bool operator==(const RiceDeltaEncoding &other) const;
41  bool isValid() const;
42  QByteArray firstValue;
43  QByteArray encodingData;
44  int riceParameter;
45  int numberEntries;
46 };
47 
48 struct WEBENGINEVIEWER_EXPORT Addition {
49  Addition();
50  bool isValid() const;
51  bool operator==(const Addition &other) const;
52 
53  static bool lessThan(const Addition &s1, const Addition &s2);
54  QByteArray hashString;
55  RiceDeltaEncoding riceDeltaEncoding;
56  UpdateDataBaseInfo::CompressionType compressionType;
57  int prefixSize;
58 };
59 
60 struct WEBENGINEVIEWER_EXPORT Removal {
61  Removal();
62  bool operator==(const Removal &other) const;
63  bool isValid() const;
64  QList<quint32> indexes;
65  RiceDeltaEncoding riceDeltaEncoding;
66  UpdateDataBaseInfo::CompressionType compressionType;
67 };
68 }
69 Q_DECLARE_METATYPE(WebEngineViewer::UpdateDataBaseInfo)
70 Q_DECLARE_METATYPE(WebEngineViewer::UpdateDataBaseInfo::CompressionType)
71 Q_DECLARE_TYPEINFO(WebEngineViewer::Addition, Q_MOVABLE_TYPE);
72 Q_DECLARE_TYPEINFO(WebEngineViewer::Removal, Q_MOVABLE_TYPE);
73 Q_DECLARE_TYPEINFO(WebEngineViewer::RiceDeltaEncoding, Q_MOVABLE_TYPE);
74 
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
bool isValid(QStringView ifopt)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 23:04:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.