forked from smiley22/S22.Imap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMailboxInfo.cs
109 lines (100 loc) · 3.01 KB
/
MailboxInfo.cs
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using System;
namespace S22.Imap {
/// <summary>
/// Contains status information for an IMAP mailbox such as the total
/// number of messages in the mailbox, various attributes as well as
/// quota information.
/// </summary>
/// <remarks>The terms "mailbox" and "folder" can be used interchangeably
/// and refer to the IMAP concept of multiple server-side directories into
/// which messages can be stored (such as "Inbox", "Sent Items", "Trash",
/// etc.).</remarks>
[Serializable]
public class MailboxInfo {
/// <summary>
/// Initializes a new instance of the MailboxInfo class with the specified
/// values.
/// </summary>
/// <param name="Name">The IMAP name of the mailbox</param>
/// <param name="Flags">The IMAP flags set on this mailbox</param>
/// <param name="Messages">The number of messages in the mailbox</param>
/// <param name="Unread">The number of unread messages in the mailbox</param>
/// <param name="NextUID">The next unique identifier (UID) of the mailbox</param>
/// <param name="UsedStorage">The amount of used storage of the mailbox, in bytes</param>
/// <param name="FreeStorage">The amount of free storage of the mailbox, in bytes</param>
internal MailboxInfo(string Name, MailboxFlag[] Flags, int Messages, int Unread,
uint NextUID, UInt64 UsedStorage, UInt64 FreeStorage) {
this.Name = Name;
this.Flags = Flags;
this.Messages = Messages;
this.Unread = Unread;
this.NextUID = NextUID;
this.UsedStorage = UsedStorage;
this.FreeStorage = FreeStorage;
}
/// <summary>
/// Returns the name of the mailbox.
/// </summary>
/// <returns>The name of the mailbox</returns>
public override string ToString() {
return Name;
}
/// <summary>
/// The name of the mailbox
/// </summary>
public string Name {
get;
set;
}
/// <summary>
/// An array of flags set on this mailbox.
/// </summary>
public MailboxFlag[] Flags {
get;
set;
}
/// <summary>
/// The total number of messages in the mailbox.
/// </summary>
public int Messages {
get;
set;
}
/// <summary>
/// The number of unread (unseen) messages in the mailbox.
/// </summary>
public int Unread {
get;
set;
}
/// <summary>
/// The next unique identifier value of the mailbox.
/// </summary>
public uint NextUID {
get;
set;
}
/// <summary>
/// The amount of used storage in the mailbox, measured in bytes.
/// </summary>
/// <remarks>Not all IMAP servers support the retrieval of quota
/// information. If it is not possible to retrieve the amount of
/// used storage, this property will be set to 0.
/// </remarks>
public UInt64 UsedStorage {
get;
set;
}
/// <summary>
/// The amount of free storage in the mailbox, measured in bytes.
/// </summary>
/// <remarks>Not all IMAP servers support the retrieval of quota
/// information. If it is not possible to retrieve the amount of
/// free storage, this property will be set to 0.
/// </remarks>
public UInt64 FreeStorage {
get;
set;
}
}
}