File indexing completed on 2024-04-28 04:20:03

0001 /*
0002     SPDX-FileCopyrightText: 2022 Friedrich W. H. Kossebau <kossebau@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef KODASKANNA_SCANRESULT_HPP
0008 #define KODASKANNA_SCANRESULT_HPP
0009 
0010 // Qt
0011 #include <QExplicitlySharedDataPointer>
0012 #include <QMetaType>
0013 
0014 class QByteArray;
0015 class QString;
0016 
0017 namespace Kodaskanna
0018 {
0019 
0020 class ScanResultPrivate;
0021 
0022 class ScanResult
0023 {
0024 public:
0025     ScanResult();
0026     ScanResult(const ScanResult &other);
0027     ~ScanResult();
0028 
0029     ScanResult &operator=(const ScanResult &other);
0030 
0031 public:
0032     const QString &text() const;
0033     const QByteArray &bytes() const;
0034     bool isSuccess() const;
0035 
0036 private:
0037     explicit ScanResult(ScanResultPrivate *dd);
0038 
0039 private:
0040     friend class ScanImageRunner;
0041     QExplicitlySharedDataPointer<ScanResultPrivate> d;
0042 };
0043 
0044 }
0045 
0046 Q_DECLARE_METATYPE(Kodaskanna::ScanResult)
0047 
0048 #endif