1        ConeĀ©
2
3MAIL::FOLDER::GETPAR(3x)Cone: COnsole Newsreader And EMAIL::FOLDER::GETPAR(3x)
4
5
6

NAME

8       mail::folder::getParentFolder - Find parent folder
9

SYNOPSIS

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       class myFolderCallback : public mail::callback::folderlist {
21       public:
22           void success(const std::vector<const mail::folder *> &folders);
23       };
24
25       mail::folder *folder;
26
27       folder->getParentFolder(myFolderCallback &folderCallback,
28                               myCallback &callback);
29

USAGE

31       A mail account contains folders that are arranged in a tree-like
32       hierarchy.  mail::folder::getParentFolder creates a new folder object
33       that refers to folder's parent folder.
34

RETURN CODES AND CALLBACKS

36       The application must wait until callback's success or fail method is
37       invoked. The success method is invoked when this request is succesfully
38       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
43           callback's fail method may be invoked even after other callback
44           methods were invoked. This indicates that the request was partially
45           completed before the error was encountered.
46
47           Note
48           The application must not destroy folderCallback until this request
49           fails or succeeds.  folderCallback's success method is invoked just
50           before the callback's success method.
51
52       The folderCallback.success method receives a vector that contains
53       exactly one pointer to a single mail::folder object, that refers to
54       folder's parent folder The vector will be empty if folder's parent
55       folder could not be determined.
56
57           Note
58           mail::folders are linked to their corresponding mail::accounts. A
59           mail::folder created by one mail::account may not be used with a
60           different mail::folder. All mail::folders created by a
61           mail::account are invalidated when this mail::account object is
62           destroyed. Note that the mail::folder objects are not automatically
63           destroyed; the application is still responsible for destroying any
64           remaining mail::folders, after their a mail::account is destroyed.
65
66           Note
67           The folderCallback.success method receives a (possibly empty)
68           vector of pointers to mail::folder objects. These objects will be
69           destroyed when folderCallback.success terminates. The application
70           must use mail::folder::clone(3x) to create copies of mail::folder
71           objects it wants to use later.
72
73           Note
74           Both folderCallback.success and myCallback.success method will be
75           invoked if this request succeeds.  folderCallback.success will be
76           invoked before myCallback.success (since by definition this
77           indicates that the request has been completed).
78
79       callback's success method is then invoked, after all mail::folder
80       objects are destroyed.
81

SEE ALSO

83       mail::account::readTopLevelFolders(3x), mail::folder::clone(3x),
84       mail::folder::readSubFolders(3x).
85

AUTHOR

87       Sam Varshavchik
88
89
90
91ConeĀ©                             08/25/2016          MAIL::FOLDER::GETPAR(3x)
Impressum