os/persistentdata/loggingservices/eventlogger/LogServ/inc/LOGMAIN.H
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __LOGMAIN_H__
    17 #define __LOGMAIN_H__
    18 
    19 #include <logwrap.h>
    20 #include <logcli.h>
    21 
    22 // Classes referenced
    23 class CLogRecover;
    24 class CLogCompact;
    25 class MLogServDatabaseTransactionInterface;
    26 
    27 /**
    28 Performas maintenance tasks on the LogEng database, such as database compaction and database recovery. 
    29 
    30 @see MLogServDatabaseTransactionInterface
    31 @see CLogRecover
    32 @see CLogCompact
    33 @internalComponent
    34 */
    35 class CLogMaintenance : public CLogActive
    36 	{
    37 public:
    38 	static CLogMaintenance* NewL(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority);
    39 	~CLogMaintenance();
    40 	//
    41 	void Start(TBool aPurge, TRequestStatus& aStatus);
    42 	//
    43 private:
    44 	CLogMaintenance(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority);
    45 	void ConstructL();
    46 	//
    47 	void DoRunL();
    48 	void DoComplete(TInt& aStatus);
    49 	TBool DoNextL();
    50 	void DoCancel();
    51 	//
    52 	void ClearLogL(const TTime& aDate, TRequestStatus& aStatus);
    53 
    54 	//
    55 	enum TLogState {	ELogRecover, ELogGetConfig, ELogPurgeMainAge, ELogCompact, ELogComplete };
    56 	//
    57 private:
    58 	MLogServDatabaseTransactionInterface& iDatabase;
    59 	TLogState iState;
    60 	TLogConfig iConfig;
    61 	TBool iPurge;
    62 	CLogRecover* iRecover;
    63 	CLogCompact* iCompact;
    64 	};
    65 
    66 #endif