epoc32/include/s32stor.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
#if !defined(__S32STOR_H__)
williamr@2
    17
#define __S32STOR_H__
williamr@2
    18
#if !defined(__S32STD_H__)
williamr@2
    19
#include <s32std.h>
williamr@2
    20
#endif
williamr@2
    21
#if !defined(__S32SHARE_H__)
williamr@2
    22
#include <s32share.h>
williamr@2
    23
#endif
williamr@2
    24
#if !defined(__S32PAGE_H__)
williamr@2
    25
#include <s32page.h>
williamr@2
    26
#endif
williamr@2
    27
williamr@2
    28
class MIncrementalCollector;
williamr@2
    29
/**
williamr@2
    30
 * @publishedAll 
williamr@2
    31
 * @released
williamr@2
    32
 * Provides the core abstract framework for stores allowing streams to be 
williamr@2
    33
created and manipulated.  
williamr@2
    34
*/
williamr@2
    35
class CStreamStore : public CBase
williamr@2
    36
	{
williamr@2
    37
public:
williamr@2
    38
	inline TStreamId ExtendL();
williamr@2
    39
	IMPORT_C void Delete(TStreamId anId);
williamr@2
    40
	IMPORT_C void DeleteL(TStreamId anId);
williamr@2
    41
//
williamr@2
    42
	IMPORT_C TInt Commit();
williamr@2
    43
	inline void CommitL();
williamr@2
    44
	IMPORT_C void Revert();
williamr@2
    45
	inline void RevertL();
williamr@2
    46
//
williamr@2
    47
	IMPORT_C TInt ReclaimL();
williamr@2
    48
	IMPORT_C TInt CompactL();
williamr@2
    49
private:
williamr@2
    50
	virtual IMPORT_C TStreamId DoExtendL();
williamr@2
    51
	virtual IMPORT_C void DoDeleteL(TStreamId anId);
williamr@2
    52
	
williamr@2
    53
	/** Opens the requested stream for reading. The function should return a 
williamr@2
    54
	stream buffer positioned at the beginning of this stream.
williamr@2
    55
	
williamr@2
    56
	This function is called by the OpenL() and OpenLC() member functions of 
williamr@2
    57
	RStoreReadStream.
williamr@2
    58
	
williamr@2
    59
	@param anId The stream to be read.
williamr@2
    60
	@return A stream buffer positioned at the beginning of the stream to be read.
williamr@2
    61
	@see RStoreReadStream::OpenL()
williamr@2
    62
	@see RStoreReadStream::OpenLC() */
williamr@2
    63
	virtual MStreamBuf* DoReadL(TStreamId anId) const=0;
williamr@2
    64
	
williamr@2
    65
	/** Creates a new stream in the store. The function gets the allocated 
williamr@2
    66
	stream id in the anId parameter. A stream buffer for the stream should be 
williamr@2
    67
	returned, ready to write into the new stream. This provides the 
williamr@2
    68
	implementation for the RStoreWriteStream::CreateL() functions.
williamr@2
    69
	
williamr@2
    70
	@param anId On return, contains the allocated stream id.
williamr@2
    71
	@return The stream buffer to be written to. */
williamr@2
    72
	virtual MStreamBuf* DoCreateL(TStreamId& anId)=0;
williamr@2
    73
	virtual IMPORT_C MStreamBuf* DoWriteL(TStreamId anId);
williamr@2
    74
	virtual IMPORT_C MStreamBuf* DoReplaceL(TStreamId anId);
williamr@2
    75
	virtual IMPORT_C void DoCommitL();
williamr@2
    76
	virtual IMPORT_C void DoRevertL();
williamr@2
    77
	virtual IMPORT_C MIncrementalCollector* DoReclaimL();
williamr@2
    78
	virtual IMPORT_C MIncrementalCollector* DoCompactL();
williamr@2
    79
private:
williamr@2
    80
	friend class RStoreReadStream;
williamr@2
    81
	friend class RStoreWriteStream;
williamr@2
    82
	friend class RStoreReclaim;
williamr@2
    83
	};
williamr@2
    84
williamr@2
    85
/**
williamr@2
    86
 * @publishedAll 
williamr@2
    87
 * @released
williamr@2
    88
 * Persistent store abstract base class. It provides the behaviour for setting 
williamr@2
    89
and retrieving the root stream id.
williamr@2
    90
williamr@2
    91
Before closing a persistent store, the root stream id must be set. After opening 
williamr@2
    92
a persistent store, the first thing done is to look up the root stream id. 
williamr@2
    93
The root stream can then be opened and data read from the store.
williamr@2
    94
williamr@2
    95
@see CFileStore  
williamr@2
    96
*/
williamr@2
    97
