1 ConeĀ©
2
3MAIL::FOLDER::READFO(3x)Cone: COnsole Newsreader And EMAIL::FOLDER::READFO(3x)
4
5
6
8 mail::folder::readFolderInfo - Get folder status
9
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::folder *folder;
21
22 class myFolderInfoCallback : public mail::callback::folderInfo {
23
24 public:
25 void success()
26 {
27 displayFolderStatus(messageCount, unreadCount);
28 }
29 };
30
31 folder->readFolderInfo(myFolderInfoCallback &folderInfoCallback,
32 myCallback &callback);
33
35 This function reads the current status of folder, which may refer to
36 any folder in the mail account (not necessarily the currently open
37 folder).
38
39 folderInfoCallback's success method will be invoked when the folder's
40 status is determined. The following variables will be initialized prior
41 to invoking success:
42
43 messageCount
44 Total number of messages in the folder.
45
46 unreadCount
47 Total number of unread messages in the folder.
48
49 fastInfo
50 This field should be initialized before calling this function. If
51 set to true the message counts are returned only if they can be
52 computed quickly. Otherwise folderInfoCallback's success method
53 will not be invoked at all, but callback's success method will
54 still be invoked.
55
56 If this field is set to false (the default), the message counts are
57 returned in all cases.
58
59 Note
60 folderInfoCallback's success method will be invoked just prior to
61 callback's success method (unless fastInfo is true and message
62 counts cannot be computed cheaply). The application must still wait
63 until callback's success, or fail is invoked, and must not destroy
64 the mail::callback::folderInfo object until either method has been
65 invoked.
66
67 Note
68 Message count computation is considered cheap with maildir-based
69 and POP3-based accounts. Message count computation is considered
70 expensive with mbox-based accounts, and with IMAP-based accounts.
71
73 The application must wait until callback's success or fail method is
74 invoked. The success method is invoked when this request is succesfully
75 processed. The fail method is invoked if this request cannot be
76 processed. The application must not destroy callback until either the
77 success or fail method is invoked.
78
79 Note
80 callback's fail method may be invoked even after other callback
81 methods were invoked. This indicates that the request was partially
82 completed before the error was encountered.
83
85 mail::account::checkNewMail(3x), mail::folder::open(3x).
86
88 Sam Varshavchik
89
90
91
92ConeĀ© 08/25/2016 MAIL::FOLDER::READFO(3x)