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/sync.H>
12
13       mail::ACCOUNT *mail;
14
15       bool ok=mail->updateKeywords(const std::vector<size_t> msgList,
16                                    const std::set<std::string> &keywords,
17                                    bool setOrChange, bool changeTo);
18
19       bool ok=mail->updateKeywords(const std::vector<size_t> msgList,
20                                    const std::list<std::string> &keywords,
21                                    bool setOrChange, bool changeTo);
22
23       bool ok=mail->updateKeywords(const std::vector<size_t> msgList,
24                                    const std::vector<std::string> &keywords,
25                                    bool setOrChange, bool changeTo);
26

USAGE

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

RETURN CODES

107       This method returns true if it succeeds, or false if it fails. If the
108       method fails, use mail::ACCOUNT::getErrmsg() to read a brief
109       description of the error.
110

SEE ALSO

112       mail::ACCOUNT::saveFolderIndexInfo(3x),
113       mail::ACCOUNT::getFolderIndexInfo(3x),
114       mail::ACCOUNT::getFolderKeywordInfo(3x).
115

AUTHOR

117       Sam Varshavchik
118
119
120
121Cone©                             08/25/2016          MAIL::ACCOUNT::UPDAT(3x)
Impressum