epoc32/include/app/cacheman.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/app/cacheman.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/app/cacheman.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,9 +1,9 @@
     1.4  // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5  // All rights reserved.
     1.6  // This component and the accompanying materials are made available
     1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// under the terms of "Eclipse Public License v1.0"
     1.9  // which accompanies this distribution, and is available
    1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12  //
    1.13  // Initial Contributors:
    1.14  // Nokia Corporation - initial contribution.
    1.15 @@ -11,178 +11,26 @@
    1.16  // Contributors:
    1.17  //
    1.18  // Description:
    1.19 +// CACHEMAN.H
    1.20  //
    1.21 -
    1.22 +/**
    1.23 + * @file 
    1.24 + * @publishedAll
    1.25 + * @released
    1.26 + */
    1.27  #if !defined (__CACHEMAN_H__)
    1.28  #define __CACHEMAN_H__
    1.29  
    1.30  #include <mentact.h>
    1.31  #include <msvstd.h>
    1.32  #include <msvapi.h>
    1.33 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS  
    1.34 +#include <cimprunemessage.h>
    1.35 +#include "cimfinder.h"
    1.36 +#endif
    1.37  
    1.38 -_LIT(KMiutWildCard, "*.*");
    1.39 -
    1.40 -class CImFinder : public CMsgActive
    1.41 -/**
    1.42 -@internalComponent
    1.43 -@released
    1.44 -*/
    1.45 -	{
    1.46 -public:
    1.47 -	IMPORT_C void FindFirstL(TMsvId aRootEntry, TRequestStatus &aStatus);
    1.48 -	IMPORT_C ~CImFinder();
    1.49 -	IMPORT_C virtual void FindNextL(TRequestStatus &aStatus);
    1.50 -	void FindFirstL(const CMsvEntrySelection& aInitialSelection, TRequestStatus &aStatus);
    1.51 -
    1.52 -	class CImEntryStack : public CBase
    1.53 -		{
    1.54 -	public:
    1.55 -		static CImEntryStack* NewL();
    1.56 -		~CImEntryStack();
    1.57 -		inline void PushL(TMsvId aId);
    1.58 -		inline TMsvId PopL();
    1.59 -		inline TBool Empty() const;
    1.60 -		inline void Reset();
    1.61 -
    1.62 -	private:
    1.63 -		void ConstructL();
    1.64 -
    1.65 -		CMsvEntrySelection* iFolders;
    1.66 -		};
    1.67 -
    1.68 -protected:
    1.69 -	void ConstructL();
    1.70 -	CImFinder(CMsvEntry& aEntry);
    1.71 -
    1.72 -private:
    1.73 -	void DoRunL();
    1.74 -
    1.75 -	virtual void AddChildEntriesL() = 0;
    1.76 -	virtual TBool IsRequiredEntryType(TUid aEntryType) const = 0;
    1.77 -
    1.78 -protected:
    1.79 -	CImEntryStack* iEntryStack;
    1.80 -	CMsvEntry& iCurrentEntry;
    1.81 -
    1.82 -private:
    1.83 -	enum TImmfState
    1.84 -		{
    1.85 -		EImmfEntryFound,
    1.86 -		EImmfFindingEntry,
    1.87 -		EImmfNothingFound
    1.88 -		};
    1.89 -
    1.90 -	TImmfState iState;
    1.91 -	};
    1.92 -
    1.93 -
    1.94 -class CImMessageFinder : public CImFinder
    1.95 -/**
    1.96 -@internalComponent
    1.97 -@released
    1.98 -*/
    1.99 -	{
   1.100 -public:
   1.101 -	IMPORT_C static CImMessageFinder* NewL(CMsvEntry& aEntry);
   1.102 -	IMPORT_C static CImMessageFinder* NewLC(CMsvEntry& aEntry);
   1.103 -	
   1.104 -protected:
   1.105 -	virtual void AddChildEntriesL();
   1.106 -	virtual TBool IsRequiredEntryType(TUid aEntryType) const;
   1.107 -
   1.108 -	CImMessageFinder(CMsvEntry& aEntry);
   1.109 -	};
   1.110 -
   1.111 -
   1.112 -class CImEntryFinder : public CImFinder
   1.113 -/**
   1.114 -@internalComponent
   1.115 -@released
   1.116 -*/
   1.117 -	{
   1.118 -public:
   1.119 -	IMPORT_C static CImEntryFinder* NewL(CMsvEntry& aEntry);
   1.120 -	IMPORT_C static CImEntryFinder* NewLC(CMsvEntry& aEntry);
   1.121 -	
   1.122 -protected:
   1.123 -	virtual void AddChildEntriesL();
   1.124 -	virtual TBool IsRequiredEntryType(TUid aEntryType) const;
   1.125 -
   1.126 -	CImEntryFinder(CMsvEntry& aEntry);
   1.127 -	};
   1.128 -
   1.129 -
   1.130 -class CImMessageCounter : public CImFinder
   1.131 -/**
   1.132 -@internalComponent
   1.133 -@released
   1.134 -*/
   1.135 -	{
   1.136 -public:
   1.137 -	IMPORT_C static CImMessageCounter* NewL(CMsvEntry& aEntry);
   1.138 -	IMPORT_C static CImMessageCounter* NewLC(CMsvEntry& aEntry);
   1.139 -	IMPORT_C TInt Count();
   1.140 -	
   1.141 -protected:
   1.142 -	virtual void AddChildEntriesL();
   1.143 -	virtual TBool IsRequiredEntryType(TUid aEntryType) const;
   1.144 -
   1.145 -	CImMessageCounter(CMsvEntry& aEntry);
   1.146 -
   1.147 -private:
   1.148 -	TInt iCount;
   1.149 -	};
   1.150 -
   1.151 -
   1.152 -class CImPruneMessage : public CMsgActive
   1.153 -/** Deletes the body text and attachment data from an individually specified message. 
   1.154 -
   1.155 -Example uses of this class are:
   1.156 -
   1.157 -1. to cleanup after a populating operation has failed
   1.158 -
   1.159 -2. to remove body text and attachment data from remote messages, while preserving 
   1.160 -the message structure 
   1.161 -@publishedPartner 
   1.162 -@released
   1.163 -*/
   1.164 -	{
   1.165 -public:
   1.166 -	IMPORT_C static CImPruneMessage* NewL(CMsvEntry& aEntry, RFs& aFs);
   1.167 -	IMPORT_C static CImPruneMessage* NewLC(CMsvEntry& aEntry, RFs& aFs);
   1.168 -
   1.169 -	IMPORT_C void StartL(TMsvId aMessageEntry, TRequestStatus &aStatus);
   1.170 -	~CImPruneMessage();
   1.171 -	
   1.172 -private:
   1.173 -	CImPruneMessage(CMsvEntry& aEntry, RFs& aFs);
   1.174 -	void ConstructL();
   1.175 -	void DoRunL();
   1.176 -	void DoComplete(TInt& );
   1.177 -	void DoCancel();
   1.178 -	void PruneEntryL();
   1.179 -	void ResetStoreL();
   1.180 -
   1.181 -private:
   1.182 -	enum TImPruningState
   1.183 -		{
   1.184 -		EImPruneUpdatingEntry,
   1.185 -		EImPruneUpdatingFirstEntry,
   1.186 -		EImPruneFindingEntry,
   1.187 -		EImPruneFindFirstEntry,
   1.188 -		EImPruneFindNextEntry
   1.189 -		};
   1.190 -
   1.191 -	TImPruningState iState;
   1.192 -
   1.193 -	CMsvEntry& iCurrentEntry;
   1.194 -	RFs& iFs;
   1.195 -	CImEntryFinder* iEntryFinder;
   1.196 -	CFileMan* iFileManager;
   1.197 -	TMsvId iRootEntryId;
   1.198 -	CMsvOperation* iChangeOperation;
   1.199 -	CMsvStore* iStore;
   1.200 -	};
   1.201 +class CImMessageFinder;
   1.202 +class CImMessageCounter;
   1.203  
   1.204  struct TImCacheManagerProgress
   1.205  /** Holds progress of a cache management cleanup operation.