summaryrefslogtreecommitdiffstats
path: root/libutil/include
diff options
context:
space:
mode:
Diffstat (limited to 'libutil/include')
-rw-r--r--libutil/include/dlqueue.h9
-rw-r--r--libutil/include/jobqueue.h7
2 files changed, 11 insertions, 5 deletions
diff --git a/libutil/include/dlqueue.h b/libutil/include/dlqueue.h
index 9041e762..69fc22a6 100644
--- a/libutil/include/dlqueue.h
+++ b/libutil/include/dlqueue.h
@@ -5,13 +5,16 @@
/**
* A single file for the downloader/cache to process.
*/
-class DownloadJob : public Job
+class LIBUTIL_EXPORT DownloadJob : public Job
{
Q_OBJECT
public:
DownloadJob(QUrl url, QString rel_target_path = QString(), QString expected_md5 = QString());
static JobPtr create(QUrl url, QString rel_target_path = QString(), QString expected_md5 = QString());
+
+public:
+ static bool ensurePathExists(QString filenamepath);
public slots:
virtual void start();
@@ -37,8 +40,10 @@ public:
/// save to file?
bool m_save_to_file;
+ /// is the saving file already open?
+ bool m_opened_for_saving;
/// if saving to file, use the one specified in this string
- QString m_rel_target_path;
+ QString m_target_path;
/// this is the output file, if any
QFile m_output_file;
/// if not saving to file, downloaded data is placed here
diff --git a/libutil/include/jobqueue.h b/libutil/include/jobqueue.h
index 061686f6..26f49307 100644
--- a/libutil/include/jobqueue.h
+++ b/libutil/include/jobqueue.h
@@ -1,5 +1,6 @@
#pragma once
#include <QtCore>
+#include "libutil_config.h"
enum JobStatus
{
@@ -11,7 +12,7 @@ enum JobStatus
class JobList;
-class Job : public QObject
+class LIBUTIL_EXPORT Job : public QObject
{
Q_OBJECT
protected:
@@ -30,7 +31,7 @@ typedef QSharedPointer<Job> JobPtr;
/**
* A list of jobs, to be processed one by one.
*/
-class JobList : public QObject
+class LIBUTIL_EXPORT JobList : public QObject
{
friend class JobListQueue;
Q_OBJECT
@@ -127,7 +128,7 @@ typedef QSharedPointer<JobList> JobListPtr;
/**
* A queue of job lists! The job lists fail or finish as units.
*/
-class JobListQueue : public QObject
+class LIBUTIL_EXPORT JobListQueue : public QObject
{
Q_OBJECT
public: