1MAIL::ACCOUNT::LOGOUT(3mxa)il::account Native API referenMcAeIL::ACCOUNT::LOGOUT(3x)
2
3
4
6 mail::account::logout - Disconnect from the server
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 mail::account *account;
19
20
21
22 account->logout (myCallback &callback);
23
25 Close the mail account. The application should wait until either call‐
26 back.success or callback.fail is called (not much of a difference,
27 really, in both cases the mail::account object disconnects from the
28 server). The disconnected method of the mail::callback::disconnect
29 object, originally passed to mail::account::open, is also invoked.
30
32 The application must wait until callback's success or fail method is
33 invoked. The success method is invoked when this request is succes‐
34 fully processed. The fail method is invoked if this request cannot be
35 processed. The application must not destroy callback until either the
36 success or fail method is invoked.
37
38 Note: callback's fail method may be invoked even after other
39 callback methods were invoked. This indicates that the request
40 was partially completed before the error was encountered.
41
42 In this case, however, there is no substantial difference between suc‐
43 cess and fail. mail::account::logout does not destroy the
44 mail::account object, the object may be destroyed after either callback
45 function is invoked.
46
47
48
49 10 April 2006 MAIL::ACCOUNT::LOGOUT(3x)