#include <mw/msvfind.h>
class CMsvFindOperation : public CMsvOperation, public CMsvOperation |
Public Member Functions | |
---|---|
~CMsvFindOperation() | |
virtual IMPORT_C const TDesC8 & | FinalProgress() |
IMPORT_C CMsvFindOperation * | FindInChildrenL(CMsvSession &, const TDesC &, TMsvId, TMsvPartList, TRequestStatus &) |
IMPORT_C CMsvFindOperation * | FindInSelectionL(CMsvSession &, const TDesC &, const CMsvEntrySelection &, TMsvPartList, TRequestStatus &) |
const CMsvFindResultSelection & | GetFindResult() |
virtual IMPORT_C const TDesC8 & | ProgressL() |
Protected Member Functions | |
---|---|
CMsvFindOperation(CMsvSession &, const TDesC &, TMsvPartList, TRequestStatus &) | |
IMPORT_C void | ConstructFindInChildrenL(TMsvId) |
IMPORT_C void | ConstructFindInSelectionL(const CMsvEntrySelection &) |
Inherited Attributes | |
---|---|
CActive::iStatus | |
CMsvOperation::iMsvSession | |
CMsvOperation::iMtm | |
CMsvOperation::iObserverRequestStatus | |
CMsvOperation::iService |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Encapsulates a text search operation.
The class offers an interface for locating messages which contain specified text. Messages may contain data created for, or received from, any of the transport protocols that are supported by the Messaging Architecture (e.g. Email, FAX and SMS).
Clients create a new instance for each search operation to be performed. They are also responsible for destroying the instance once a search operation is complete.
Clients can derive from this class, typically to implement their own version of the function IsValid().
IMPORT_C | CMsvFindOperation | ( | CMsvSession & | aSession, |
const TDesC & | aTextToFind, | |||
TMsvPartList | aPartList, | |||
TRequestStatus & | aObserverRequestStatus | |||
) | [protected] |
Constructor, specifying search parameters.
Parameters | |
---|---|
aSession | An open session with the Message Server |
aTextToFind | The text to be found. The length of the text to be found must not be greater than KMsvMaxFindTextLength. |
aPartList | The parts of the messages which are to be searched. |
aObserverRequestStatus | Request status of an observer to signal when the search is complete. |
Panic Codes | |
---|---|
MSGS | 306 aTextToFind is longer than KMsvMaxFindTextLength (debug builds only). In release builds, a USER 11 panic will occur. |
IMPORT_C void | ConstructFindInChildrenL | ( | TMsvId | aId | ) | [protected] |
Second phase constructor, for constructing a search of an entry and of all its children.
Parameters | |
---|---|
aId | The entry Id of the root, folder or service to search |
IMPORT_C void | ConstructFindInSelectionL | ( | const CMsvEntrySelection & | aSelection | ) | [protected] |
Second phase constructor, for constructing a search of a specified selection of messages.
Parameters | |
---|---|
aSelection | A selection of messages to search. |
Panic Codes | |
---|---|
MSGS | 258 The selection is empty |
IMPORT_C const TDesC8 & | FinalProgress | ( | ) | [virtual] |
Reimplemented from CMsvOperation::FinalProgress()
Returns progress information after the search operation is complete.
The function returns the same information as ProgressL() but can only be called after the search operation is complete. The function raises a MSGS 285 panic if it is called while the search operation is still in progress.
IMPORT_C CMsvFindOperation * | FindInChildrenL | ( | CMsvSession & | aSession, |
const TDesC & | aTextToFind, | |||
TMsvId | aParentId, | |||
TMsvPartList | aPartList, | |||
TRequestStatus & | aObserverRequestStatus | |||
) | [static] |
Creates a new search operation to search for text within a specified root, folder or service.
Searching for messages is done recursively through all child services and folders. All messages found are searched for text.
Parameters | |
---|---|
aSession | An open session with the Message Server. |
aTextToFind | The text to be found. The length of the text to be found must not be greater than KMsvMaxFindTextLength, otherwise the function raises a MSGS 306 panic. |
aParentId | The entry Id of the root, a folder or a service. If this is the Id of the root entry, then all messages stored in the message store on the Symbian OS phone are searched. The function leaves with the KErrArgument code if this is neither the entry Id of the root, nor a folder nor a service. |
aPartList | The parts of the messages which are to be searched. |
aObserverRequestStatus | The request status object. This is set when the search operation is complete. The is set to: KErrNone, if the search operation completes successfully. |
IMPORT_C CMsvFindOperation * | FindInSelectionL | ( | CMsvSession & | aSession, |
const TDesC & | aTextToFind, | |||
const CMsvEntrySelection & | aSelection, | |||
TMsvPartList | aPartList, | |||
TRequestStatus & | aObserverRequestStatus | |||
) | [static] |
Creates a new search operation to search for text within a specified selection of messages.
The function leaves with the KErrArgument code if the first entry in the selection is not recognised as a message.
Parameters | |
---|---|
aSession | An open session with the Message Server. |
aTextToFind | The text to be found. The length of the text to be found must not be greater than KMsvMaxFindTextLength, otherwise the function raises a MSGS 306 panic. |
aSelection | A selection of messages to search. The function raises a MSGS 258 panic if the selection is empty (i.e. there are zero messages in the selection). |
aPartList | The parts of the messages which are to be searched. |
aObserverRequestStatus | The request status object. This is set when the search operation is complete. The is set to: KErrNone, if the search operation completes successfully. KErrArgument, if any of the entries in the selection, apart from the first, cannot be recognised as a message. |
const CMsvFindResultSelection & | GetFindResult | ( | ) | const [inline] |
IMPORT_C const TDesC8 & | ProgressL | ( | ) | [virtual] |
Reimplemented from CMsvOperation::ProgressL()
Returns progress information.
Progress information supplies sufficient data to drive a progress gauge for the text search operation and also identifies the message currently being searched. It does not provide any information about the search progress within a message.