epoc32/include/app/cacheman.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
--- a/epoc32/include/app/cacheman.h	Wed Mar 31 12:27:01 2010 +0100
+++ b/epoc32/include/app/cacheman.h	Wed Mar 31 12:33:34 2010 +0100
@@ -1,9 +1,9 @@
 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
-// 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
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
-// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
 // Initial Contributors:
 // Nokia Corporation - initial contribution.
@@ -11,178 +11,26 @@
 // Contributors:
 //
 // Description:
+// CACHEMAN.H
 //
-
+/**
+ * @file 
+ * @publishedAll
+ * @released
+ */
 #if !defined (__CACHEMAN_H__)
 #define __CACHEMAN_H__
 
 #include <mentact.h>
 #include <msvstd.h>
 #include <msvapi.h>
-
-_LIT(KMiutWildCard, "*.*");
-
-class CImFinder : public CMsgActive
-/**
-@internalComponent
-@released
-*/
-	{
-public:
-	IMPORT_C void FindFirstL(TMsvId aRootEntry, TRequestStatus &aStatus);
-	IMPORT_C ~CImFinder();
-	IMPORT_C virtual void FindNextL(TRequestStatus &aStatus);
-	void FindFirstL(const CMsvEntrySelection& aInitialSelection, TRequestStatus &aStatus);
-
-	class CImEntryStack : public CBase
-		{
-	public:
-		static CImEntryStack* NewL();
-		~CImEntryStack();
-		inline void PushL(TMsvId aId);
-		inline TMsvId PopL();
-		inline TBool Empty() const;
-		inline void Reset();
-
-	private:
-		void ConstructL();
-
-		CMsvEntrySelection* iFolders;
-		};
-
-protected:
-	void ConstructL();
-	CImFinder(CMsvEntry& aEntry);
-
-private:
-	void DoRunL();
-
-	virtual void AddChildEntriesL() = 0;
-	virtual TBool IsRequiredEntryType(TUid aEntryType) const = 0;
-
-protected:
-	CImEntryStack* iEntryStack;
-	CMsvEntry& iCurrentEntry;
-
-private:
-	enum TImmfState
-		{
-		EImmfEntryFound,
-		EImmfFindingEntry,
-		EImmfNothingFound
-		};
-
-	TImmfState iState;
-	};
-
-
-class CImMessageFinder : public CImFinder
-/**
-@internalComponent
-@released
-*/
-	{
-public:
-	IMPORT_C static CImMessageFinder* NewL(CMsvEntry& aEntry);
-	IMPORT_C static CImMessageFinder* NewLC(CMsvEntry& aEntry);
-	
-protected:
-	virtual void AddChildEntriesL();
-	virtual TBool IsRequiredEntryType(TUid aEntryType) const;
-
-	CImMessageFinder(CMsvEntry& aEntry);
-	};
-
+#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS  
+#include <cimprunemessage.h>
+#include "cimfinder.h"
+#endif
 
-class CImEntryFinder : public CImFinder
-/**
-@internalComponent
-@released
-*/
-	{
-public:
-	IMPORT_C static CImEntryFinder* NewL(CMsvEntry& aEntry);
-	IMPORT_C static CImEntryFinder* NewLC(CMsvEntry& aEntry);
-	
-protected:
-	virtual void AddChildEntriesL();
-	virtual TBool IsRequiredEntryType(TUid aEntryType) const;
-
-	CImEntryFinder(CMsvEntry& aEntry);
-	};
-
-
-class CImMessageCounter : public CImFinder
-/**
-@internalComponent
-@released
-*/
-	{
-public:
-	IMPORT_C static CImMessageCounter* NewL(CMsvEntry& aEntry);
-	IMPORT_C static CImMessageCounter* NewLC(CMsvEntry& aEntry);
-	IMPORT_C TInt Count();
-	
-protected:
-	virtual void AddChildEntriesL();
-	virtual TBool IsRequiredEntryType(TUid aEntryType) const;
-
-	CImMessageCounter(CMsvEntry& aEntry);
-
-private:
-	TInt iCount;
-	};
-
-
-class CImPruneMessage : public CMsgActive
-/** Deletes the body text and attachment data from an individually specified message. 
-
-Example uses of this class are:
-
-1. to cleanup after a populating operation has failed
-
-2. to remove body text and attachment data from remote messages, while preserving 
-the message structure 
-@publishedPartner 
-@released
-*/
-	{
-public:
-	IMPORT_C static CImPruneMessage* NewL(CMsvEntry& aEntry, RFs& aFs);
-	IMPORT_C static CImPruneMessage* NewLC(CMsvEntry& aEntry, RFs& aFs);
-
-	IMPORT_C void StartL(TMsvId aMessageEntry, TRequestStatus &aStatus);
-	~CImPruneMessage();
-	
-private:
-	CImPruneMessage(CMsvEntry& aEntry, RFs& aFs);
-	void ConstructL();
-	void DoRunL();
-	void DoComplete(TInt& );
-	void DoCancel();
-	void PruneEntryL();
-	void ResetStoreL();
-
-private:
-	enum TImPruningState
-		{
-		EImPruneUpdatingEntry,
-		EImPruneUpdatingFirstEntry,
-		EImPruneFindingEntry,
-		EImPruneFindFirstEntry,
-		EImPruneFindNextEntry
-		};
-
-	TImPruningState iState;
-
-	CMsvEntry& iCurrentEntry;
-	RFs& iFs;
-	CImEntryFinder* iEntryFinder;
-	CFileMan* iFileManager;
-	TMsvId iRootEntryId;
-	CMsvOperation* iChangeOperation;
-	CMsvStore* iStore;
-	};
+class CImMessageFinder;
+class CImMessageCounter;
 
 struct TImCacheManagerProgress
 /** Holds progress of a cache management cleanup operation.