blob: 513097e27959ca1dce5e88976417e19ee8986733 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#include "MCIMAPFolder.h"
using namespace mailcore;
void IMAPFolder::init()
{
mPath = NULL;
mDelimiter = 0;
mFlags = IMAPFolderFlagNone;
}
IMAPFolder::IMAPFolder()
{
init();
}
IMAPFolder::IMAPFolder(IMAPFolder * other)
{
init();
setPath(other->path());
setDelimiter(other->delimiter());
setFlags(other->flags());
}
IMAPFolder::~IMAPFolder()
{
MC_SAFE_RELEASE(mPath);
}
Object * IMAPFolder::copy()
{
return new IMAPFolder(this);
}
void IMAPFolder::setPath(String * path)
{
MC_SAFE_REPLACE_COPY(String, mPath, path);
}
String * IMAPFolder::path()
{
return mPath;
}
void IMAPFolder::setDelimiter(char delimiter)
{
mDelimiter = delimiter;
}
char IMAPFolder::delimiter()
{
return mDelimiter;
}
void IMAPFolder::setFlags(IMAPFolderFlag flags)
{
mFlags = flags;
}
IMAPFolderFlag IMAPFolder::flags()
{
return mFlags;
}
String * IMAPFolder::description()
{
String * result = String::string();
result->appendUTF8Format("<%s:%p %s>", className()->UTF8Characters(), this, MCUTF8(mPath));
return result;
}
|