From 703a580f1fe599f2dde7fec6c6e9a51ca47da34d Mon Sep 17 00:00:00 2001 From: libec Date: Sat, 7 Nov 2015 21:02:04 +0100 Subject: Adds error code to IMAPSession::customCommand. Renames sendCustomCommand to customCommand. --- src/async/imap/MCIMAPAsyncSession.cpp | 2 +- src/async/imap/MCIMAPAsyncSession.h | 2 +- src/async/imap/MCIMAPCustomCommandOperation.cpp | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/async') diff --git a/src/async/imap/MCIMAPAsyncSession.cpp b/src/async/imap/MCIMAPAsyncSession.cpp index 15d546d5..a8cccea5 100755 --- a/src/async/imap/MCIMAPAsyncSession.cpp +++ b/src/async/imap/MCIMAPAsyncSession.cpp @@ -537,7 +537,7 @@ IMAPFetchContentOperation * IMAPAsyncSession::fetchMessageByNumberOperation(Stri return op; } -IMAPCustomCommandOperation * IMAPAsyncSession::sendCustomCommand(String *command, bool urgent) +IMAPCustomCommandOperation * IMAPAsyncSession::customCommand(String *command, bool urgent) { IMAPCustomCommandOperation *op = new IMAPCustomCommandOperation(); diff --git a/src/async/imap/MCIMAPAsyncSession.h b/src/async/imap/MCIMAPAsyncSession.h index 42fedcfb..62577a6e 100755 --- a/src/async/imap/MCIMAPAsyncSession.h +++ b/src/async/imap/MCIMAPAsyncSession.h @@ -136,7 +136,7 @@ namespace mailcore { Encoding encoding, bool urgent = false); virtual IMAPFetchContentOperation * fetchMessageByNumberOperation(String * folder, uint32_t number, bool urgent = false); - virtual IMAPCustomCommandOperation * sendCustomCommand(String *command, bool urgent); + virtual IMAPCustomCommandOperation * customCommand(String *command, bool urgent); virtual IMAPFetchContentOperation * fetchMessageAttachmentByNumberOperation(String * folder, uint32_t number, String * partID, Encoding encoding, bool urgent = false); diff --git a/src/async/imap/MCIMAPCustomCommandOperation.cpp b/src/async/imap/MCIMAPCustomCommandOperation.cpp index 61e0e655..3995d6aa 100644 --- a/src/async/imap/MCIMAPCustomCommandOperation.cpp +++ b/src/async/imap/MCIMAPCustomCommandOperation.cpp @@ -37,6 +37,8 @@ String * IMAPCustomCommandOperation::response() void IMAPCustomCommandOperation::main() { - mResponse = session()->session()->sendCustomCommand(mCustomCommand); + ErrorCode error; + mResponse = session()->session()->customCommand(mCustomCommand, &error); MC_SAFE_RETAIN(mResponse); + setError(error); } -- cgit v1.2.3