class CPersistentStore : public CStreamStore
williamr@2
    98
	{
williamr@2
    99
public:
williamr@2
   100
	inline TStreamId Root() const;
williamr@2
   101
	inline void SetRootL(TStreamId anId);
williamr@2
   102
protected:
williamr@2
   103
	inline CPersistentStore();
williamr@2
   104
private:
williamr@2
   105
	virtual IMPORT_C void DoSetRootL(TStreamId anId);
williamr@2
   106
protected:
williamr@2
   107
	TStreamId iRoot;
williamr@2
   108
	};
williamr@2
   109
williamr@2
   110
/**
williamr@2
   111
 * @publishedAll 
williamr@2
   112
 * @released
williamr@2
   113
 * Performs space reclamation or compaction on a permanent file store in 
williamr@2
   114
incremental steps.
williamr@2
   115
williamr@2
   116
Reclaiming unused space makes it available for re-use by the store. Compacting 
williamr@2
   117
makes unused space available for re-use by the relevant system pool — for 
williamr@2
   118
example, the filing system in the case of file-based stores.
williamr@2
   119
williamr@2
   120
Once compaction is complete, the store must be committed.
williamr@2
   121
williamr@2
   122
Notes:
williamr@2
   123
williamr@2
   124
Space reclamation and compaction are only supported by the file store 
williamr@2
   125
CPermanentFileStore and are not supported by embedded or direct file stores. 
williamr@2
   126
williamr@2
   127
Use active objects when implementing space reclamation or compaction 
williamr@2
   128
asynchronously.
williamr@2
   129
williamr@2
   130
This class performs incremental compaction/reclamation. These operations can 
williamr@2
   131
be performed in a possibly long running single step using CStreamStore 
williamr@2
   132
functions.  
williamr@2
   133
*/
williamr@2
   134
class RStoreReclaim
williamr@2
   135
	{
williamr@2
   136
public:
williamr@2
   137
	inline RStoreReclaim();
williamr@2
   138
	IMPORT_C void OpenL(CStreamStore& aStore,TInt& aCount);
williamr@2
   139
	IMPORT_C void OpenLC(CStreamStore& aStore,TInt& aCount);
williamr@2
   140
	IMPORT_C void CompactL(CStreamStore& aStore,TInt& aCount);
williamr@2
   141
	IMPORT_C void CompactLC(CStreamStore& aStore,TInt& aCount);
williamr@2
   142
	inline void Close();
williamr@2
   143
	IMPORT_C void Release();
williamr@2
   144
//
williamr@2
   145
	IMPORT_C void ResetL(TInt& aCount);
williamr@2
   146
	IMPORT_C void NextL(TInt& aStep);
williamr@2
   147
	IMPORT_C void Next(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus);
williamr@2
   148
	IMPORT_C void NextL(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus);
williamr@2
   149
	IMPORT_C TInt Next(TInt& aStep);
williamr@2
   150
//
williamr@2
   151
	inline TInt Available() const;
williamr@2
   152
private:
williamr@2
   153
	MIncrementalCollector* iCol;
williamr@2
   154
	TPckgBuf<TInt> iAvail;
williamr@2
   155
	};
williamr@2
   156
williamr@2
   157
/**
williamr@2
   158
 * @publishedAll 
williamr@2
   159
 * @released
williamr@2
   160
 * Encapsulates an embedded store. 
williamr@2
   161
williamr@2
   162
The embedded store may contain an arbitrarily complex network of streams, 
williamr@2
   163
but is viewed as simply another stream by the embedding store. This means 
williamr@2
   164
that the embedded store can dealt with as a single stream for purposes of 
williamr@2
   165
copying or deleting.
williamr@2
   166
williamr@2
   167
Once streams within the embedded store have been committed and closed, they 
williamr@2
   168
cannot subsequently be changed, i.e. streams cannot be replaced, deleted, 
williamr@2
   169
extended or changed in any way. 
williamr@2
   170
williamr@2
   171
@see CPersistentStore  
williamr@2
   172
*/
williamr@2
   173
