aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/async
diff options
context:
space:
mode:
authorGravatar Nikolay Morev <kolyuchiy@gmail.com>2016-04-06 09:45:42 +0400
committerGravatar HoĆ  V. DINH <dinh.viet.hoa@gmail.com>2016-04-05 22:45:42 -0700
commitf6129b13dda6f5f927568600a4e7dbea03939731 (patch)
tree199fbee36eb258ad0447f30d8aae3756410710ba /src/async
parent36d342d911e0cf2cad6a008ecc9b5ce401c9029e (diff)
Expose SMTP response and response code to Objective-C API
* Expose SMTP response and response code to Objective-C API
Diffstat (limited to 'src/async')
-rw-r--r--src/async/smtp/MCSMTPOperation.cpp11
-rw-r--r--src/async/smtp/MCSMTPOperation.h4
2 files changed, 15 insertions, 0 deletions
diff --git a/src/async/smtp/MCSMTPOperation.cpp b/src/async/smtp/MCSMTPOperation.cpp
index 28e1e152..0b3c8ad8 100644
--- a/src/async/smtp/MCSMTPOperation.cpp
+++ b/src/async/smtp/MCSMTPOperation.cpp
@@ -10,6 +10,7 @@
#include <stdlib.h>
+#include "MCSMTPSession.h"
#include "MCSMTPAsyncSession.h"
#include "MCSMTPOperationCallback.h"
@@ -72,6 +73,16 @@ ErrorCode SMTPOperation::error()
return mError;
}
+String * SMTPOperation::lastSMTPResponse()
+{
+ return session()->session()->lastSMTPResponse();
+}
+
+int SMTPOperation::lastSMTPResponseCode()
+{
+ return session()->session()->lastSMTPResponseCode();
+}
+
struct progressContext {
unsigned int current;
unsigned int maximum;
diff --git a/src/async/smtp/MCSMTPOperation.h b/src/async/smtp/MCSMTPOperation.h
index 5978d3d6..d1c4182b 100644
--- a/src/async/smtp/MCSMTPOperation.h
+++ b/src/async/smtp/MCSMTPOperation.h
@@ -34,6 +34,10 @@ namespace mailcore {
virtual void setError(ErrorCode error);
virtual ErrorCode error();
+ virtual String * lastSMTPResponse();
+
+ virtual int lastSMTPResponseCode();
+
virtual void start();
private: