os/persistentdata/loggingservices/eventlogger/LogCli/inc/LogViewWindowChangeObserver.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/loggingservices/eventlogger/LogCli/inc/LogViewWindowChangeObserver.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,85 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __LOGVIEWWINDOWCHANGEOBSERVER_H__
    1.20 +#define __LOGVIEWWINDOWCHANGEOBSERVER_H__
    1.21 +
    1.22 +// System includes
    1.23 +#include <e32base.h>
    1.24 +
    1.25 +// User includes
    1.26 +#include "LogViewChangeObserverInternal.h"
    1.27 +
    1.28 +// Classes referenced
    1.29 +class RLogSession;
    1.30 +
    1.31 +
    1.32 +/////////////////////////////////////////////////////////////////////////////////////////
    1.33 +// -----> CLogViewWindowChangeObserver (header)
    1.34 +/////////////////////////////////////////////////////////////////////////////////////////
    1.35 +NONSHARABLE_CLASS(CLogViewWindowChangeObserver) : public CBase, public MLogViewChangeObserverInternal
    1.36 +/**
    1.37 +@internalComponent
    1.38 +*/
    1.39 +	{
    1.40 +public:
    1.41 +	enum TType
    1.42 +		{
    1.43 +		ELogEventTypeAdd = 0,
    1.44 +		ELogEventTypeChange,
    1.45 +		ELogEventTypeDelete
    1.46 +		};
    1.47 +
    1.48 +public:
    1.49 +	CLogViewWindowChangeObserver(MLogViewChangeObserverInternal& aObserver);
    1.50 +	~CLogViewWindowChangeObserver();
    1.51 +
    1.52 +public:
    1.53 +
    1.54 +	/**
    1.55 +	 * Request that the next change notification corresponding to the specified
    1.56 +	 * log id and change type is ignored.
    1.57 +	 */
    1.58 +	void IgnoreNextEventL(TLogId aId, TType aType);
    1.59 +
    1.60 +private: // FROM MLogViewChangeObserver
    1.61 +	void HandleLogViewChangeEventAddedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);
    1.62 +	void HandleLogViewChangeEventChangedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);
    1.63 +	void HandleLogViewChangeEventDeletedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);
    1.64 +
    1.65 +private: // FROM MLogViewChangeObserverInternal
    1.66 +	void HandleLogViewChangeEventLogClearedL();
    1.67 +
    1.68 +private:
    1.69 +	TInt Find(TLogId aId, TType aType) const;
    1.70 +
    1.71 +private:
    1.72 +	class TIgnoreEvent
    1.73 +		{
    1.74 +	public:
    1.75 +		inline TIgnoreEvent(TLogId aId, TType aType) : iId(aId), iType(aType) { }
    1.76 +
    1.77 +	public:
    1.78 +		TLogId iId;
    1.79 +		TType iType;
    1.80 +		};
    1.81 +	
    1.82 +private:
    1.83 +	MLogViewChangeObserverInternal& iObserver;
    1.84 +	RArray<TIgnoreEvent> iIgnoreStack;
    1.85 +	};
    1.86 +
    1.87 +
    1.88 +#endif