blob: 2268a384d326ba2c9067794430016e791d1055f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
//
// MCIMAPQuotaOperation.cc
// mailcore2
//
// Created by Petro Korenev on 8/2/13.
// Copyright (c) 2013 MailCore. All rights reserved.
//
#include "MCIMAPQuotaOperation.h"
#include "MCIMAPSession.h"
#include "MCIMAPAsyncConnection.h"
using namespace mailcore;
IMAPQuotaOperation::IMAPQuotaOperation()
{
mLimit = 0;
mUsage = 0;
}
IMAPQuotaOperation::~IMAPQuotaOperation()
{
}
uint32_t IMAPQuotaOperation::limit()
{
return mLimit;
}
uint32_t IMAPQuotaOperation::usage()
{
return mUsage;
}
void IMAPQuotaOperation::main()
{
ErrorCode error;
session()->session()->loginIfNeeded(&error);
if (error != ErrorNone) {
setError(error);
return;
}
session()->session()->getQuota(&mUsage, &mLimit, &error);
setError(error);
}
|