os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServViewWindowFetcher.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2002-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 __LOGSERVVIEWWINDOWFETCHER_H__
    17 #define __LOGSERVVIEWWINDOWFETCHER_H__
    18 
    19 #include "LogCliServShared.h"
    20 
    21 // Classes referenced
    22 class CLogGetEvent;
    23 class CLogServViewBase;
    24 class MLogServDatabaseTransactionInterface;
    25 
    26 
    27 /////////////////////////////////////////////////////////////////////////////////////////
    28 // -----> CLogServViewWindowFetcher (header)
    29 /////////////////////////////////////////////////////////////////////////////////////////
    30 /**
    31 @internalComponent
    32 */
    33 class CLogServViewWindowFetcher : public CLogActive
    34 	{
    35 public:
    36 	static CLogServViewWindowFetcher* NewL(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority);
    37 	~CLogServViewWindowFetcher();
    38 
    39 private:
    40 	CLogServViewWindowFetcher(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority);
    41 	void ConstructL();
    42 
    43 public:
    44 	void StartL(TRequestStatus& aStatus, const CLogServViewBase& aView, const TLogTransferWindow& aWindow, const RMessage2& aMessage);
    45 
    46 private:
    47 	void DoRunL();
    48 	void DoCancel();
    49 	void DoComplete(TInt& aCompletionCode);
    50 
    51 private:
    52 	enum TState
    53 		{
    54 		EStateIdle = 0,
    55 		EStateStarting,
    56 		EStateContinuing
    57 		};
    58 
    59 private:
    60 	void ProcessEventL();
    61 
    62 private:
    63 	void GetNextEventL(TInt aWindowIndex);
    64 	void CompleteRequest();
    65 
    66 private:
    67 	MLogServDatabaseTransactionInterface& iDatabase;
    68 	CLogEvent* iEvent;
    69 	CLogGetEvent* iGetEvent;
    70 
    71 	// Transient
    72 	TState iState;
    73 	const CLogServViewBase* iView;
    74 	TLogTransferWindow iWindow;
    75 	const RMessage2* iMessage;
    76 	TInt iWindowIndex;
    77 	CBufBase* iBuffer;
    78 	};
    79 
    80 #endif