Main Page | Class Hierarchy | Class List | Class Members

SearchResponse Class Reference

Inheritance diagram for SearchResponse:

Response List of all members.

Detailed Description

SearchResponse is a class that represents an IMAP4 SEARCH response. The server sends a SEARCH response in response to a SEARCH command. The SEARCH response usually includes a list of message sequence numbers for messages that match the search criteria. If the SEARCH response is sent in response to a UID SEARCH command, then the SEARCH response contains a list of message UIDs (unique identifiers) instead of message sequence numbers.

See also:
Imap4Client::Search

Imap4Client::UidSearch


Public Member Functions

 SearchResponse ()
 Default constructor.
 SearchResponse (const SearchResponse &other)
 Copy constructor.
virtual ~SearchResponse ()
 Destructor.
SearchResponseoperator= (const SearchResponse &other)
 Assignment operator.
unsigned NumMatches () const
 Returns number of matches.
uint32_t Match (unsigned index) const
 Returns match at the specified position.
void SetParams (const char *s)
 Sets parameters for the response.


Constructor & Destructor Documentation

SearchResponse  ) 
 

Default constructor.

SearchResponse const SearchResponse other  ) 
 

Copy constructor.

Parameters:
other other object to copy

~SearchResponse  )  [virtual]
 

Destructor.


Member Function Documentation

uint32_t Match unsigned  index  )  const
 

Returns the message sequence number or message UID of a matching message at the specified position. The value of the index argument must satisfy the bounds 0 <= index < NumMatches(). If the response is sent in response to a SEARCH command, then the matches are message sequence numbers. If, instead, the response is sent in response to a UID SEARCH command, then the matches are message UIDs.

Parameters:
index position of the match to return
Returns:
message sequence number or UID of the match

unsigned NumMatches  )  const
 

Returns the number of matches.

Returns:
number of matches

SearchResponse & operator= const SearchResponse other  ) 
 

Assignment operator.

Parameters:
other other object to copy
Returns:
*this

void SetParams const char *  str  ) 
 

Sets parameters for the response.

Only the parser should call this function.

Parameters:
str string that contains unparsed parameters

Copyright © 2001-2005 Hunny Software, Inc. All rights reserved.