1mail::folder::getParentFmoalidle:r:(f3oxl)der Native APImarielf:e:rfeonlcdeer::getParentFolder(3x)
2
3
4
6 mail::folder::getParentFolder - Find parent folder
7
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 class myFolderCallback : public mail::callback::folderlist {
19 public:
20 void success(const std::vector<const mail::folder *> &folders);
21 };
22
23 mail::folder *folder;
24
25
26
27 folder->getParentFolder (myFolderCallback &folderCallback, myCallback
28 &callback);
29
31 A mail account contains folders that are arranged in a tree-like hier‐
32 archy. mail::folder::getParentFolder creates a new folder object that
33 refers to folder's parent folder.
34
36 The application must wait until callback's success or fail method is
37 invoked. The success method is invoked when this request is succes‐
38 fully processed. The fail method is invoked if this request cannot be
39 processed. The application must not destroy callback until either the
40 success or fail method is invoked.
41
42 Note: callback's fail method may be invoked even after other
43 callback methods were invoked. This indicates that the request
44 was partially completed before the error was encountered.
45
46 Note: The application must not destroy folderCallback until this
47 request fails or succeeds. folderCallback's success method is
48 invoked just before the callback's success method.
49
50 The folderCallback.success method receives a vector that contains
51 exactly one pointer to a single mail::folder object, that refers to
52 folder's parent folder The vector will be empty if folder's parent
53 folder could not be determined.
54
55 Note: mail::folders are linked to their corresponding
56 mail::accounts. A mail::folder created by one mail::account may
57 not be used with a different mail::folder. All mail::folders
58 created by a mail::account are invalidated when this
59 mail::account object is destroyed. Note that the mail::folder
60 objects are not automatically destroyed; the application is
61 still responsible for destroying any remaining mail::folders,
62 after their a mail::account is destroyed.
63
64 Note: The folderCallback.success method receives a (possibly
65 empty) vector of pointers to mail::folder objects. These
66 objects will be destroyed when folderCallback.success termi‐
67 nates. The application must use mail::folder::clone(3x) to cre‐
68 ate copies of mail::folder objects it wants to use later.
69
70 Note: Both folderCallback.success and myCallback.success method
71 will be invoked if this request succeeds. folderCallback.suc‐
72 cess will be invoked before myCallback.success (since by defini‐
73 tion this indicates that the request has been completed).
74
75 callback's success method is then invoked, after all mail::folder
76 objects are destroyed.
77
79 mail::account::readTopLevelFolders(3x), mail::folder::clone(3x),
80 mail::folder::readSubFolders(3x).
81
82
83
84 10 April 2006mail::folder::getParentFolder(3x)