1        Cone©
2
3MAIL::ACCOUNT::REMOV(3x)Cone: COnsole Newsreader And EMAIL::ACCOUNT::REMOV(3x)
4
5
6

NAME

8       mail::account::removeMessages - Remove messages from the folder
9

SYNOPSIS

11       #include <libmail/mail.H>
12
13
14       class myCallback : public mail::callback {
15       public:
16           void success(std::string msg);
17           void fail(std::string msg);
18       };
19
20       mail::account *account;
21
22       account->removeMessages(const std::vector<size_t> msgList,
23                               myCallback &callback);
24

USAGE

26       This function removes messages from the currently open folder.  msgList
27       is a list of messages to be removed.
28
29       This request invokes methods in the currently opened folder's
30       mail::callback::folder object, as follows:
31
32       ·   mail::account::messagesRemoved is invoked for all messages removed
33           from the folder. Obviously, this method will be invoked, one at a
34           time, for each message identified in msgList.
35
36               Note
37               Messages are removed one at a time. Each call to
38               mail::account::messagesRemoved renumbers the remaining messages
39               in the folder, and depending on the account type,
40               mail::account::messagesRemoved may not necessarily receive an
41               exact copy of msgList. For example, with an IMAP account if
42               msgList contains 1, 2, and 3, the
43               mail::account::messagesRemoved function will probably be called
44               three times. Each time it will receive a single range of
45               removed messages, set to messages 1-1, all three times. This is
46               because IMAP servers remove messages one message at a time. The
47               first invocation of mail::account::messagesRemoved indicates
48               that message #1 was removed, with the remaining messages
49               renumbered; and old messages #2 and #3 becoming messages #1 and
50               #2. The second invocation of mail::account::messagesRemoved's
51               messageNumber parameter of 1 refers to the old message #2,
52               which is now message #1. Ditto for the third invocation of
53               mail::account::messagesRemoved.
54
55               On the other hand, with an IMAP account the
56               mail::account::messagesRemoved method will be invoked once,
57               giving a single range of removed messages, 1-3. Application
58               must be prepared to handle either situation.
59
60       ·   The mail::account::messagesChanged method may be invoked for any
61           other messages in the folder with changed status flags.
62
63       ·   mail::account::newMessages may also be invoked if any messages were
64           added to this folder. The application should use
65           mail::account::getFolderIndexSize(3x), and compare it to the
66           previously-known folder size, in order to determine how many
67           messages were added to the folder (new messages are always added to
68           the end of the message list).
69
70           Note
71           This request should not be used with accounts on IMAP servers that
72           do not implement the UIDPLUS[1] IMAP extension.  “UIDPLUS” is
73           required to directly support this functionality. An alternative,
74           much slower, fallback implementation will be used with IMAP servers
75           that do not implement this protocol extension.
76

RETURN CODES

78       The application must wait until callback's success or fail method is
79       invoked. The success method is invoked when this request is succesfully
80       processed. The fail method is invoked if this request cannot be
81       processed. The application must not destroy callback until either the
82       success or fail method is invoked.
83
84           Note
85           callback's fail method may be invoked even after other callback
86           methods were invoked. This indicates that the request was partially
87           completed before the error was encountered.
88

SEE ALSO

90       mail::account::saveFolderIndexInfo(3x),
91       mail::account::getFolderIndexInfo(3x), mail::account::updateNotify(3x).
92

AUTHOR

94       Sam Varshavchik
95

NOTES

97        1. UIDPLUS
98           http://www.rfc-editor.org/rfc/rfc2359.txt
99
100
101
102Cone©                             08/25/2016          MAIL::ACCOUNT::REMOV(3x)
Impressum