Inherits Command
Returns message data (RFC 3501, section 6.4.5, extended by RFC 4551 and RFC 5257).
Our parser used to be slightly more permissive than the RFC. This is a bug (is it? why?), and many of the problems have been corrected (but not tested).
Creates a new handler for FETCH if u is false, or for UID FETCH if u is true.
Constructs a handler for the implicit fetch which is executed by ImapSession for flag updates, etc. If f is true the updates will include FLAGS sections and if a is true, ANNOTATION. The handler starts fetching those messagges in set that have a modseq greater than limit. The responses are sent via i.
If t is non-zero, the fetch operates within a subtransaction of t.
Returns the IMAP ANNOTATION production for the message with uid, from the point of view of u (0 for no user, only public annotations). entrySpecs is a list of the entries to be matched, each of which can contain the * and % wildcards. attributes is a list of attributes to be returned (each including the .priv or .shared suffix).
Returns either the IMAP BODY or BODYSTRUCTURE production for m. If extended is true, BODYSTRUCTURE is returned. If it's false, BODY.
This utility function fetches at least min, at most max characters, all of which must be a letter, a digit or a dot. Consecutive dots ARE allowed.
This helper enqueues q for execution, either directly of via a transaction.
Returns the IMAP envelope for m.
Returns a string containing all the flags that are set for the message with uid.
This dangerous function makes the Fetch handler forget (part of) what it knows about uid. If Fetch has processed uid to completion, then forget() frees up memory for other use. To be used only by ImapFetchResponse::setSent().
Returns the internaldate of m in IMAP format.
Emits a single FETCH response for the message m, which is trusted to have UID uid and MSN msn.
The message must have all necessary content.
Returns a pointer to the message with uid that this command has fetched or will fetch.
Parses the entries and attributes from an ANNOTATION fetch-att. Expects the cursor to be on the first parenthesis, and advances it to past the last one.
This helper is responsible for parsing a single attribute from the fetch arguments. If alsoMacro is true, this function parses a macro as well as a single attribute.
Parses a bodypart description - the bit following "body[" in an attribute. The cursor must be after '[' on entry, and is left after the trailing ']'.
If binary is true, the parsed section will be sent using the BINARY extension (RFC 3516). If not, it'll be sent using a normal BODY.
Parses a single RFC 4466 fetch-modifier. At the moment only RFC 4551 is supported.
Uses the ImapParser ip to parse a section-text production, and returns a pointer to a suitably constructed Section object. Upon return, the ImapParser's cursor is advanced to point past the end of the section-text. ip must not be 0; and the return value of this function is also guaranteed to be non-zero.
If binary is false (the default), then the BINARY extensions of RFC 3516 are summarily ignored.
If there were any parsing errors, Section::error will be non-empty.
Retrieves completed messages and builds ImapFetchResponse objects.
This function returns the text of that portion of the Message m that is described by the Section s. It is publicly available so that Append may use it for CATENATE.
Sends a query to retrieve all annotations.
Issues queries to resolve any questions this FETCH needs to answer.
Sends a query to retrieve all flags.
Sends a query to retrieve the modseq.
Returns the structure of the single-part bodypart mp.
If extended is true, extended BODYSTRUCTURE attributes are included.
This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.