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

NAME

8       mail::account::updateFolderIndexFlags - Update status of multiple
9       messages
10

SYNOPSIS

12       #include <libmail/mail.H>
13
14
15       class myCallback : public mail::callback {
16       public:
17           void success(std::string msg);
18           void fail(std::string msg);
19       };
20
21       mail::account *account;
22
23       account->updateFolderIndexFlags(const std::vector<size_t> msgList,
24                                       bool doFlip, bool enableDisable,
25                                       const messageInfo &msgInfo,
26                                       myCallback &callback);
27

USAGE

29       This is a version of mail::account::saveFolderIndexInfo(3x) that
30       updates the status of multiple messages with one request.
31
32       msgList specifies a list of messages. Messages are numbered starting
33       with message #0 and up to one less than
34       mail::account::getFolderIndexSize(3x)() (when
35       mail::account::getFolderIndexSize returns 6, the messages are numbered
36       0 through 5). Only the messages that appear in msgList are processed by
37       this request.
38
39       msgInfo selects which message status flags should be updated in every
40       message. See mail::account::getFolderIndexInfo(3x).
41
42       msgInfo does NOT specify the new value of the status flags, only which
43       status flags should be updated. For example, setting msgInfo.marked to
44       true indicates that the messages' marked status flag will be set to the
45       value specified by doFlip and enableDisable.
46
47       Setting doFlip to true "flips" the selected status flags (each
48       message's flag will be set to false if the status flag was originally
49       true, and set to true if the status flag was originalfalse). If doFlip
50       is false, then the selected status flags are set to the value of
51       enableDisableenableDisable is ignored when Setting doFlip is true.
52

RETURN CODES

54       The application must wait until callback's success or fail method is
55       invoked. The success method is invoked when this request is succesfully
56       processed. The fail method is invoked if this request cannot be
57       processed. The application must not destroy callback until either the
58       success or fail method is invoked.
59
60           Note
61           callback's fail method may be invoked even after other callback
62           methods were invoked. This indicates that the request was partially
63           completed before the error was encountered.
64
65           Note
66           The application is notified about when a message's status changes
67           by by invoking the messageChanged callback method of the currently
68           opened folder's mail::folderCallback object. Depending on the mail
69           server, the messageChanged method may be invoked as part of
70           processing this request, or some time later after this request is
71           completed, and callback's success method was invoked.
72
73           Note
74           Multiple applications may have the same account and folder opened
75           at the same time. It is possible that a message referenced by this
76           request was already deleted by another application. Depending on
77           the underlying server implementation this will result in either a
78           failed request, invoking callback.fail, or the request completing
79           (callback.success invoked) but without invoking any callback
80           function that refer to the message.
81

SEE ALSO

83       mail::account::saveFolderIndexInfo(3x),
84       mail::account::getFolderIndexInfo(3x).
85

AUTHOR

87       Sam Varshavchik
88
89
90
91ConeĀ©                             08/25/2016          MAIL::ACCOUNT::UPDAT(3x)
Impressum