summaryrefslogtreecommitdiffstats
path: root/api/logic/net/NetAction.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-08-14 02:33:31 +0200
committerPetr Mrázek <peterix@gmail.com>2016-08-14 23:22:54 +0200
commit042f3ef55c0b469f438542152c4eb02b0789ea3c (patch)
tree03e0c15b200786558babd0fe58edac88ed1bfd1e /api/logic/net/NetAction.h
parent2f0441b3c1cd9fc3bcb176d2852da8f92a6e6777 (diff)
downloadMultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar
MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar.gz
MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar.lz
MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar.xz
MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.zip
GH-352 Make OneSix instance update downloads cancellable
Diffstat (limited to 'api/logic/net/NetAction.h')
-rw-r--r--api/logic/net/NetAction.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/api/logic/net/NetAction.h b/api/logic/net/NetAction.h
index 2b3f1b7b..07456ce1 100644
--- a/api/logic/net/NetAction.h
+++ b/api/logic/net/NetAction.h
@@ -28,7 +28,8 @@ enum JobStatus
Job_NotStarted,
Job_InProgress,
Job_Finished,
- Job_Failed
+ Job_Failed,
+ Job_Aborted
};
typedef std::shared_ptr<class NetAction> NetActionPtr;
@@ -54,6 +55,14 @@ public:
{
return m_failures;
}
+ virtual bool abort()
+ {
+ return false;
+ }
+ virtual bool canAbort()
+ {
+ return false;
+ }
public:
/// the network reply
@@ -79,6 +88,7 @@ signals:
void netActionProgress(int index, qint64 current, qint64 total);
void succeeded(int index);
void failed(int index);
+ void aborted(int index);
protected
slots: