profilesservices/FileList/Src/CFLDChangedItemObserver.h
branchRCL_3
changeset 54 7e0eff37aedb
parent 0 8c5d936e5675
equal deleted inserted replaced
53:8ee96d21d9bf 54:7e0eff37aedb
       
     1 /*
       
     2 * Copyright (c) 2005 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: CLF changed item Observer.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CFLDCHANGEDITEMOBSERVER_H__
       
    21 #define __CFLDCHANGEDITEMOBSERVER_H__
       
    22 
       
    23 // INTERNAL INCLUDES
       
    24 
       
    25 // EXTERNAL INCLUDES
       
    26 #include <e32base.h>
       
    27 #include <MCLFChangedItemObserver.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CFLDFileListModel;
       
    31 class CFLDWaitNote;
       
    32 class CFLDController;
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  CLF changed item Observer.
       
    37 *  CFLDChangedItemObserver receives operation events of Content
       
    38 *  Listing Framework. Operation event is generated when model
       
    39 *  has been changed ( for example file has been renamed )
       
    40 */
       
    41 NONSHARABLE_CLASS( CFLDChangedItemObserver )
       
    42     : public CBase,
       
    43       public MCLFChangedItemObserver
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46 
       
    47 		/**
       
    48 		 * Creates and returns a new instance of this class.
       
    49 		 * @return Pointer to the CFLDChangedItemObserver object
       
    50 		 */
       
    51 	    static CFLDChangedItemObserver* NewL();
       
    52 	    
       
    53 	    /**
       
    54 	     * Creates and returns a new instance of this class.
       
    55 	     * @return Pointer to the CFLDChangedItemObserver object
       
    56 	     */
       
    57 	    static CFLDChangedItemObserver* NewL(CFLDWaitNote* aWaitNote);
       
    58 
       
    59         /**
       
    60         * Destructor.
       
    61         */
       
    62         virtual ~CFLDChangedItemObserver();
       
    63 
       
    64     private:    // Constructors
       
    65         /**
       
    66         * C++ default constructor.
       
    67         */
       
    68         CFLDChangedItemObserver();
       
    69         
       
    70         /**
       
    71          * C++ constructor.
       
    72          */
       
    73         CFLDChangedItemObserver(CFLDWaitNote* aWaitNote);
       
    74         
       
    75         /**
       
    76          * Second phase constructor
       
    77          */
       
    78         void ConstructL(CFLDWaitNote* aWaitNote );
       
    79 
       
    80     protected:  // Methods derived from MCLFChangedItemObserver
       
    81 
       
    82 		void HandleItemChangeL( const TArray<TCLFItemId>& aItemIDArray );
       
    83 
       
    84         void HandleError( TInt aError );
       
    85 
       
    86 	public:     // New functions
       
    87 		/*
       
    88 		* Sets callback instance of filelist model
       
    89 		* @param aModel Instance of filelist model
       
    90 		*/
       
    91 		void SetFileListModel( CFLDFileListModel* aModel );
       
    92 		
       
    93 	private:  // New methods
       
    94 
       
    95 		/**
       
    96 		 * This callback method is called when the timer expires. Calls
       
    97 		 * CFLDFileListModel::RefreshEntryListL().
       
    98 		 * @param aPtr pointer to CFLDChangedItemObserver
       
    99 		 * @return Returns always zero
       
   100 		 */
       
   101 		static TInt HandleModelRefreshL( TAny* aPtr );
       
   102 
       
   103     private:    // Data
       
   104 
       
   105     	/// Ref: FileList Model
       
   106     	CFLDFileListModel* iModel;
       
   107     	
       
   108     	/// Ref: Wait note dialog for indicating refreshing process of the List Model
       
   109     	CFLDWaitNote* iWaitNote;
       
   110     	
       
   111     	/// Own: Pointer to timer
       
   112     	CPeriodic* iTimer;
       
   113     	
       
   114     	/// The delay in microseconds until timer expires
       
   115     	TTimeIntervalMicroSeconds32 iDelay;
       
   116 
       
   117     };
       
   118 
       
   119 #endif // __CFLDCHANGEDITEMOBSERVER_H__
       
   120 
       
   121 // End of File