1MAIL::ACCOUNT::GETTO(3x)Cone: COnsole Newsreader And EMAIL::ACCOUNT::GETTO(3x)
2
3
4
6 mail::ACCOUNT::getTopLevelFolders - Enumerate top-level folders
7
9 #include <libmail/sync.H>
10
11 mail::ACCOUNT *mail;
12 mail::ACCOUNT::FolderList folderList;
13
14 bool ok=mail->getTopLevelFolders(folderList);
15
16 std::string errmsg=mail->getErrmsg();
17
18 size_t nFolders=folderList::size();
19 const mail::folder *folder=folderList[n];
20
22 A mail account contains a collection of folders, arranged in a
23 top-to-bottom hierarchy. This function returns the list of the folders
24 at the top-level of the folder hierarchy.
25
26 mail::ACCOUNT::getTopLevelFolders, if succesful, initializes a list of
27 mail::folder objects, which are maintained by the
28 mail::ACCOUNT::FolderList class. Each mail::folder object represents a
29 mail account´s folder. The number of folders, and a pointer to each
30 folder object, is obtained according to the example above.
31
32 Note
33 Pointers to mail::folder objects are no longer valid after the
34 mail::ACCOUNT::FolderList object is destroyed. The application
35 should use mail::folder::clone(3x) to create a duplicate copy of
36 the mail::folder object (which the application is now responsible
37 for destroying).
38
40 This method returns true if it succeeds, or false if it fails. If the
41 method fails, use mail::ACCOUNT::getErrmsg() to read a brief
42 description of the error.
43
45 mail::ACCOUNT::login(3x), mail::ACCOUNT::getSubFolders(3x).
46
47
48
49[FIXME: source] 05/08/2010 MAIL::ACCOUNT::GETTO(3x)