class CEmbeddedStore : public CPersistentStore
williamr@2
   174
	{
williamr@2
   175
public:
williamr@2
   176
	IMPORT_C static CEmbeddedStore* FromL(RReadStream& aHost);
williamr@2
   177
	IMPORT_C static CEmbeddedStore* FromLC(RReadStream& aHost);
williamr@2
   178
	IMPORT_C static CEmbeddedStore* NewL(RWriteStream& aHost);
williamr@2
   179
	IMPORT_C static CEmbeddedStore* NewLC(RWriteStream& aHost);
williamr@2
   180
//
williamr@2
   181
	inline static TStreamPos Position(TStreamId anId);
williamr@2
   182
//
williamr@2
   183
	IMPORT_C void Detach();
williamr@2
   184
	inline void Reattach(MStreamBuf* aHost);
williamr@2
   185
	inline MStreamBuf* Host() const;
williamr@2
   186
	inline TStreamPos Start() const;
williamr@2
   187
//
williamr@2
   188
	IMPORT_C CEmbeddedStore(MStreamBuf* aHost);
williamr@2
   189
	IMPORT_C void MarshalL(RReadStream& aStream);
williamr@2
   190
	IMPORT_C void ConstructL(RWriteStream& aStream);
williamr@2
   191
	IMPORT_C ~CEmbeddedStore();
williamr@2
   192
protected:
williamr@2
   193
	IMPORT_C MStreamBuf* DoReadL(TStreamId anId) const;
williamr@2
   194
	IMPORT_C MStreamBuf* DoCreateL(TStreamId& anId);
williamr@2
   195
private:
williamr@2
   196
	IMPORT_C void DoSetRootL(TStreamId anId);
williamr@2
   197
	IMPORT_C void DoCommitL();
williamr@2
   198
//
williamr@2
   199
	static CEmbeddedStore* DoNewLC(MStreamBuf* aHost);
williamr@2
   200
private:
williamr@2
   201
	__MUTABLE TStreamExchange iHost;
williamr@2
   202
	TStreamPos iStart;
williamr@2
   203
	};
williamr@2
   204
williamr@2
   205
/**
williamr@2
   206
 * @publishedAll 
williamr@2
   207
 * @released
williamr@2
   208
 * Dictionary store interface.
williamr@2
   209
williamr@2
   210
This is an abstract class which provides the necessary interface for using 
williamr@2
   211
concrete dictionary stores.
williamr@2
   212
williamr@2
   213
A dictionary store is a store where a stream is accessed by UID (TUid), rather 
williamr@2
   214
than directly by stream id (TStreamId).
williamr@2
   215
williamr@2
   216
This type of store contains streams in the usual way but, in addition, the 
williamr@2
   217
root stream is a stream dictionary. The stream dictionary provides a list 
williamr@2
   218
of two-way associations between unique identifiers and stream ids.
williamr@2
   219
williamr@2
   220
Note that a dictionary store object does not derive from CStreamStore, but 
williamr@2
   221
owns a persistent store and a stream dictionary as part of its implementation.
williamr@2
   222
williamr@2
   223
@see CStreamDictionary
williamr@2
   224
@see CPersistentStore
williamr@2
   225
@see CDictionaryFileStore
williamr@2
   226
@see TUid
williamr@2
   227
@see TStreamId  
williamr@2
   228
*/
williamr@2
   229
class CDictionaryStore : public CBase
williamr@2
   230
	{
williamr@2
   231
public:
williamr@2
   232
	IMPORT_C TBool IsNullL() const;
williamr@2
   233
	IMPORT_C TBool IsPresentL(TUid aUid) const;
williamr@2
   234
	IMPORT_C void Remove(TUid aUid);
williamr@2
   235
	IMPORT_C void RemoveL(TUid aUid);
williamr@2
   236
//
williamr@2
   237
	IMPORT_C TInt Commit();
williamr@2
   238
	IMPORT_C void CommitL();
williamr@2
   239
	IMPORT_C void Revert();
williamr@2
   240
	IMPORT_C void RevertL();
williamr@2
   241
//
williamr@2
   242
	IMPORT_C ~CDictionaryStore();
williamr@2
   243
protected:
williamr@2
   244
	IMPORT_C void ConstructL();
williamr@2
   245
private:
williamr@2
   246
	CStreamDictionary* DictionaryL() const;
williamr@2
   247
	MStreamBuf* GetSourceL(TUid aUid) const;
williamr@2
   248
	MStreamBuf* GetSinkL(TUid aUid);
williamr@2
   249
protected:
williamr@2
   250
	CPersistentStore* iStore;
williamr@2
   251
private:
williamr@2
   252
	__MUTABLE CStreamDictionary* iDictionary;
williamr@2
   253
	TBool iDictionaryHasChanged;
williamr@2
   254
private:
williamr@2
   255
	friend class RDictionaryReadStream;
williamr@2
   256
	friend class RDictionaryWriteStream;
williamr@2
   257
	friend class HDictionaryStoreBuf;
williamr@2
   258
	};
