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

NAME

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

USAGE

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

RETURN CODES

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

SEE ALSO

74       mail::account::copyMessagesTo(3x), mail::account::open(3x),
75       mail::account::removeMessages(3x).
76

AUTHOR

78       Sam Varshavchik
79
80
81
82ConeĀ©                             08/25/2016          MAIL::ACCOUNT::MOVEM(3x)
Impressum