Messagelib

updatedatabaseinfo.h
1 /*
2  SPDX-FileCopyrightText: 2016-2023 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 {
22  Unknown = 0,
23  FullUpdate = 1,
24  PartialUpdate = 2,
25  };
26 
27  enum CompressionType {
28  UnknownCompression = 0,
29  RiceCompression = 1,
30  RawCompression = 2,
31  };
32 
33  QVector<Addition> additionList;
34  QVector<Removal> removalList;
35  QString minimumWaitDuration;
36  QString threatType;
37  QString threatEntryType;
38  ResponseType responseType = Unknown;
39  QString platformType;
40  QString newClientState;
41  QByteArray sha256;
42  void clear();
43  bool operator==(const UpdateDataBaseInfo &other) const;
44 };
45 
46 struct WEBENGINEVIEWER_EXPORT RiceDeltaEncoding {
47  RiceDeltaEncoding();
48  bool operator==(const RiceDeltaEncoding &other) const;
49  Q_REQUIRED_RESULT bool isValid() const;
50  QByteArray firstValue;
51  QByteArray encodingData;
52  int riceParameter;
53  int numberEntries;
54 };
55 
56 struct WEBENGINEVIEWER_EXPORT Addition {
57  Addition();
58  Q_REQUIRED_RESULT bool isValid() const;
59  bool operator==(const Addition &other) const;
60 
61  static bool lessThan(const Addition &s1, const Addition &s2);
62  QByteArray hashString;
63  RiceDeltaEncoding riceDeltaEncoding;
64  UpdateDataBaseInfo::CompressionType compressionType;
65  int prefixSize;
66 };
67 
68 struct WEBENGINEVIEWER_EXPORT Removal {
69  Removal();
70  bool operator==(const Removal &other) const;
71  Q_REQUIRED_RESULT bool isValid() const;
72  QList<quint32> indexes;
73  RiceDeltaEncoding riceDeltaEncoding;
74  UpdateDataBaseInfo::CompressionType compressionType;
75 };
76 }
77 Q_DECLARE_METATYPE(WebEngineViewer::UpdateDataBaseInfo)
78 Q_DECLARE_METATYPE(WebEngineViewer::UpdateDataBaseInfo::CompressionType)
79 Q_DECLARE_TYPEINFO(WebEngineViewer::Addition, Q_MOVABLE_TYPE);
80 Q_DECLARE_TYPEINFO(WebEngineViewer::Removal, Q_MOVABLE_TYPE);
81 Q_DECLARE_TYPEINFO(WebEngineViewer::RiceDeltaEncoding, Q_MOVABLE_TYPE);
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
KGuiItem clear()
bool isValid(QStringView ifopt)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:08:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.