1MAIL::FOLDER::READFO(3x)Cone: COnsole Newsreader And EMAIL::FOLDER::READFO(3x)
2
3
4

NAME

6       mail::folder::readFolderInfo - Get folder status
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::folder *folder;
19
20       class myFolderInfoCallback : public mail::callback::folderInfo {
21
22       public:
23               void success()
24               {
25                   displayFolderStatus(messageCount, unreadCount);
26               }
27       };
28
29       folder->readFolderInfo(myFolderInfoCallback &folderInfoCallback,
30                              myCallback &callback);
31

USAGE

33       This function reads the current status of folder, which may refer to
34       any folder in the mail account (not necessarily the currently open
35       folder).
36
37       folderInfoCallback´s success method will be invoked when the folder´s
38       status is determined. The following variables will be initialized prior
39       to invoking success:
40
41       messageCount
42           Total number of messages in the folder.
43
44       unreadCount
45           Total number of unread messages in the folder.
46
47       fastInfo
48           This field should be initialized before calling this function. If
49           set to true the message counts are returned only if they can be
50           computed quickly. Otherwise folderInfoCallback´s success method
51           will not be invoked at all, but callback´s success method will
52           still be invoked.
53
54           If this field is set to false (the default), the message counts are
55           returned in all cases.
56
57           Note
58           folderInfoCallback´s success method will be invoked just prior to
59           callback´s success method (unless fastInfo is true and message
60           counts cannot be computed cheaply). The application must still wait
61           until callback´s success, or fail is invoked, and must not destroy
62           the mail::callback::folderInfo object until either method has been
63           invoked.
64
65           Note
66           Message count computation is considered cheap with maildir-based
67           and POP3-based accounts. Message count computation is considered
68           expensive with mbox-based accounts, and with IMAP-based accounts.
69

RETURN CODES AND CALLBACKS

71       The application must wait until callback´s success or fail method is
72       invoked. The success method is invoked when this request is succesfully
73       processed. The fail method is invoked if this request cannot be
74       processed. The application must not destroy callback until either the
75       success or fail method is invoked.
76
77           Note
78           callback´s fail method may be invoked even after other callback
79           methods were invoked. This indicates that the request was partially
80           completed before the error was encountered.
81

SEE ALSO

83       mail::account::checkNewMail(3x), mail::folder::open(3x).
84
85
86
87[FIXME: source]                   05/08/2010          MAIL::FOLDER::READFO(3x)
Impressum