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

NAME

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

USAGE

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

RETURN CODES

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

SEE ALSO

135       mail::account::saveFolderIndexInfo(3x),
136       mail::account::getFolderIndexInfo(3x),
137       mail::account::getFolderKeywordInfo(3x), mail::folder::open(3x).
138
139
140
141[FIXME: source]                   05/08/2010          MAIL::ACCOUNT::UPDAT(3x)
Impressum