|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : CCEOperationObserver.h 00004 * Part of : Content Listing Framework Sample Application 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 00017 #ifndef __CCEOPERATIONOBSERVER_H__ 00018 #define __CCEOPERATIONOBSERVER_H__ 00019 00020 // INCLUDES 00021 #include <e32base.h> 00022 #include <MCLFOperationObserver.h> 00023 00024 // FORWARD DECLARATIONS 00025 class CCEMusicView; 00026 00027 // CLASS DECLARATION 00028 00029 /** 00030 * CLF Operation Observer. 00031 * Example of CLF Operation Observer that receives operation events of Content 00032 * Listing Framework. Operation event is generated when asynchronous refresh 00033 * operation of List Model is finished. 00034 */ 00035 class CCEOperationObserver 00036 : public CBase, 00037 public MCLFOperationObserver 00038 { 00039 public: // Constructors and destructor 00040 00041 /** 00042 * Creates and returns a new instance of this class. 00043 * @return Pointer to the CCEOperationObserver object 00044 */ 00045 static CCEOperationObserver* NewL(); 00046 00047 /** 00048 * Destructor. 00049 */ 00050 virtual ~CCEOperationObserver(); 00051 00052 private: // Constructors 00053 /** 00054 * C++ default constructor. 00055 */ 00056 CCEOperationObserver(); 00057 00058 protected: // Functions from base classes 00059 00060 /** 00061 * From MCLFOperationObserver. Method to handle list model operation 00062 * events. 00063 * @param aOperationEvent List model operation event 00064 * @param aError System wide error code 00065 */ 00066 void HandleOperationEventL( TCLFOperationEvent aOperationEvent, 00067 TInt aError ); 00068 00069 public: // New functions 00070 00071 /** 00072 * Check if there is a refresh operation is ongoing. 00073 * @return ETrue if refresh is not finished, 00074 * EFalse if refresh is finished 00075 */ 00076 TBool IsRefreshOngoing(); 00077 00078 /** 00079 * Prepare for a refresh operation to start. 00080 * @param aWait The wait instance to stop when refreshing is completed 00081 */ 00082 void PrepareForRefresh( CActiveSchedulerWait& aWait ); 00083 00084 /** 00085 * Set Music view 00086 * @param aTarget Music view that will be notified about item changes 00087 */ 00088 void SetMusicView( CCEMusicView* aTarget ); 00089 00090 /** 00091 * Remove Music view 00092 */ 00093 void RemoveMusicView(); 00094 00095 private: // Data 00096 00097 // For waiting the refresh operation to complete 00098 CActiveSchedulerWait* iWait; 00099 00100 // For indicating that refresh operation is started but not finished 00101 TBool iRefreshOngoing; 00102 00103 // Notify this target, when items are changed 00104 // in the file system (not owned) 00105 CCEMusicView* iTarget; 00106 00107 00108 }; 00109 00110 #endif // __CCEOPERATIONOBSERVER_H__ 00111 00112 // End of File
|
© Nokia 2009 |