os/persistentdata/loggingservices/eventlogger/LogCli/inc/LogViewWindowChangeObserver.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __LOGVIEWWINDOWCHANGEOBSERVER_H__
    17 #define __LOGVIEWWINDOWCHANGEOBSERVER_H__
    18 
    19 // System includes
    20 #include <e32base.h>
    21 
    22 // User includes
    23 #include "LogViewChangeObserverInternal.h"
    24 
    25 // Classes referenced
    26 class RLogSession;
    27 
    28 
    29 /////////////////////////////////////////////////////////////////////////////////////////
    30 // -----> CLogViewWindowChangeObserver (header)
    31 /////////////////////////////////////////////////////////////////////////////////////////
    32 NONSHARABLE_CLASS(CLogViewWindowChangeObserver) : public CBase, public MLogViewChangeObserverInternal
    33 /**
    34 @internalComponent
    35 */
    36 	{
    37 public:
    38 	enum TType
    39 		{
    40 		ELogEventTypeAdd = 0,
    41 		ELogEventTypeChange,
    42 		ELogEventTypeDelete
    43 		};
    44 
    45 public:
    46 	CLogViewWindowChangeObserver(MLogViewChangeObserverInternal& aObserver);
    47 	~CLogViewWindowChangeObserver();
    48 
    49 public:
    50 
    51 	/**
    52 	 * Request that the next change notification corresponding to the specified
    53 	 * log id and change type is ignored.
    54 	 */
    55 	void IgnoreNextEventL(TLogId aId, TType aType);
    56 
    57 private: // FROM MLogViewChangeObserver
    58 	void HandleLogViewChangeEventAddedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);
    59 	void HandleLogViewChangeEventChangedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);
    60 	void HandleLogViewChangeEventDeletedL(TLogId aId, TInt aViewIndex, TInt aChangeIndex, TInt aTotalChangeCount);
    61 
    62 private: // FROM MLogViewChangeObserverInternal
    63 	void HandleLogViewChangeEventLogClearedL();
    64 
    65 private:
    66 	TInt Find(TLogId aId, TType aType) const;
    67 
    68 private:
    69 	class TIgnoreEvent
    70 		{
    71 	public:
    72 		inline TIgnoreEvent(TLogId aId, TType aType) : iId(aId), iType(aType) { }
    73 
    74 	public:
    75 		TLogId iId;
    76 		TType iType;
    77 		};
    78 	
    79 private:
    80 	MLogViewChangeObserverInternal& iObserver;
    81 	RArray<TIgnoreEvent> iIgnoreStack;
    82 	};
    83 
    84 
    85 #endif