|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : CCEMusicView.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 #ifndef __CCEMUSICVIEW_H__ 00017 #define __CCEMUSICVIEW_H__ 00018 00019 // INCLUDES 00020 #include <aknview.h> 00021 #include <e32base.h> 00022 #include <e32std.h> 00023 00024 // FORWARD DECLARATIONS 00025 class MCLFContentListingEngine; 00026 class MCLFItemListModel; 00027 class MCLFSortingStyle; 00028 00029 class CCEMusicContainer; 00030 class CCEOperationObserver; 00031 class CCESoundPlayer; 00032 class CCECustomSorter; 00033 class CCEWaitNote; 00034 00035 // CLASS DECLARATION 00036 00037 /** 00038 * Music files view for CLF Example Application. 00039 * The view is for displaying and playing music files of selected group. 00040 */ 00041 class CCEMusicView 00042 : public CAknView 00043 { 00044 public: // Constructors and destructor 00045 00046 /** 00047 * Creates and returns a new instance of this class. 00048 * @param aEngine Pointer to a Content Listing Engine 00049 * @param aModel Pointer to a Listing Model 00050 * @param aObserver Pointer to a CLF Operation Observer 00051 * @return Pointer to the CCEMusicView object 00052 */ 00053 static CCEMusicView* NewL( MCLFContentListingEngine* aEngine, 00054 MCLFItemListModel* aModel, 00055 CCEOperationObserver* aObserver ); 00056 00057 /** 00058 * Creates and returns a new instance of this class. 00059 * The returned object is left on the cleanup stack. 00060 * @param aEngine Pointer to a Content Listing Engine 00061 * @param aModel Pointer to a Listing Model 00062 * @param aObserver Pointer to a CLF Operation Observer 00063 * @return Pointer to the CCEMusicView object 00064 */ 00065 static CCEMusicView* NewLC( MCLFContentListingEngine* aEngine, 00066 MCLFItemListModel* aModel, 00067 CCEOperationObserver* aObserver ); 00068 00069 /** 00070 * Destructor. 00071 */ 00072 virtual ~CCEMusicView(); 00073 00074 private: // Constructors 00075 /** 00076 * C++ default constructor. 00077 * @param aEngine Pointer to a Content Listing Engine 00078 * @param aModel Pointer to a Listing Model 00079 * @param aObserver Pointer to a CLF Operation Observer 00080 */ 00081 CCEMusicView( MCLFContentListingEngine* aEngine, 00082 MCLFItemListModel* aModel, 00083 CCEOperationObserver* aObserver ); 00084 00085 /** 00086 * Symbian 2nd phase constructor. 00087 */ 00088 void ConstructL(); 00089 00090 public: // Functions from base classes 00091 00092 /** 00093 * From CAknView. Handle user's commands. 00094 */ 00095 void HandleCommandL( TInt aCommand ); 00096 00097 /** 00098 * From CAknView. Get Id of the view. 00099 */ 00100 TUid Id() const; 00101 00102 /** 00103 * From CAknView. Activate the view. 00104 */ 00105 void DoActivateL(const TVwsViewId& aPrevViewId, 00106 TUid aCustomMessageId, 00107 const TDesC8& aCustomMessage); 00108 00109 /** 00110 * From CAknView. Deactivate the view. 00111 */ 00112 void DoDeactivate(); 00113 00114 /** 00115 * From CAknView. Handle change of rect. 00116 */ 00117 void HandleClientRectChange(); 00118 00119 /** 00120 * From CAknView. Dim items of the menu pane. 00121 */ 00122 void DynInitMenuPaneL( TInt aResourceId, 00123 CEikMenuPane* aMenuPane ); 00124 00125 public: // New functions 00126 00127 /** 00128 * Changed item observer will call this function when some item has 00129 * changed. 00130 */ 00131 void ItemsChangedL(); 00132 00133 /** 00134 * List all files from the list model to the list box. 00135 */ 00136 void PopulateListBoxL(); 00137 00138 private: // New functions 00139 00140 /** 00141 * Renames selected music file. 00142 * @param aFileIndex Index number of the selected file to be renamed 00143 */ 00144 void RenameMusicFileL( const TInt aFileIndex ); 00145 00146 /** 00147 * Query and set sorting options. 00148 */ 00149 void SetSortingL(); 00150 00151 private: // Data 00152 00153 // Container of music view (owned) 00154 CCEMusicContainer* iContainer; 00155 00156 // Content listing engine (not owned) 00157 MCLFContentListingEngine* iEngine; 00158 00159 // Content listing model (not owned) 00160 MCLFItemListModel* iModel; 00161 00162 // Operation observer for CLF operations (not owned) 00163 CCEOperationObserver* iObserver; 00164 00165 // Sound player for playing audio files (owned) 00166 CCESoundPlayer* iSoundPlayer; 00167 00168 // Wait note dialog for indicating refreshing process of the List Model 00169 // (owned) 00170 CCEWaitNote* iWaitNote; 00171 00172 // Default sorting style for sorting the model (owned) 00173 MCLFSortingStyle* iSortingStyle; 00174 00175 // Secondary sorting style for sorting the model (owned) 00176 MCLFSortingStyle* iSecondarySortingStyle; 00177 00178 // Custom sorting style for randomizing the model (owned) 00179 CCECustomSorter* iCustomSorter; 00180 00181 // List item for items that have no tag info (owned) 00182 HBufC* iNoTagInfoItem; 00183 00184 // For waiting the ansychronous refresh operation to complete 00185 CActiveSchedulerWait iWait; 00186 00187 }; 00188 00189 #endif // __CCEMUSICVIEW_H__ 00190 00191 // End of File
|
© Nokia 2009 |