os/persistentdata/loggingservices/eventlogger/LogCli/inc/LogViewWindowFetcher.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef __LOGVIEWWINDOWFETCHER_H__
sl@0
    17
#define __LOGVIEWWINDOWFETCHER_H__
sl@0
    18
sl@0
    19
// System includes
sl@0
    20
#include <e32base.h>
sl@0
    21
sl@0
    22
// User includes
sl@0
    23
#include <logwrap.h>
sl@0
    24
#include "LogCliServShared.h"
sl@0
    25
#include <logviewchangeobserver.h>
sl@0
    26
sl@0
    27
// Classes referenced
sl@0
    28
class RLogSession;
sl@0
    29
sl@0
    30
sl@0
    31
/////////////////////////////////////////////////////////////////////////////////////////
sl@0
    32
// -----> MLogViewWindowFetcherObserver (header)
sl@0
    33
/////////////////////////////////////////////////////////////////////////////////////////
sl@0
    34
class MLogViewWindowFetcherObserver
sl@0
    35
/**
sl@0
    36
@internalComponent
sl@0
    37
*/
sl@0
    38
	{
sl@0
    39
public:
sl@0
    40
	virtual void HandleFetchedWindowItemL(TInt aItemIndex, CLogEvent* aEvent) = 0;
sl@0
    41
	};
sl@0
    42
sl@0
    43
sl@0
    44
/////////////////////////////////////////////////////////////////////////////////////////
sl@0
    45
// -----> CLogViewWindowFetcher (header)
sl@0
    46
/////////////////////////////////////////////////////////////////////////////////////////
sl@0
    47
NONSHARABLE_CLASS(CLogViewWindowFetcher) : public CActive
sl@0
    48
/**
sl@0
    49
@internalComponent
sl@0
    50
*/
sl@0
    51
	{
sl@0
    52
public:
sl@0
    53
	CLogViewWindowFetcher(RLogSession& aSession, TLogViewId aViewId, MLogViewWindowFetcherObserver& aObserver, TInt aPriority);
sl@0
    54
	~CLogViewWindowFetcher();
sl@0
    55
	void ConstructL();
sl@0
    56
sl@0
    57
public:
sl@0
    58
sl@0
    59
	/**
sl@0
    60
	 * Fetch the specified window.
sl@0
    61
	 */
sl@0
    62
	void PrepareToFetchWindowL(const TLogWindowAndCursor& aRequestedWindow);
sl@0
    63
sl@0
    64
	/**
sl@0
    65
	 * Start the asynchronous fetch
sl@0
    66
	 */
sl@0
    67
	void Start(TRequestStatus& aObserver);
sl@0
    68
sl@0
    69
	/**
sl@0
    70
	 * Cancel any fetch operation but without notifying the observer
sl@0
    71
	 */
sl@0
    72
	void SilentCancel();
sl@0
    73
sl@0
    74
	/**
sl@0
    75
	 * Access the window & cursor for the requested window
sl@0
    76
	 */
sl@0
    77
	inline const TLogWindowAndCursor& RequestedWindow() const;
sl@0
    78
sl@0
    79
private:
sl@0
    80
	void Fetch(const TLogWindow& aWindow);
sl@0
    81
	void CompleteObserver(TInt aError);
sl@0
    82
sl@0
    83
private: // FROM CActive
sl@0
    84
	void RunL();
sl@0
    85
	void DoCancel();
sl@0
    86
	TInt RunError(TInt aError);
sl@0
    87
sl@0
    88
private:
sl@0
    89
	RLogSession& iSession;
sl@0
    90
	const TLogViewId iViewId;
sl@0
    91
	MLogViewWindowFetcherObserver& iObserver;
sl@0
    92
sl@0
    93
private:
sl@0
    94
	TLogWindowAndCursor iRequestedWindow;
sl@0
    95
	//
sl@0
    96
	TRequestStatus* iObserverRequestStatus;
sl@0
    97
	CBufBase* iBuffer;
sl@0
    98
	TPtr8 iBufferPointer;
sl@0
    99
	TPckgBuf<TLogTransferWindow> iFetchWindowData;
sl@0
   100
	TPckgBuf<TLogClientServerData> iData;
sl@0
   101
	TLogWindowAndCursor iWindowReq;
sl@0
   102
	};
sl@0
   103
sl@0
   104
sl@0
   105
/////////////////////////////////////////////////////////////////////////////////////////
sl@0
   106
// -----> CLogViewWindowFetcher (inline)
sl@0
   107
/////////////////////////////////////////////////////////////////////////////////////////
sl@0
   108
inline const TLogWindowAndCursor& CLogViewWindowFetcher::RequestedWindow() const
sl@0
   109
	{
sl@0
   110
	return iRequestedWindow;
sl@0
   111
	}
sl@0
   112
sl@0
   113
#endif