1mail::account::removeMemsasialg:e:sa(c3cxo)unt Native APImarielf:e:raecnccoeunt::removeMessages(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
21
22       account->removeMessages  (const std::vector<size_t> msgList, myCallback
23       &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
38         Messages are removed one at a time.  Each call to mail::account::mes‐
39         sagesRemoved  renumbers  the  remaining  messages  in the folder, and
40         depending on the account type, mail::account::messagesRemoved may not
41         necessarily  receive  an exact copy of msgList.  For example, with an
42         IMAP account if msgList contains 1, 2, and 3, the mail::account::mes‐
43         sagesRemoved function will probably be called three times.  Each time
44         it will receive a single range of removed messages, set  to  messages
45         1-1,  all  three times.  This is because IMAP servers remove messages
46         one message at a time.  The first invocation  of  mail::account::mes‐
47         sagesRemoved  indicates that message #1 was removed, with the remain‐
48         ing messages renumbered; and old messages #2 and #3 becoming messages
49         #1 and #2.  The second invocation of mail::account::messagesRemoved's
50         messageNumber parameter of 1 refers to the old message #2,  which  is
51         now    message    #1.     Ditto   for   the   third   invocation   of
52         mail::account::messagesRemoved.
53
54         On the other hand, with an IMAP account the  mail::account::messages‐
55         Removed method will be invoked once, giving a single range of removed
56         messages, 1-3.  Application must be prepared to handle either  situa‐
57         tion.
58
59       · The  mail::account::messagesChanged  method  may  be  invoked for any
60         other messages in the folder with changed status flags.
61
62       · mail::account::newMessages may also be invoked if any  messages  were
63         added to this folder.  The application should use mail::account::get‐
64         FolderIndexSize(3x), and compare it to  the  previously-known  folder
65         size,  in  order  to  determine  how  many messages were added to the
66         folder (new messages are always added  to  the  end  of  the  message
67         list).
68
69         Note:  This  request should not be used with accounts on IMAP servers
70         that do not implement the UIDPLUS  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  succes‐
78       fully  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:  callback's  fail  method  may be invoked even after other
83              callback methods were invoked.  This indicates that the  request
84              was partially completed before the error was encountered.
85

SEE ALSO

87       mail::account::saveFolderIndexInfo(3x),  mail::account::getFolderIndex‐
88       Info(3x), mail::account::updateNotify(3x).
89
90
91
92                                 10 April 2006mail::account::removeMessages(3x)
Impressum