logsui/EngineInc/CLogsGetEvent.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *     Implements interface for log event getting
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __Logs_Engine_CLogsGetEvent_H__
       
    21 #define __Logs_Engine_CLogsGetEvent_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <logwrap.h>
       
    26 #include "MLogsGetEvent.h"
       
    27 #include "MLogsStateHolder.h"
       
    28 #include "TLogsEventStrings.h"
       
    29 
       
    30 // FORWARD DECLARATION
       
    31 class CLogClient;
       
    32 class CLogViewEvent;
       
    33 class CLogFilter;
       
    34 class CLogFilterList;
       
    35 class MLogsEventGetter;
       
    36 class MLogsEvent;
       
    37 class CLogEvent;
       
    38 class MLogsObserver;
       
    39 class MLogsEvent;
       
    40 class MLogsEventWrapper;
       
    41 class CLogsGetEventNotify;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46  *  Implements interface for Logs reader. Common functionality.
       
    47  */
       
    48 class CLogsGetEvent : public CActive, 
       
    49                         public MLogsGetEvent,
       
    50                         public MLogsStateHolder
       
    51     {
       
    52     public:
       
    53         
       
    54         /**
       
    55          *  EPOC constructor
       
    56          *
       
    57          *  @param aFsSession   ref. to file server session
       
    58          *  @param aStrings     log client constants
       
    59          *  @param aObserver    observer
       
    60          */
       
    61         static CLogsGetEvent* NewL( RFs& aFsSession, 
       
    62             TLogsEventStrings& aStrings,
       
    63             MLogsObserver* aObserver = NULL );
       
    64 
       
    65        /**
       
    66         *   Destructor.
       
    67         */
       
    68         virtual ~CLogsGetEvent();
       
    69 
       
    70     private:
       
    71 
       
    72        /**
       
    73         *  Default constructor
       
    74         */
       
    75         CLogsGetEvent();
       
    76        
       
    77         /**
       
    78          *  Constructor
       
    79          *
       
    80          *  @param aFsSession   ref. to file server session
       
    81          *  @param aStrings     log client constants
       
    82          *  @param aObserver    observer
       
    83          */
       
    84         CLogsGetEvent( RFs& aFsSession, 
       
    85                         TLogsEventStrings& aStrings, MLogsObserver* aObserver );
       
    86 
       
    87        /**
       
    88         *  2nd phase construction
       
    89         */
       
    90         void ConstructL();
       
    91                                             
       
    92         /**
       
    93          *  Event construction
       
    94          *
       
    95          *  @param aDest    ref. to MLogsEvent implemetation object
       
    96          *  @param aSource  pointer to CLogEvent object
       
    97          */
       
    98         void ConstructEventL( MLogsEvent& aDest, const CLogEvent& aSource );
       
    99                 
       
   100 
       
   101     protected: // From CActive
       
   102 
       
   103         void DoCancel();
       
   104         void RunL();
       
   105 		TInt RunError(TInt aError);
       
   106 
       
   107     public: // from MLogsGetEvent
       
   108 
       
   109         void Get( TLogId aId );
       
   110         const MLogsEventGetter* Event();
       
   111         const CLogEvent* LogEvent() const;
       
   112         void SetObserver( MLogsObserver* aObserver );  
       
   113 
       
   114     public: // from MLogsStateHolder
       
   115 
       
   116         TLogsState State() const;
       
   117       
       
   118                    
       
   119     private:    // data
       
   120         
       
   121         /// ref: file session
       
   122         RFs&            iFsSession;  
       
   123                 
       
   124         /// own: string constants
       
   125         TLogsEventStrings&   iStrings;
       
   126 
       
   127         /// own: log client
       
   128         CLogClient*     iLogClient;
       
   129 
       
   130         /// ref: observer
       
   131         MLogsObserver*  iObserver;
       
   132                          
       
   133         /// own: state for observer
       
   134         TLogsState      iState;  
       
   135         
       
   136         /// Own: Event
       
   137         CLogEvent* iLogEvent;
       
   138 
       
   139         /// Own: Logs Event
       
   140         MLogsEvent* iEvent;
       
   141 
       
   142         /// Own: wrapper for CLogsGetEvent
       
   143         MLogsEventWrapper* iWrapper;
       
   144 
       
   145         /// Own:
       
   146         CLogsGetEventNotify* iNotify;
       
   147 
       
   148         /// Own: const emergency nbr supported
       
   149         TBool iStaticEmerg;
       
   150     };
       
   151 
       
   152 #endif      // __Logs_Engine_CLogsGetEvent_H__
       
   153 
       
   154 
       
   155 // End of File
       
   156 
       
   157 
       
   158 
       
   159         
       
   160 
       
   161         
       
   162