1MAIL::ACCOUNT::READM(3x)Cone: COnsole Newsreader And EMAIL::ACCOUNT::READM(3x)
2
3
4

NAME

6       mail::account::readMessageContentDecoded - Read decoded message
7       contents
8

SYNOPSIS

10       #include <libmail/mail.H>
11       #include <libmail/envelope.H>
12       #include <libmail/structure.H>
13
14       class myCallbackMessage : public mail::callback::message {
15       public:
16           void success(std::string msg);
17           void fail(std::string msg);
18
19           void messageEnvelopeCallback(size_t messageNumber,
20                                        const mail::envelope &envelopeArg);
21
22           void messageReferencesCallback(size_t messageNumber,
23                                          const std::vector<std::string> &referencesArg);
24
25           void messageArrivalDateCallback(size_t messageNumber,
26                                           time_t datetime);
27
28           void messageSizeCallback(size_t messageNumber,
29                                    unsigned long size);
30
31           void messageStructureCallback(size_t messageNumber,
32                                         const mail::mimestruct &messageStructure);
33           void messageTextCallback(size_t messageNumber, std::string text);
34       };
35
36       std::cout << (float)myMessageCallback.messageTextCompleted /
37                    (float)myMessageCallback.messageTextEstimatedSize * 100
38                 << "% completed." << endl;
39
40
41       mail::account *account;
42
43       account->readMessageContentDecoded(size_t messageNum, bool peek,
44                                          mail::mimestruct &msgInfo,
45                                          bool justHeader, bool justContents,
46                                          myCallbackMessage &callback);
47

USAGE

49       This function is similar to mail::account::readMessageContent(3x), with
50       one difference: quoted-printable and base64 MIME content is
51       automatically decoded. The mail::callback::message::messageTextCallback
52       function receives the decoded, binary, content.
53

RETURN CODES

55       The application must wait until callback´s success or fail method is
56       invoked. The success method is invoked when this request is succesfully
57       processed. The fail method is invoked if this request cannot be
58       processed. The application must not destroy callback until either the
59       success or fail method is invoked.
60
61           Note
62           callback´s fail method may be invoked even after other callback
63           methods were invoked. This indicates that the request was partially
64           completed before the error was encountered.
65
66           Note
67           Multiple applications may have the same account and folder opened
68           at the same time. It is possible that a message referenced by this
69           request was already deleted by another application. Depending on
70           the underlying server implementation this will result in either a
71           failed request, invoking callback.fail, or the request completing
72           (callback.success invoked) but without invoking any callback
73           function that refer to the message.
74

SEE ALSO

76       mail::account::readMessageAttributes(3x),
77       mail::account::readMessageContent(3x).
78
79
80
81[FIXME: source]                   05/08/2010          MAIL::ACCOUNT::READM(3x)
Impressum