aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/async/imap/MCIMAPRenameFolderOperation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/async/imap/MCIMAPRenameFolderOperation.cpp')
-rw-r--r--src/async/imap/MCIMAPRenameFolderOperation.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/async/imap/MCIMAPRenameFolderOperation.cpp b/src/async/imap/MCIMAPRenameFolderOperation.cpp
new file mode 100644
index 00000000..338e02a5
--- /dev/null
+++ b/src/async/imap/MCIMAPRenameFolderOperation.cpp
@@ -0,0 +1,42 @@
+//
+// MCIMAPRenameFolderOperation.cpp
+// mailcore2
+//
+// Created by DINH Viêt Hoà on 1/12/13.
+// Copyright (c) 2013 MailCore. All rights reserved.
+//
+
+#include "MCIMAPRenameFolderOperation.h"
+
+#include "MCIMAPSession.h"
+#include "MCIMAPAsyncConnection.h"
+
+using namespace mailcore;
+
+IMAPRenameFolderOperation::IMAPRenameFolderOperation()
+{
+ mOtherName = NULL;
+}
+
+IMAPRenameFolderOperation::~IMAPRenameFolderOperation()
+{
+ MC_SAFE_RELEASE(mOtherName);
+}
+
+void IMAPRenameFolderOperation::setOtherName(String * otherName)
+{
+ MC_SAFE_REPLACE_COPY(String, mOtherName, otherName);
+}
+
+String * IMAPRenameFolderOperation::otherName()
+{
+ return mOtherName;
+}
+
+void IMAPRenameFolderOperation::main()
+{
+ ErrorCode error;
+ session()->session()->renameFolder(folder(), mOtherName, &error);
+ setError(error);
+}
+