Inherits Command. Inherited by Sort.
Finds messages matching some criteria (RFC 3501 section 6.4.4)
The entirety of the basic syntax is handled, as well as ESEARCH (RFC 4731 and RFC 4466) and parts of CONDSTORE (RFC 4551). SEARCHM probably will need to be implemented as a subclass of Search.
Searches are first run against the RAM cache, rudimentarily. If the comparison is difficult, expensive or unsuccessful, it gives up and uses the database.
If ESEARCH with only MIN, only MAX or only COUNT is used, we could generate better SQL than we do. Let's do that optimisation when a client benefits from it.
Constructs an empty Search. If u is true, it's a UID SEARCH, otherwise it's the MSN variety.
Considers whether this search can and should be solved using this cache, and if so, finds all the matches.
Parses the IMAP date production and returns the string (sans quotes). Month names are case-insensitive; RFC 3501 is not entirely clear about that.
Parse one search key (IMAP search-key) and returns a pointer to the corresponding Selector. Leaves the cursor on the first character following the search-key.
Returns the root Selector constructed while parsing this Search command.
Sends the ESEARCH response.
Calls either sendSearchResponse or sendEsearchResponse(), whichever is appropriate.
Sends the SEARCH response.
This reimplementation of Command::set() simplifies the set by including messages that don't exist. parseMsns is as for Command::set().
Reimplements Command::set().
This helper function is called by the parser to set the CHARSET for this search to s.
Reads an argument of type stringType (which may be AString, NString, or PlainString) and returns it as unicode, using the charset specified in the CHARSET argument to SEARCH.
This web page based on source code belonging to Oryx Mail Systems GmbH. All rights reserved.