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

NAME

8       mail::account::readMessageContentDecoded - Read decoded message
9       contents
10

SYNOPSIS

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

USAGE

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

RETURN CODES

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

SEE ALSO

78       mail::account::readMessageAttributes(3x),
79       mail::account::readMessageContent(3x).
80

AUTHOR

82       Sam Varshavchik
83
84
85
86ConeĀ©                             08/25/2016          MAIL::ACCOUNT::READM(3x)
Impressum