logsui/EngineInc/CLogsRecentReader.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 *     Recent list reader
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __Logs_Engine_CLogsRecentReader_H__
       
    21 #define __Logs_Engine_CLogsRecentReader_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include "CLogsBaseReader.h"
       
    25 
       
    26 // FORWARD DECLARATION
       
    27 
       
    28 // CLASS DECLARATION
       
    29 class CLogsClearDuplicates;
       
    30 class CLogFilter;
       
    31 class CLogViewRecent;
       
    32 class CLogViewDuplicate;
       
    33 class MLogsEventArray;
       
    34 
       
    35 /**
       
    36  *  Recent list reader
       
    37  */
       
    38 class CLogsRecentReader : public CLogsBaseReader
       
    39     {
       
    40     public:
       
    41         /**
       
    42          *  Two phase constructor
       
    43          *
       
    44          *  @param aFsSession   ref. to file server session
       
    45          *  @param aEventArray  array of events
       
    46          *  @param aStrings     log client constants
       
    47          *  @param aModel       model id
       
    48          *  @param aObserver    observer
       
    49          */
       
    50         static CLogsRecentReader* NewL
       
    51                                 (   RFs& aFsSession
       
    52                                 ,   MLogsEventArray& aEventArray
       
    53                                 ,   TLogsEventStrings& aStrings
       
    54                                 ,   TLogsModel aModel
       
    55                                 ,   MLogsObserver* aObserver
       
    56                                 ,   CLogsEngine* aLogsEngineRef
       
    57                                 );
       
    58 
       
    59        /**
       
    60         *   Destructor.
       
    61         */
       
    62         virtual ~CLogsRecentReader();
       
    63 
       
    64     private:
       
    65        /**
       
    66         *  Default constructor
       
    67         */
       
    68         CLogsRecentReader();
       
    69 
       
    70         /**
       
    71          *  Constructor
       
    72          *
       
    73          *  @param aFsSession   ref. to file server session
       
    74          *  @param aEventArray  array of events
       
    75          *  @param aStrings     log client constants
       
    76          *  @param aModel       model id
       
    77          *  @param aObserver    observer
       
    78          */
       
    79         CLogsRecentReader(  RFs& aFsSession
       
    80                          ,  MLogsEventArray& aEventArray
       
    81                          ,  TLogsEventStrings& aStrings
       
    82                          ,  TLogsModel aModel
       
    83                          ,  MLogsObserver* aObserver
       
    84                          ,  CLogsEngine* aLogsEngineRef
       
    85                          );
       
    86                                     
       
    87         /**
       
    88          *  Second phase constructor
       
    89          */
       
    90         void ConstructL();
       
    91 
       
    92     private:  // from CLogsBaseReader 
       
    93         TInt ViewCountL() const;
       
    94         CLogEvent& Event() const;
       
    95         TBool DoNextL();        
       
    96         TInt DuplicateCountL() const;
       
    97         void ReadingFinishedL();
       
    98         void ConstructEventL( MLogsEvent& aDest, const CLogEvent& aSource );
       
    99 
       
   100     protected: // From CActive
       
   101         void DoCancel();
       
   102 
       
   103     public: // from MLogsReader
       
   104         void Stop();
       
   105         void StartL();
       
   106         void ConfigureL( const MLogsReaderConfig* aConfig );
       
   107         void ClearDuplicatesL();
       
   108         void ActivateL();
       
   109         void DeActivate();
       
   110 
       
   111 
       
   112     private: // data
       
   113         /// Own: View to filtered events.
       
   114         CLogViewRecent*         iLogViewRecent;
       
   115 
       
   116         /// Own: Recent duplicate view    
       
   117         CLogViewDuplicate*      iDuplicateView;
       
   118 
       
   119         /// Own: duplicate filter, excludes all "seen" events
       
   120         CLogFilter*             iDuplicateFilter;
       
   121 
       
   122         /// Own: clear duplicates flag for better performance
       
   123         TBool                   iDuplicates;
       
   124 
       
   125         /// Own:
       
   126         CLogsClearDuplicates*   iClearDuplicates;
       
   127         // TBool                   iSkipClearDuplicates;
       
   128     };
       
   129 
       
   130 #endif      // __Logs_Engine_CLogsRecentReader_H__
       
   131 
       
   132 // End of File