loggingservices/eventlogger/Shared/LogViewObserver.h
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     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 __LOGVIEWOBSERVER_H__
       
    17 #define __LOGVIEWOBSERVER_H__
       
    18 
       
    19 // System includes
       
    20 #include <e32base.h>
       
    21 
       
    22 // User includes
       
    23 #include <logwrap.h>
       
    24 #include <logview.h>
       
    25 
       
    26 // Classes referenced
       
    27 class CLogClient;
       
    28 class CLogChangeDefinition;
       
    29 class MLogViewChangeObserverInternal;
       
    30 
       
    31 
       
    32 /////////////////////////////////////////////////////////////////////////////////////////
       
    33 // -----> CLogViewObserver (header)
       
    34 /////////////////////////////////////////////////////////////////////////////////////////
       
    35 NONSHARABLE_CLASS(CLogViewObserver) : public CActive
       
    36 /**
       
    37 @internalComponent
       
    38 */
       
    39 	{
       
    40 public:
       
    41 	static CLogViewObserver* NewL(CLogView& aView, CLogClient& aClient, MLogViewChangeObserverInternal& aObserver, TLogViewId aViewId, TInt aPriority);
       
    42 	~CLogViewObserver();
       
    43 
       
    44 private:
       
    45 	CLogViewObserver(CLogView& aView, CLogClient& aClient, MLogViewChangeObserverInternal& aObserver, TLogViewId aViewId, TInt aPriority);
       
    46 	void ConstructL();
       
    47 
       
    48 public:
       
    49 	void RequestChanges();
       
    50 
       
    51 private: // FROM CActive
       
    52 	void RunL();
       
    53 	void DoCancel();
       
    54 	TInt RunError(TInt aError);
       
    55 
       
    56 private:
       
    57 	void RequestChangesCancel();
       
    58 	void FetchChangesL(TInt aBufferSizeRequired);
       
    59 	void NotifyObserverL();
       
    60 
       
    61 private:
       
    62 	CLogClient& iClient;
       
    63 	MLogViewChangeObserverInternal& iObserver;
       
    64 	TLogViewId iViewId;
       
    65 	CLogChangeDefinition* iChanges;
       
    66 	CLogView& iView;
       
    67 	};
       
    68 
       
    69 
       
    70 #endif