34#ifndef __QGPGME_JOB_P_H__
35#define __QGPGME_JOB_P_H__
39#include "qgpgme_debug.h"
52 virtual GpgME::Error startIt() = 0;
54 virtual void startNow() = 0;
59void setJobPrivate(
const Job *job, std::unique_ptr<JobPrivate> d);
66static const T *jobPrivate(
const Job *job) {
67 auto d = getJobPrivate(job);
68 return dynamic_cast<const T *
>(d);
72static T *jobPrivate(Job *job) {
73 auto d = getJobPrivate(job);
74 return dynamic_cast<T *
>(d);
78template<
class JobClass>
79void emitArchiveProgressSignals(JobClass *job,
const QString &what,
int type,
int current,
int total)
81 if (what != QLatin1String{
"gpgtar"}) {
86 Q_EMIT job->fileProgress(current, total);
89 Q_EMIT job->dataProgress(current, total);
92 qCDebug(QGPGME_LOG) << job << __func__ <<
"Received progress for gpgtar with unknown type" << char(type);
An abstract base class for asynchronous crypto operations.
Definition: job.h:73