Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
/**
* @RDE_HEADER@
* Licence Library
* $Id$
* $HeadURL$
* $Author$
* Created by hjl, SLSE, 2016-06-01
*/
#pragma once
#include <LtsLicence/ltslicence_export.h>
#include <QString>
#include <QVector>
#include <QDateTime>
namespace LtsLicence
{
struct LTSLICENCE_EXPORT Licence
{
QString name; ///< licence name
bool ignoreMaxCount = false; ///< true=ignore false=consider maxCount
bool ignoreExpiration = false; ///< true=ignore false=consider expiration
int maxCount = 0; ///< max. number of available licences
QDateTime expiration; ///< expiration date
int licenceRefCount = 0; ///< number of assignable licences
QString toString() const;
};
/**
* Convert the given XML licence data into an QVector of licence struct
* @param unencryptedXmlData xml data to be converted
* @return QVector<Licence>, in case of an error the QVector is empty.
*/
LTSLICENCE_EXPORT QVector<Licence> readLicences(const QByteArray &unencryptedXmlData);
/**
* Convert the given licence vector data into XML format
* @param licences Vector with data to be converted
* @return XML formatted data, in case of an error the QByteArray is empty.
*/
LTSLICENCE_EXPORT QByteArray writeUnencryptedLicences(const QVector<Licence> &licences);
}