/** * @RDE_HEADER@ * Licence Library * $Id$ * $HeadURL$ * $Author$ * Created by hjl, SLSE, 2016-06-01 */ #pragma once #include #include #include #include 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, in case of an error the QVector is empty. */ LTSLICENCE_EXPORT QVector 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 &licences); }