1mail::ACCOUNT::getTopmLaeivle:l:FAoClCdOeUrNsT(3Sxy)nchronmoauisl:A:PAICCrOeUfNeTr:e:ngceetTopLevelFolders(3x)
2
3
4

NAME

6       mail::ACCOUNT::getTopLevelFolders - Enumerate top-level folders
7

SYNOPSIS

9       #include <libmail/sync.H>
10
11       mail::ACCOUNT *mail;
12       mail::ACCOUNT::FolderList folderList;
13
14
15
16       bool ok=mail->getTopLevelFolders (folderList);
17
18       std::string errmsg=mail->getErrmsg();
19
20       size_t nFolders=folderList::size();
21       const mail::folder *folder=folderList[n];
22

USAGE

24       A  mail account contains a collection of folders, arranged in a top-to-
25       bottom hierarchy.  This function returns the list of the folders at the
26       top-level of the folder hierarchy.
27
28       mail::ACCOUNT::getTopLevelFolders,  if succesful, initializes a list of
29       mail::folder objects, which are maintained by the  mail::ACCOUNT::Fold‐
30       erList  class.   Each  mail::folder  object represents a mail account's
31       folder.  The number of folders, and a pointer to each folder object, is
32       obtained according to the example above.
33
34              Note: Pointers to mail::folder objects are no longer valid after
35              the mail::ACCOUNT::FolderList object is destroyed.  The applica‐
36              tion  should  use  mail::folder::clone(3x) to create a duplicate
37              copy of the mail::folder object (which the  application  is  now
38              responsible for destroying).
39

RETURN CODES AND CALLBACKS

41       This  method returns true if it succeeds, or false if it fails.  If the
42       method fails, use mail::ACCOUNT::getErrmsg() to read a  brief  descrip‐
43       tion of the error.
44

SEE ALSO

46       mail::ACCOUNT::login(3x), mail::ACCOUNT::getSubFolders(3x).
47
48
49
50                                 10 Aprilm2a0i0l6::ACCOUNT::getTopLevelFolders(3x)
Impressum