KItinerary

uic9183header.h
1/*
2 SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kitinerary_export.h"
10#include "uic9183utils.h"
11
12#include <QByteArray>
13#include <qobjectdefs.h>
14
15namespace KItinerary {
16
17/** Header of an UIC 918.3 ticket. */
18class KITINERARY_EXPORT Uic9183Header
19{
20 Q_GADGET
21 UIC_STR_PROPERTY(messageType, 0, 3)
22 UIC_NUM_PROPERTY(version, 3, 2)
23 UIC_NUM_PROPERTY(signerCompanyCodeNumeric, 5, 4)
24 UIC_STR_PROPERTY(signerCompanyCode, 5, 4)
25 UIC_STR_PROPERTY(signatureKeyId, 9, 5)
26 Q_PROPERTY(int signatureSize READ signatureSize)
27 Q_PROPERTY(int compressedMessageSize READ compressedMessageSize)
28public:
30 Uic9183Header(const QByteArray &data);
31
32 bool operator==(const Uic9183Header &other) const;
33
34 bool isValid() const;
35 int signatureSize() const;
36 int compressedMessageSize() const;
37 int compressedMessageOffset() const;
38private:
39 QByteArray m_data;
40};
41
42}
43
Header of an UIC 918.3 ticket.
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.