aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/async
diff options
context:
space:
mode:
authorGravatar AlexKar <aleksander.karimov@gmail.com>2016-04-02 08:36:38 +0400
committerGravatar HoĆ  V. DINH <dinh.viet.hoa@gmail.com>2016-04-01 21:36:38 -0700
commit811b8ac5057f0c77e3db388088c61e0763282fd9 (patch)
tree63b3cbcbb85482dc9e237fb60f5dea8d53d81642 /src/async
parent8bdb50e6f1e823e9394ff83eb66684b88497afb2 (diff)
Added ability of canceling for active sending operation
Added ability of canceling for active sending operation
Diffstat (limited to 'src/async')
-rw-r--r--src/async/smtp/MCSMTPSendWithDataOperation.cpp6
-rw-r--r--src/async/smtp/MCSMTPSendWithDataOperation.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/async/smtp/MCSMTPSendWithDataOperation.cpp b/src/async/smtp/MCSMTPSendWithDataOperation.cpp
index 4561b5d8..28cc02bf 100644
--- a/src/async/smtp/MCSMTPSendWithDataOperation.cpp
+++ b/src/async/smtp/MCSMTPSendWithDataOperation.cpp
@@ -84,3 +84,9 @@ void SMTPSendWithDataOperation::main()
}
setError(error);
}
+
+void SMTPSendWithDataOperation::cancel()
+{
+ SMTPOperation::cancel();
+ session()->session()->cancelMessageSending();
+}
diff --git a/src/async/smtp/MCSMTPSendWithDataOperation.h b/src/async/smtp/MCSMTPSendWithDataOperation.h
index 768adda9..25685148 100644
--- a/src/async/smtp/MCSMTPSendWithDataOperation.h
+++ b/src/async/smtp/MCSMTPSendWithDataOperation.h
@@ -37,7 +37,7 @@ namespace mailcore {
public: // subclass behavior
virtual void main();
-
+ virtual void cancel();
private:
Data * mMessageData;
String * mMessageFilepath;