1mail::account::readMessmaagielC:o:natcecnotuDnetmcaoNidalet:di:(va3ecxc)AoPuIntr:e:freeraednMceessageContentDecoded(3x)
2
3
4

NAME

6       mail::account::readMessageContentDecoded  -  Read  decoded message con‐
7       tents
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       mail::account *account;
41
42
43
44       account->readMessageContentDecoded  (size_t  messageNum,   bool   peek,
45       mail::mimestruct  &msgInfo, bool justHeader, bool justContents, myCall‐
46       backMessage &callback);
47

USAGE

49       This function is similar to mail::account::readMessageContent(3x), with
50       one  difference:  quoted-printable and base64 MIME content is automati‐
51       cally decoded.  The mail::callback::message::messageTextCallback  func‐
52       tion 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  succes‐
57       fully  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:  callback's  fail  method  may be invoked even after other
62              callback methods were invoked.  This indicates that the  request
63              was partially completed before the error was encountered.
64
65              Note: Multiple applications may have the same account and folder
66              opened at the same time.  It is possible that a  message  refer‐
67              enced  by  this  request was already deleted by another applica‐
68              tion.  Depending on the underlying  server  implementation  this
69              will  result in either a failed request, invoking callback.fail,
70              or the request completing (callback.success invoked) but without
71              invoking any callback function that refer to the message.
72

SEE ALSO

74       mail::account::readMessageAttributes(3x),   mail::account::readMessage‐
75       Content(3x).
76
77
78
79                                 10maAiplr:i:lac2c0o0u6nt::readMessageContentDecoded(3x)
Impressum