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

NAME

8       mail::account::updateKeywords - Update message keywords
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       mail::account *account;
21
22       account->updateKeywords(const std::vector<size_t> msgList,
23                               const std::set<std::string> &keywords,
24                               bool setOrChange, bool changeTo,
25                               myCallback &callback);
26
27       account->updateKeywords(const std::vector<size_t> msgList,
28                               const std::list<std::string> &keywords,
29                               bool setOrChange, bool changeTo,
30                               myCallback &callback);
31
32       account->updateKeywords(const std::vector<size_t> msgList,
33                               const std::vector<std::string> &keywords,
34                               bool setOrChange, bool changeTo,
35                               myCallback &callback);
36

USAGE

38       This function updates the set of keywords of one or more messages.
39       keywords may also be specified as a list, or a vector (and duplicate
40       occurences of a keyword are automatically removed).  msgList specifies
41       a list of messages. Messages are numbered starting with message #0 and
42       up to one less than mail::account::getFolderIndexSize(3x)() (when
43       mail::account::getFolderIndexSize returns 6, the messages are numbered
44       0 through 5). Only the messages that appear in msgList are processed by
45       this request.
46
47       When setOrChange is false, changeTo is ignored, and any existing
48       keywords set for each message in msgList are completely replaced by
49       keywords. When setOrChange is truechangeTo selects whether keywords are
50       added to the existing set of keywords that are already set for each
51       message (changeTo is true), or removed from the existing set of
52       keywords (changeTo is false).
53
54   Keywords
55       Keywords are application-defined flags, or markers, that are associated
56       which each message in a folder. Keywords names are arbitrary, and are
57       subject to certain restrictions.  LibMAIL does not place any special
58       meaning on any particular keyword name.  LibMAIL 's sole involvement is
59       to store the save the list of keywords set for a given message, and
60       then retrieve it upon demand.
61
62       Which characters may be included in a keyword name depends on the
63       underlying account type. Applications that expect to use any supported
64       account type should limit themselves to the lowest common denominator:
65       case insensitive us-ascii character set; no whitespace or any of the
66       following characters: commas; apostrophes; quotes; backslashes; forward
67       slashes; opening/closing braces, brackets, and parenthesis; question
68       marks; asterisks; percent signs. In all cases, keyword names may not
69       include any control characters. Unless keywords are permanently saved,
70       and remain available after the folder is closed, and subsequently
71       reopened. When the folder is reopened at some point later, all keywords
72       will remain set for their corresponding messages (unless they were
73       modified by another process).
74
75       ·   Temporary folders do not implement keywords.
76
77       ·   IMAP accounts have case-insensitive keywords in the us-ascii
78           character set. Keyword names may not contain: apostrophes; quotes;
79           backslashes; forward slashes; opening/closing braces, brackets, and
80           parenthesis; question marks; asterisks; and percent signs.
81
82       ·   SMAP accounts have case-sensitive keywords that use the UTF-8
83           character set. Keyword names may not contain commas.
84
85               Note
86               IMAP restrictions also apply if the same account is accessible
87               via IMAP.
88
89       ·   Maildir accounts have case-sensitive keywords that use the UTF-8
90           character set.
91
92               Note
93               IMAP and/or SMAP restrictions also apply if the maildir is also
94               accessible via IMAP or SMAP.
95
96       ·   Mbox accounts have case-sensitive keywords that use the UTF-8
97           character set.
98
99       ·   NNTP and POP3 accounts have case-sensitive keywords that use the
100           UTF-8 character set. Keywords are not saved. When the folder is
101           closed, all set keywords are lost. Snapshots may be used to obtain
102           permanent keyword storage for NNTP and POP3 accounts. See
103           mail::folder::open(3x) for more information.
104

RETURN CODES

106       The application must wait until callback's success or fail method is
107       invoked. The success method is invoked when this request is succesfully
108       processed. The fail method is invoked if this request cannot be
109       processed. The application must not destroy callback until either the
110       success or fail method is invoked.
111
112           Note
113           callback's fail method may be invoked even after other callback
114           methods were invoked. This indicates that the request was partially
115           completed before the error was encountered.
116
117           Note
118           The application is notified about when a message's status changes
119           by by invoking the messageChanged callback method of the currently
120           opened folder's mail::folderCallback object. Depending on the mail
121           server, the messageChanged method may be invoked as part of
122           processing this request, or some time later after this request is
123           completed, and callback's success method was invoked.
124

SEE ALSO

126       mail::account::saveFolderIndexInfo(3x),
127       mail::account::getFolderIndexInfo(3x),
128       mail::account::getFolderKeywordInfo(3x), mail::folder::open(3x).
129

AUTHOR

131       Sam Varshavchik
132
133
134
135Cone©                             08/25/2016          MAIL::ACCOUNT::UPDAT(3x)
Impressum