1mail::account::copyMessmaagiels:T:oa(c3cxo)unt Native APImarielf:e:raecnccoeunt::copyMessagesTo(3x)
2
3
4

NAME

6       mail::account::copyMessagesTo - Copy messages to another 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
19
20       account->copyMessagesTo     (const     std::vector<size_t>    &msgList,
21       mail::folder *copyTo, myCallback &callback);
22

USAGE

24       mail::account::copyMessagesTo copies  messages  in  the  currently-open
25       folder  to another folder.  msgList specifies a list of messages.  Mes‐
26       sages are numbered starting with message #0 and up  to  one  less  than
27       mail::account::getFolderIndexSize(3x)()    (when    mail::account::get‐
28       FolderIndexSize returns 6, the messages  are  numbered  0  through  5).
29       Only the messages that appear in msgList are processed by this request.
30
31       copyTo  is  a pointer to a mail::folder object, representing the folder
32       where messages are copied to.  If account is an IMAP account and copyTo
33       is  another  folder  in the same account, then the messages are quickly
34       copied by the IMAP server.   Otherwise  each  message  is  individually
35       downloaded and copied to the copyTo folder.
36

RETURN CODES

38       The  application  must  wait until callback's success or fail method is
39       invoked.  The success method is invoked when this  request  is  succes‐
40       fully  processed.  The fail method is invoked if this request cannot be
41       processed.  The application must not destroy callback until either  the
42       success or fail method is invoked.
43
44              Note:  callback's  fail  method  may be invoked even after other
45              callback methods were invoked.  This indicates that the  request
46              was partially completed before the error was encountered.
47
48              Note: Multiple applications may have the same account and folder
49              opened at the same time.  It is possible that a  message  refer‐
50              enced  by  this  request was already deleted by another applica‐
51              tion.  Depending on the underlying  server  implementation  this
52              will  result in either a failed request, invoking callback.fail,
53              or the request completing (callback.success invoked) but without
54              invoking any callback function that refer to the message.
55

SEE ALSO

57       mail::account::moveMessagesTo(3x), mail::account::open(3x).
58
59
60
61                                 10 April 2006mail::account::copyMessagesTo(3x)
Impressum