Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __LOGVIEWWINDOWFETCHER_H__
17 #define __LOGVIEWWINDOWFETCHER_H__
24 #include "LogCliServShared.h"
25 #include <logviewchangeobserver.h>
31 /////////////////////////////////////////////////////////////////////////////////////////
32 // -----> MLogViewWindowFetcherObserver (header)
33 /////////////////////////////////////////////////////////////////////////////////////////
34 class MLogViewWindowFetcherObserver
40 virtual void HandleFetchedWindowItemL(TInt aItemIndex, CLogEvent* aEvent) = 0;
44 /////////////////////////////////////////////////////////////////////////////////////////
45 // -----> CLogViewWindowFetcher (header)
46 /////////////////////////////////////////////////////////////////////////////////////////
47 NONSHARABLE_CLASS(CLogViewWindowFetcher) : public CActive
53 CLogViewWindowFetcher(RLogSession& aSession, TLogViewId aViewId, MLogViewWindowFetcherObserver& aObserver, TInt aPriority);
54 ~CLogViewWindowFetcher();
60 * Fetch the specified window.
62 void PrepareToFetchWindowL(const TLogWindowAndCursor& aRequestedWindow);
65 * Start the asynchronous fetch
67 void Start(TRequestStatus& aObserver);
70 * Cancel any fetch operation but without notifying the observer
75 * Access the window & cursor for the requested window
77 inline const TLogWindowAndCursor& RequestedWindow() const;
80 void Fetch(const TLogWindow& aWindow);
81 void CompleteObserver(TInt aError);
83 private: // FROM CActive
86 TInt RunError(TInt aError);
89 RLogSession& iSession;
90 const TLogViewId iViewId;
91 MLogViewWindowFetcherObserver& iObserver;
94 TLogWindowAndCursor iRequestedWindow;
96 TRequestStatus* iObserverRequestStatus;
99 TPckgBuf<TLogTransferWindow> iFetchWindowData;
100 TPckgBuf<TLogClientServerData> iData;
101 TLogWindowAndCursor iWindowReq;
105 /////////////////////////////////////////////////////////////////////////////////////////
106 // -----> CLogViewWindowFetcher (inline)
107 /////////////////////////////////////////////////////////////////////////////////////////
108 inline const TLogWindowAndCursor& CLogViewWindowFetcher::RequestedWindow() const
110 return iRequestedWindow;