williamr@2
   259
//
williamr@2
   260
const TInt KDictionaryCommitThreshold = 1024;
williamr@2
   261
williamr@2
   262
/**
williamr@2
   263
 * @publishedAll 
williamr@2
   264
 * @released
williamr@2
   265
 * Supports the opening and manipulation of a stream in a dictionary store.
williamr@2
   266
williamr@2
   267
Construct an object of this type to open an existing stream in a dictionary 
williamr@2
   268
store for reading.
williamr@2
   269
williamr@2
   270
@see CDictionaryStore  
williamr@2
   271
*/
williamr@2
   272
class RDictionaryReadStream : public RReadStream
williamr@2
   273
{
williamr@2
   274
public:
williamr@2
   275
	IMPORT_C void OpenL(const CDictionaryStore& aDictStore,TUid aUid);
williamr@2
   276
	IMPORT_C void OpenLC(const CDictionaryStore& aDictStore,TUid aUid);
williamr@2
   277
	};
williamr@2
   278
williamr@2
   279
/**
williamr@2
   280
 * @publishedAll 
williamr@2
   281
 * @released
williamr@2
   282
 * Supports the creation or replacement of a stream a dictionary store.
williamr@2
   283
williamr@2
   284
@see CDictionaryStore  
williamr@2
   285
*/
williamr@2
   286
class RDictionaryWriteStream : public RWriteStream
williamr@2
   287
	{
williamr@2
   288
public:
williamr@2
   289
	/** Constructs an uninitialised object. It is necessary because there are 
williamr@2
   290
	also non-default constructors in this class. */
williamr@2
   291
	RDictionaryWriteStream() {}
williamr@2
   292
	inline RDictionaryWriteStream(const MExternalizer<TStreamRef>& anExter);
williamr@2
   293
	IMPORT_C void AssignL(CDictionaryStore& aDictStore,TUid aUid);
williamr@2
   294
	IMPORT_C void AssignLC(CDictionaryStore& aDictStore,TUid aUid);
williamr@2
   295
	};
williamr@2
   296
williamr@2
   297
/**
williamr@2
   298
 * @publishedAll 
williamr@2
   299
 * @released
williamr@2
   300
 * Persistent settings to use for a RStorePagePool.
williamr@2
   301
williamr@2
   302
@see RStorePagePool 
williamr@2
   303
*/
williamr@2
   304
class TStorePagePoolToken
williamr@2
   305
	{
williamr@2
   306
public:
williamr@2
   307
	/** Provides a TStorePagePoolToken initialisation flag. */
williamr@2
   308
	enum TEmpty 
williamr@2
   309
		/** Initialise for an empty page pool flag. */
williamr@2
   310
		{EEmpty};
williamr@2
   311
public:
williamr@2
   312
	/** Default constructor. */
williamr@2
   313
	TStorePagePoolToken() {}
williamr@2
   314
williamr@2
   315
	/** Constructor that intialises the TStorePagePoolToken for an empty page pool.
williamr@2
   316
	
williamr@2
   317
	@param Intialises for an empty page pool */
williamr@2
   318
	inline TStorePagePoolToken(TEmpty);
williamr@2
   319
	inline void Touch();
williamr@2
   320
//
williamr@2
   321
	inline TBool HasAvailable() const;
williamr@2
   322
	inline TBool IsEmpty() const;
williamr@2
   323
//
williamr@2
   324
	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
williamr@2
   325
	IMPORT_C void InternalizeL(RReadStream& aStream);
williamr@2
   326
private:
williamr@2
   327
	inline TStorePagePoolToken(TStreamId aHead,TPageRef anAvail);
williamr@2
   328
private:
williamr@2
   329
	TStreamId iHead;
williamr@2
   330
	TPageRef iAvail;
williamr@2
   331
private:
williamr@2
   332
	friend class RStorePagePool;
williamr@2
   333
	};
williamr@2
   334
#if defined(__NO_CLASS_CONSTS__)
williamr@2
   335
