diff options
author | 2013-08-08 17:40:45 +0300 | |
---|---|---|
committer | 2013-08-08 17:40:45 +0300 | |
commit | c6c9d10e66ae6a01fabd6c55c4492566372b59e5 (patch) | |
tree | 7ef20e5899dadd35f627fd644d4545b2db68926a /src/async/imap/MCIMAPGetQuotaOperation.cc | |
parent | d5ed180d3615e668a59d098156189616b596a67a (diff) |
added getQuota operation to get free space in mailbox
Diffstat (limited to 'src/async/imap/MCIMAPGetQuotaOperation.cc')
-rw-r--r-- | src/async/imap/MCIMAPGetQuotaOperation.cc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/async/imap/MCIMAPGetQuotaOperation.cc b/src/async/imap/MCIMAPGetQuotaOperation.cc new file mode 100644 index 00000000..572bd583 --- /dev/null +++ b/src/async/imap/MCIMAPGetQuotaOperation.cc @@ -0,0 +1,42 @@ +// +// MCIMAPGetQuotaOperation.cc +// mailcore2 +// +// Created by Petro Korenev on 8/2/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#include "MCIMAPGetQuotaOperation.h" + +#include "MCIMAPSession.h" +#include "MCIMAPAsyncConnection.h" + +using namespace mailcore; + +IMAPGetQuotaOperation::IMAPGetQuotaOperation() +{ + mLimit = 0; + mUsage = 0; +} + +IMAPGetQuotaOperation::~IMAPGetQuotaOperation() +{ +} + +uint32_t IMAPGetQuotaOperation::limit() +{ + return mLimit; +} + +uint32_t IMAPGetQuotaOperation::usage() +{ + return mUsage; +} + +void IMAPGetQuotaOperation::main() +{ + ErrorCode error; + session()->session()->getQuota(&mUsage, &mLimit, &error); + fprintf(stderr, "QnIQuESeqUeNcE %d %d", mUsage, mLimit); + setError(error); +} |