sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __LOGSERVVIEWWINDOWFETCHER_H__ sl@0: #define __LOGSERVVIEWWINDOWFETCHER_H__ sl@0: sl@0: #include "LogCliServShared.h" sl@0: sl@0: // Classes referenced sl@0: class CLogGetEvent; sl@0: class CLogServViewBase; sl@0: class MLogServDatabaseTransactionInterface; sl@0: sl@0: sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: // -----> CLogServViewWindowFetcher (header) sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: class CLogServViewWindowFetcher : public CLogActive sl@0: { sl@0: public: sl@0: static CLogServViewWindowFetcher* NewL(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority); sl@0: ~CLogServViewWindowFetcher(); sl@0: sl@0: private: sl@0: CLogServViewWindowFetcher(MLogServDatabaseTransactionInterface& aDatabase, TInt aPriority); sl@0: void ConstructL(); sl@0: sl@0: public: sl@0: void StartL(TRequestStatus& aStatus, const CLogServViewBase& aView, const TLogTransferWindow& aWindow, const RMessage2& aMessage); sl@0: sl@0: private: sl@0: void DoRunL(); sl@0: void DoCancel(); sl@0: void DoComplete(TInt& aCompletionCode); sl@0: sl@0: private: sl@0: enum TState sl@0: { sl@0: EStateIdle = 0, sl@0: EStateStarting, sl@0: EStateContinuing sl@0: }; sl@0: sl@0: private: sl@0: void ProcessEventL(); sl@0: sl@0: private: sl@0: void GetNextEventL(TInt aWindowIndex); sl@0: void CompleteRequest(); sl@0: sl@0: private: sl@0: MLogServDatabaseTransactionInterface& iDatabase; sl@0: CLogEvent* iEvent; sl@0: CLogGetEvent* iGetEvent; sl@0: sl@0: // Transient sl@0: TState iState; sl@0: const CLogServViewBase* iView; sl@0: TLogTransferWindow iWindow; sl@0: const RMessage2* iMessage; sl@0: TInt iWindowIndex; sl@0: CBufBase* iBuffer; sl@0: }; sl@0: sl@0: #endif