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

NAME

6       mail::account::removeMessages - Remove messages from the folder
7

SYNOPSIS

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

USAGE

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

RETURN CODES

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

SEE ALSO

88       mail::account::saveFolderIndexInfo(3x),
89       mail::account::getFolderIndexInfo(3x), mail::account::updateNotify(3x).
90

NOTES

92        1. UIDPLUS
93           http://www.rfc-editor.org/rfc/rfc2359.txt
94
95
96
97[FIXME: source]                   05/08/2010          MAIL::ACCOUNT::REMOV(3x)
Impressum