File indexing completed on 2025-01-05 05:09:30
0001 /* 0002 SPDX-FileCopyrightText: 2010-2012 Daniel Nicoletti <dantti12@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KCUPSJOB_H 0008 #define KCUPSJOB_H 0009 0010 #include <QDateTime> 0011 #include <QString> 0012 0013 #include <KCupsConnection.h> 0014 #include <kcupslib_export.h> 0015 0016 class KCUPSLIB_EXPORT KCupsJob 0017 { 0018 Q_ENUMS(Attribute) 0019 public: 0020 KCupsJob(); 0021 KCupsJob(int jobId, const QString &printer); 0022 0023 int id() const; 0024 QString idStr() const; 0025 QString name() const; 0026 QString originatingUserName() const; 0027 QString originatingHostName() const; 0028 QString printer() const; 0029 QDateTime createdAt() const; 0030 QDateTime completedAt() const; 0031 QDateTime processedAt() const; 0032 int pages() const; 0033 int processedPages() const; 0034 int size() const; 0035 bool preserved() const; 0036 0037 static QString iconName(ipp_jstate_t state); 0038 ipp_jstate_t state() const; 0039 QString stateMsg() const; 0040 QString stateReason() const; 0041 QString holdUntil() const; 0042 0043 bool authenticationRequired() const; 0044 bool reprintEnabled() const; 0045 0046 static bool cancelEnabled(ipp_jstate_t state); 0047 static bool holdEnabled(ipp_jstate_t state); 0048 static bool releaseEnabled(ipp_jstate_t state); 0049 0050 protected: 0051 KCupsJob(const QVariantMap &arguments); 0052 0053 private: 0054 friend class KCupsRequest; 0055 0056 int m_jobId; 0057 QString m_printer; 0058 QVariantMap m_arguments; 0059 }; 0060 0061 typedef QList<KCupsJob> KCupsJobs; 0062 Q_DECLARE_METATYPE(KCupsJobs) 0063 Q_DECLARE_METATYPE(KCupsJob) 0064 0065 #endif // KCUPSJOB_H