|
1 /* |
|
2 * Copyright (c) 2009 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: This class implements MProEngAlertToneSeeker interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CPROENGALERTTONESEEKERIMPL_H |
|
21 #define CPROENGALERTTONESEEKERIMPL_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <MProEngAlertToneSeeker.h> |
|
26 #include <MCLFOperationObserver.h> |
|
27 #include <badesca.h> // CDesCArray |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class MCLFItemListModel; |
|
31 class MCLFContentListingEngine; |
|
32 class CProEngPostFilter; |
|
33 class RFs; |
|
34 class TParse; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * This class implements MProEngAlertToneSeeker interface. |
|
40 * |
|
41 * @lib ProfileEngine.lib |
|
42 * @since 3.1 |
|
43 */ |
|
44 NONSHARABLE_CLASS( CProEngAlertToneSeekerImpl ) : public CBase, |
|
45 public MProEngAlertToneSeeker, |
|
46 public MCLFOperationObserver |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 */ |
|
53 static CProEngAlertToneSeekerImpl* NewL(); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CProEngAlertToneSeekerImpl(); |
|
59 |
|
60 public: // Functions from base classes |
|
61 |
|
62 /** |
|
63 * From MProEngAlertToneSeeker |
|
64 */ |
|
65 void FetchAlertToneListL( MProEngAlertToneSeekerObserver& aObserver ); |
|
66 |
|
67 /** |
|
68 * From MProEngAlertToneSeeker |
|
69 */ |
|
70 void CancelFetch(); |
|
71 |
|
72 /** |
|
73 * From MCLFOperationObserver |
|
74 */ |
|
75 void HandleOperationEventL( TCLFOperationEvent aOperationEvent, |
|
76 TInt aError ); |
|
77 |
|
78 private: // New functions |
|
79 |
|
80 /** |
|
81 * Creates the list model to fetch files through CLF. |
|
82 */ |
|
83 void CreateListModelL(); |
|
84 |
|
85 /** |
|
86 * Read the files in ROM and save them in iRomFiles. |
|
87 */ |
|
88 void CreateRomFileListL(); |
|
89 |
|
90 /** |
|
91 * Helper method for CreateRomFileListL() to handle reading of the |
|
92 * contents of one directory and adding the files found in ROM file |
|
93 * array. |
|
94 */ |
|
95 void AppendRomFilesL( RFs& aFs, const TDesC& aPath, TParse& aParse ); |
|
96 |
|
97 private: |
|
98 |
|
99 /** |
|
100 * C++ default constructor. |
|
101 */ |
|
102 CProEngAlertToneSeekerImpl(); |
|
103 |
|
104 /** |
|
105 * By default Symbian 2nd phase constructor is private. |
|
106 */ |
|
107 void ConstructL(); |
|
108 |
|
109 private: // Data |
|
110 |
|
111 // Own: Array holding the tones/videos in ROM |
|
112 CDesCArray* iRomFiles; |
|
113 |
|
114 // Own: Model for files not in ROM |
|
115 MCLFItemListModel* iModel; |
|
116 |
|
117 // Own: Content listing engine |
|
118 MCLFContentListingEngine* iContentListingEngine; |
|
119 |
|
120 // Ref: client-implemented observer |
|
121 MProEngAlertToneSeekerObserver* iObserver; |
|
122 |
|
123 // Own: Post filter for the list model |
|
124 CProEngPostFilter* iPostFilter; |
|
125 }; |
|
126 |
|
127 #endif // CPROENGALERTTONESEEKERIMPL_H |
|
128 |
|
129 // End of File |
|
130 |