File indexing completed on 2024-05-12 15:59:56

0001 /*
0002  *  SPDX-FileCopyrightText: 2021 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef KORESOURCESIGNATURE_H
0007 #define KORESOURCESIGNATURE_H
0008 
0009 #include "kritaresources_export.h"
0010 #include <QString>
0011 #include <boost/operators.hpp>
0012 
0013 /**
0014  * @brief A simple wrapper object for the main information about the
0015  * resource.
0016  *
0017  * This information is needed to somewhat uniquely identify the resource
0018  * in the world
0019  */
0020 class KRITARESOURCES_EXPORT KoResourceSignature : public boost::equality_comparable<KoResourceSignature>
0021 {
0022 public:
0023     KoResourceSignature();
0024     KoResourceSignature(const QString &type, const QString &md5sum, const QString &filename, const QString &name);
0025 
0026     KRITARESOURCES_EXPORT
0027     friend bool operator==(const KoResourceSignature &lhs, const KoResourceSignature &rhs);
0028 
0029     QString type;
0030     QString md5sum;
0031     QString filename;
0032     QString name;
0033 };
0034 
0035 KRITARESOURCES_EXPORT QDebug operator<<(QDebug dbg, const KoResourceSignature &sig);
0036 
0037 #endif // KORESOURCESIGNATURE_H