This class provides access to the components of an IMAP URL. It is meant for use by URLAUTH and CATENATE. Since those august extensions only permit URLs that refer to a message or part therein, this code does not recognise any of the less-specific forms at present. Both absolute and relative URLs are supported.
Creates a new ImapUrl object to represent the IMAP URL s. The URL must be absolute (i.e., begin with "imap://").
Creates a new ImapUrl object to represent the IMAP URL s. The URL must be relative, and is interpreted in the context of the specified imap object. If a session has not been established, the URL must specify a mailbox; but otherwise, the currently-selected mailbox is used as a part of the base.
This behaviour is intended to serve the needs of CATENATE.
Returns the "access" part of the URLAUTH specified for this URL, or an empty string if none was specified.
Returns the "AUTH" specification from this URL, or an empty string if none was specified.
Returns a pointer to a Date representing the specified expiry date for this URL, or 0 if no EXPIRE=date-time was specified.
Returns the hostname from this URL. (This function makes no allowance for relative URLs, because it's not needed yet.)
Returns true if this URL is an "authimapurlrump", i.e. it specifies ";URLAUTH=access", but does not include a mechanism name or URLAUTH token. Returns false otherwise, including for URLs that are invalid.
Returns the name of the mailbox from this URL. The mailbox is either specified explicitly in the URL, or, if an IMAP session exists, and no mailbox has been specified, from the currently selected mailbox.
Returns the name of the authorization mechanism specified for this URL, or an empty string if no URLAUTH was specified.
Returns the unmodified original input passed to the ImapUrl constructor, without regard to whether the URL is valid() or not.
Returns the port number specified in this URL.
Returns only the rump of this URL (see RFC 4467), or an empty string if the rump is not meaningfully defined.
Returns the message section part specified in this URL, or an empty string if no section was specified (in which case the URL refers to an entire message).
Returns the message UID specified in this URL.
Returns the mailbox UIDVALIDITY specified in this URL.
Returns the URLAUTH token specified for this URL, or an empty string if no URLAUTH was specified.
Returns a pointer to the User object representing the user specified in the "iuserauth" portion of this URL, or 0 if none was specified. For relative URLs, which are interpreted with reference to a given IMAP object, this function returns the current IMAP user.
Returns true if the URL given to the constructor is syntactically valid, and false otherwise.
This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.