1mail::ACCOUNT::openFomladielr:(:3AxC)COUNT Synchronous APImraeifle:r:eAnCcCeOUNT::openFolder(3x)
2
3
4
6 mail::ACCOUNT::openFolder - Open a folder
7
9 #include <libmail/sync.H>
10
11 mail::ACCOUNT *mail;
12
13
14
15 bool ok=mail->openFolder (const mail::folder *folder);
16
17 std::string errmsg=mail->getErrmsg();
18
20 A mail folder must be formally "opened" before the messages in the
21 folder may be accessed. Each mail account can have only one mail
22 folder at any time Opening another folder automatically "closes" the
23 previous folder.
24
25 Note: Different mail::account or mail::ACCOUNT objects may each
26 have a folder opened, at the same time. It is possible to cre‐
27 ate multiple mail::account or mail::ACCOUNT objects that refer
28 to the same actual mail account. Whether it is possible to
29 access the same account multiple times, using different objects,
30 and whether each object may have the same folder opened depends
31 on the account type and/or the remote server.
32
33 · Whether it's possible to open the same remote IMAP or POP3
34 account more than once depends on the remote IMAP/POP3 server.
35
36 · Whether it's possible to open the same folder on a remote IMAP
37 server account more than once depends on the remote IMAP/POP3
38 server. Most IMAP servers allow the same account to be opened
39 more than once, as long as the different login sessions do not
40 try to open the same folder. Some IMAP servers allow the same
41 folder to be opened simultaneously by multiple sessions.
42
43 · It is generally possible to open the same local mail folder
44 simultaneously, via multiple mail::account objects, as long as
45 only one pending request is issued at a time. Concurrent
46 access to local maildirs generally works well, however simul‐
47 taneous access to the same mbox folder may be rather slow, due
48 to the overhead of locking and rescanning of the folder by
49 each mail::account object.
50
51 Any previously-opened folder is closed before the an attempt to open
52 this folder is made. If the new folder cannot be opened, the previous
53 folder is still considered closed.
54
56 This method returns true if it succeeds, or false if it fails. If the
57 method fails, use mail::ACCOUNT::getErrmsg() to read a brief descrip‐
58 tion of the error.
59
61 mail::ACCOUNT::getTopLevelFolders(3x), mail::ACCOUNT::readFolder‐
62 Info(3x).
63
64
65
66 10 April 2006 mail::ACCOUNT::openFolder(3x)