#define KEmptyStorePagePoolToken TStorePagePoolToken(TStorePagePoolToken::EEmpty)
williamr@2
   336
#else
williamr@2
   337
/** Defines a TStorePagePoolToken object initialised for an empty page pool. */
williamr@2
   338
const TStorePagePoolToken KEmptyStorePagePoolToken=TStorePagePoolToken::EEmpty;
williamr@2
   339
#endif
williamr@2
   340
williamr@2
   341
/**
williamr@2
   342
 * @publishedAll 
williamr@2
   343
 * @released
williamr@2
   344
 * Uses a store to implement the page pool interface MPagePool.
williamr@2
   345
williamr@2
   346
Pages can be reclaimable (tracked by the page pool, so that they can be freed 
williamr@2
   347
when required) or not (in which case they must be deleted explicitly): this 
williamr@2
   348
is indicated by a flag of type TPageReclamation. Non-reclaimable pages each 
williamr@2
   349
have their own stream in the store; reclaimable pages are bundled 15 to a 
williamr@2
   350
stream. To track the reclaimable pages, the page pool has a separate token, 
williamr@2
   351
type TStorePagePoolToken, that must be saved by the user of the pool.
williamr@2
   352
williamr@2
   353
The store used must support CStreamStore::ExtendL(), CStreamStore::DeleteL() 
williamr@2
   354
and allow streams to be re-written. CPermanentFileStore meets these conditions.
williamr@2
   355
williamr@2
   356
A store page pool uses a cache to store pages in-memory and to cache frequently 
williamr@2
   357
accessed pages. You should provide a cache object (CPageCache) to the pool 
williamr@2
   358
for this purpose.
williamr@2
   359
williamr@2
   360
@see CPageCache
williamr@2
   361
@see CPermanentFileStore
williamr@2
   362
@see CStreamStore
williamr@2
   363
@see TPageReclamation  
williamr@2
   364
*/
williamr@2
   365
class RStorePagePool : public TCachePagePool
williamr@2
   366
	{
williamr@2
   367
	friend class StorePagePool;
williamr@2
   368
public:
williamr@2
   369
	IMPORT_C RStorePagePool();
williamr@2
   370
	IMPORT_C RStorePagePool(CPageCache& aCache);
williamr@2
   371
	IMPORT_C RStorePagePool(CStreamStore& aStore);
williamr@2
   372
	IMPORT_C RStorePagePool(CStreamStore& aStore,const TStorePagePoolToken& aToken);
williamr@2
   373
	IMPORT_C void Create(CStreamStore& aStore);
williamr@2
   374
	IMPORT_C void Open(CStreamStore& aStore,const TStorePagePoolToken& aToken);
williamr@2
   375
	IMPORT_C TStorePagePoolToken Token() const;
williamr@2
   376
	IMPORT_C void Close();
williamr@2
   377
	inline void Release();
williamr@2
   378
//
williamr@2
   379
	inline TBool IsDirty() const;
williamr@2
   380
	inline void MarkCurrent();
williamr@2
   381
	inline void MarkDirty();
williamr@2
   382
//
williamr@2
   383
	inline TBool HasAvailable() const;
williamr@2
   384
	inline void Discard();
williamr@2
   385
//
williamr@2
   386
	inline TBool IsEmpty() const;
williamr@2
   387
	IMPORT_C TBool ReclaimL();
williamr@2
   388
	IMPORT_C void ReclaimAllL();
williamr@2
   389
protected:
williamr@2
   390
	IMPORT_C TPageRef ExtendL(const TAny* aPage,TPageReclamation aReclamation);
williamr@2
   391
	IMPORT_C void WriteL(TPageRef aRef,const TAny* aPage,TPageChange aChange);
williamr@2
   392
	IMPORT_C void ReadL(TPageRef aRef,TAny* aPage);
williamr@2
   393
	IMPORT_C void DoDeleteL(TPageRef aRef);
williamr@2
   394
private:
williamr@2
   395
	inline void CacheDeleteL(TPageRef aRef);
williamr@2
   396
private:
williamr@2
   397
	CStreamStore* iStore;
williamr@2
   398
	TStreamId iHead;
williamr@2
   399
	TPageRef iAvail;
williamr@2
   400
	TBool iDirty;
williamr@2
   401
	};
williamr@2
   402
williamr@2
   403
/**
williamr@2
   404
 * @publishedAll 
williamr@2
   405
 * @released
williamr@2
   406
 * Interface for incrementally reclaiming or compacting space in a stream store. 
williamr@2
   407
The interface allows these actions to be performed in small steps, so that 
williamr@2
   408
applications can remain responsive while doing these potentially long-running 
williamr@2
   409
tasks.
williamr@2
   410
williamr@2
   411
An instance of a class derived from this interface is returned by 
williamr@2
   412
StreamStore::DoReclaimL() and DoCompactL(). Each step is carried out in 
williamr@2
   413
response to a call of DoNextL() and the object is released on completion of 
williamr@2
   414
the last step.
williamr@2
   415
williamr@2
   416
Notes:
williamr@2
   417
williamr@2
   418
One-step reclaim using CStreamStore::ReclaimL() is actually implemented in 
williamr@2
   419
terms of the incremental collector.
williamr@2
   420
williamr@2
   421
A CStreamStore implementation will only need to implement a collector class 
williamr@2
   422
if it supports reclamation or compaction.  
williamr@2
   423
*/
williamr@2
   424
class MIncrementalCollector
williamr@2
   425
	{
williamr@2
   426
public:
williamr@2
   427
	inline void Close();
williamr@2
   428
	inline void Release();
williamr@2
   429
//
williamr@2
   430
	inline void ResetL(TInt& aCount);
williamr@2
   431
	inline void NextL(TInt& aStep,TInt& aTotal);
williamr@2
   432
	inline void NextL(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus,TPckgBuf<TInt>& aTotal);
williamr@2
   433
protected:
williamr@2
   434
	/** Protected constructor. Protecting the constructor ensures that this 
williamr@2
   435
	abstract class cannot be instantiated.
williamr@2
   436
	
williamr@2
   437
	MIncrementalCollector(const MIncrementalCollector&);
williamr@2
   438
	
williamr@2
   439
	MIncrementalCollector& operator=(const MIncrementalCollector&);
williamr@2
   440
	
williamr@2
   441
	Private copy constructor and copy assignment to prevent */
williamr@2
   442
	MIncrementalCollector() {}
williamr@2
   443
private:
williamr@2
   444
	/** Protected constructor. Protecting the constructor ensures that this 
williamr@2
   445
	abstract class cannot be instantiated.
williamr@2
   446
	
williamr@2
   447
	MIncrementalCollector(const MIncrementalCollector&);
williamr@2
   448
	
williamr@2
   449
	MIncrementalCollector& operator=(const MIncrementalCollector&);
williamr@2
   450
	
williamr@2
   451
	Private copy constructor and copy assignment to prevent */
williamr@2
   452
	MIncrementalCollector(const MIncrementalCollector&);
williamr@2
   453
	MIncrementalCollector& operator=(const MIncrementalCollector&);
williamr@2
   454
//
williamr@2
   455
	virtual IMPORT_C void DoRelease();
williamr@2
   456
	
williamr@2
   457
	/** Implementation of the public ResetL() function. This signals that the 
williamr@2
   458
	client wants to start or retsart the operation from the beginning. A new 
williamr@2
   459
	progress count should be returned in aCount.
williamr@2
   460
	
williamr@2
   461
	@param aCount On return, contains a progress count for the 
williamr@2
   462
	reclamation/compaction 	process. */
williamr@2
   463
	virtual void DoResetL(TInt& aCount)=0;
williamr@2
   464
williamr@2
   465
	/** Implementation of the public synchronous NextL() function. The next 
williamr@2
   466
	step in the reclamation should be done, reporting progress in aStep and 
williamr@2
   467
	aTotal.
williamr@2
   468
	
williamr@2
   469
	@param aStep The progress value from either the last NextL() increment of 
williamr@2
   470
	from ResetL() if the reclamation/compaction was restarted. On return, 
williamr@2
   471
	should contain the new progress value, which can be used in subsequent 
williamr@2
   472
	calls to NextL(). This must be equal to, or less than, the previous 
williamr@2
   473
	value — a zero value must be used to indicate that the operation is 
williamr@2
   474
	complete.
williamr@2
   475
	@param aTotal On return, should contain the total amount of free space in 
williamr@2
   476
	the store. */
williamr@2
   477
	virtual void DoNextL(TInt& aStep,TInt& aTotal)=0;
williamr@2
   478
	virtual IMPORT_C void DoNextL(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus,TPckgBuf<TInt>& aTotal);
williamr@2
   479
	};
williamr@2
   480
williamr@2
   481
#include <s32stor.inl>
williamr@2
   482
#endif