|
||
class CImCacheManager : public CMsvOperation;
Provides management of the local cache of messages in remote mailboxes.
A mailbox that is being used in disconnected mode allows the user access to message data by opening the message directly from the remote mailbox. If the required message has been downloaded previously, then it will not necessarily need to be downloaded again. This functionality is achieved by preserving the message data locally, under the remote service entry. The preserved message data acts as a cache to allow the user access to the message without the need for it to be downloaded every time.
The cache management functionality is required to reduce the amount of memory that is consumed by the message cache. CImCacheManager provides a mechanism for asynchronously traversing a message tree and for removing text and attachment data from messages. Deleting more message data will free up more memory but there is a higher chance that a user will need to download a message for a second time.
CImCacheManager is an abstract base class, which can be specialised to implement a filter (CImCacheManager::Filter()const
) that decides if data for a message shoulded be deleted: for example, deletion could be restricted to 'all read messages
over a week old,' or, 'all read messages, over 20K in size which are also over a day old.'
CBase
-
Base class for all classes to be instantiated on the heap.
CActive
-
The core class of the active object abstraction.
CMsvOperation
- Defines an interface for use by objects which control asynchronous commands in t...
CImCacheManager
- Provides management of the local cache of messages in remote mailboxes.
Defined in CImCacheManager
:
CImCacheManager(CMsvSession &,TRequestStatus &)
Constructor.ConstructL()
Second phase constructor.DoCancel()
Implements the active object cancellation protocol for a cache cleanup operation...Filter()const
Tests if cache cleanup should be performed on a message entry.ProgressL()
Gets information on the progress of the operation.RunL()
Implements the active object completion protocol for a cache cleanup operation.StartL(TMsvId,TRequestStatus &)
Performs a recursive cache cleanup starting from a specified root entry.StartL(const CMsvEntrySelection &,TRequestStatus &)
Performs a recursive cache cleanup for a specified selection of root entries.iCurrentEntry
Message entry currently being processed. ~CImCacheManager()
Destructor.Inherited from CActive
:
CActive(TInt)
Constructs the active object with the specified priority.Cancel()
Cancels the wait for completion of an outstanding request.Deque()
Removes the active object from the active scheduler's list of active objects.EPriorityHigh
A priority higher than EPriorityUserInput.EPriorityIdle
A low priority, useful for active objects representing background processing.EPriorityLow
A priority higher than EPriorityIdle but lower than EPriorityStandard.EPriorityStandard
Most active objects will have this priority.EPriorityUserInput
A priority higher than EPriorityStandard; useful for active objects handling use...IsActive()const
Determines whether the active object has a request outstanding.IsAdded()const
Determines whether the active object has been added to the active scheduler's li...Priority()const
Gets the priority of the active object.RunError(TInt)
Handles a leave occurring in the request completion event handler CActive::RunL(...SetActive()
Indicates that the active object has issued a request and that it is now outstan...SetPriority(TInt)
Sets the priority of the active object.TPriority
Defines standard priorities for active objects. iStatus
The request status associated with an asynchronous request.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from CMsvOperation
:
CMsvOperation(CMsvSession &,TInt,TRequestStatus &)
Constructor. This is called by MTM implementers from the derived class construct...Extension_(TUint,TAny *&,TAny *)
The extension method provides a polymorphic behaviour to call the correct System...FinalProgress()
Gets information about a completed operation.Id()const
Gets the operation ID.Mtm()const
Gets the UID of the MTM associated with the operation.Service()const
Gets the ID of the service that is associated with this operation.SystemProgress(TMsvSystemProgress &)
This call leads to calling CMsvOperation::SystemProgress(TMsvSystemProgress &...iMsvSession
Message Server session used by object. This is set by the constructor. iMtm
The UID of the MTM associated with the operation.iObserverRequestStatus
Request status of the operation observer.iService
The ID of the service that is associated with this operation.protected: IMPORT_C void ConstructL();
Second phase constructor.
All classes derived from CImCacheManager must call this function before CImCacheManager::StartL(TMsvId,TRequestStatus &)
is called.
protected: IMPORT_C CImCacheManager(CMsvSession &aSession, TRequestStatus &aObserverRequestStatus);
Constructor.
|
IMPORT_C void StartL(TMsvId aRootEntry, TRequestStatus &aStatus);
Performs a recursive cache cleanup starting from a specified root entry.
Cached data for entries below the specified root are cleaned-up if they meet the criteria specified by the implementation
of CImCacheManager::Filter()const
.
|
IMPORT_C void StartL(const CMsvEntrySelection &aSelection, TRequestStatus &aStatus);
Performs a recursive cache cleanup for a specified selection of root entries.
Cached data for entries below the specified roots are cleaned-up if they meet the criteria specified by the implementation
of CImCacheManager::Filter()const
.
|
IMPORT_C virtual const TDesC8& ProgressL();
Gets information on the progress of the operation.
|
IMPORT_C virtual void DoCancel();
Implements the active object cancellation protocol for a cache cleanup operation.
As the cache manager is an active object, a cache cleanup operation started by Start() can be cancelled using CActive::Cancel()
.
Cancellation halts any further deletion of message data, but does not restore any data that has already been deleted by the cleanup operation.
CActive::Cancel()
Cancels the wait for completion of an outstanding request.protected: IMPORT_C virtual void RunL();
Implements the active object completion protocol for a cache cleanup operation.
CActive::RunL()
Handles an active object's request completion event.private: virtual TBool Filter() const=0;
Tests if cache cleanup should be performed on a message entry.
After CImCacheManager::StartL(TMsvId,TRequestStatus &)
has been called, this is called once for each message entry. It should return true if the body text and attachment data belonging
to the current message, as held in iCurrentEntry, should be deleted, or false if the message should be left unchanged.
This function must be implemented in any classes derived from CImCacheManager.
|
protected: CMsvEntry * iCurrentEntry;
Message entry currently being processed.