#include <libmail/mail.H>
class myCallback : public mail::callback {
public:
void success(std::string msg);
void fail(std::string msg);
};
class myFolderCallback : public mail::callback::folderlist {
public:
void success(const std::vector<const mail::folder *> &folders);
};
mail::account *account;
mail::folder *folder;
std::string folderPath=folder->getPath();
This function is very similar to
mail::account::folderFromString(3x).
mail::account::findFolder
recreates a mail::folder
object, given its server
path (which is returned by
mail::folder::getPath(3x).
The differences between
mail::account::findFolder
and
mail::account::folderFromString are:
mail::account::folderFromString uses a string created by mail::account::folder::toString, which includes all of the folder's properties (such as whether the folder contains messages, subfolders, or both, and its canonical name). mail::account::findFolder uses only the folder's "path", or "address" on the server.
NOTE: | The application must not destroy folderCallback until this request fails or succeeds. folderCallback's success method is invoked just before the callback's success method. |
The
folderCallback.success method
receives a vector with a single pointer
mail::folder
object, that's initialized to
represent the folder referenced by
folderPath.
The application must wait until callback's success or fail method is invoked. The success method is invoked when this request is succesfully processed. The fail method is invoked if this request cannot be processed. The application must not destroy callback until either the success or fail method is invoked.
NOTE: | callback's fail method may be invoked even after other callback methods were invoked. This indicates that the request was partially completed before the error was encountered. |
NOTE: | The
folderCallback.success method
receives a (possibly empty) vector of pointers to
|
NOTE: | Both folderCallback.success and myCallback.success method will be invoked if this request succeeds. folderCallback.success will be invoked before myCallback.success (since by definition this indicates that the request has been completed). |
NOTE: |
|
<<< Previous | Home | Next >>> |
mail::account::copyMessagesTo | Up | mail::account::folderFromString |