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

NAME

6       mail::account::copyMessagesTo - Move 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       account->moveMessagesTo(const std::vector<size_t> &msgList,
19                               mail::folder *copyTo, myCallback &callback);
20

USAGE

22       mail::account::moveMessagesTo moves messages from the currently-open
23       folder to another folder.
24
25
26
27       msgList specifies a list of messages. Messages are numbered starting
28       with message #0 and up to one less than
29       mail::account::getFolderIndexSize(3x)() (when
30       mail::account::getFolderIndexSize returns 6, the messages are numbered
31       0 through 5). Only the messages that appear in msgList are processed by
32       this request.
33
34       This is similar to mail::account::copyMessagesTo(3x), except that the
35       messages are removed from the original folder. The application can
36       expect that the mail::account::messagesRemoved function in the
37       currently opened folder´s mail::callback::folder object will be invoked
38       one or more times, as necessary, to reflect the removal of the listed
39       messages from the currently open folder.
40
41       copyTo is a pointer to a mail::folder object, representing the folder
42       where messages are moved to.  copyTo may be a folder in another mail
43       account, in which case this function transparently copies the indicated
44       messages using mail::account::removeMessages(3x). Only SMAP and
45       maildir-based mail accounts can move messages directly between folders;
46       for all other accounts the copy/delete implementation will be used
47       automatically.
48

RETURN CODES

50       The application must wait until callback´s success or fail method is
51       invoked. The success method is invoked when this request is succesfully
52       processed. The fail method is invoked if this request cannot be
53       processed. The application must not destroy callback until either the
54       success or fail method is invoked.
55
56           Note
57           callback´s fail method may be invoked even after other callback
58           methods were invoked. This indicates that the request was partially
59           completed before the error was encountered.
60
61           Note
62           Multiple applications may have the same account and folder opened
63           at the same time. It is possible that a message referenced by this
64           request was already deleted by another application. Depending on
65           the underlying server implementation this will result in either a
66           failed request, invoking callback.fail, or the request completing
67           (callback.success invoked) but without invoking any callback
68           function that refer to the message.
69
70           Note
71           If this request is interrupted, for some reason, it is possible
72           that some or all messages have already been copied to the
73           destination folder, but not yet removed from the original folder.
74

SEE ALSO

76       mail::account::copyMessagesTo(3x), mail::account::open(3x),
77       mail::account::removeMessages(3x).
78
79
80
81[FIXME: source]                   05/08/2010          MAIL::ACCOUNT::MOVEM(3x)
Impressum