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 Operation Observer. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CFLDOPERATIONOBSERVER_H__ |
|
21 #define __CFLDOPERATIONOBSERVER_H__ |
|
22 |
|
23 // INTERNAL INCLUDES |
|
24 |
|
25 // EXTERNAL INCLUDES |
|
26 #include <e32base.h> |
|
27 #include <MCLFOperationObserver.h> |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * CLF Operation Observer. |
|
33 * CFLDOperationObserver receives operation events of Content |
|
34 * Listing Framework. Operation event is generated when asynchronous refresh |
|
35 * operation of List Model is finished. |
|
36 */ |
|
37 NONSHARABLE_CLASS( CFLDOperationObserver ) |
|
38 : public CBase, |
|
39 public MCLFOperationObserver |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Creates and returns a new instance of this class. |
|
45 * @return Pointer to the CFLDOperationObserver object |
|
46 */ |
|
47 static CFLDOperationObserver* NewL(); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CFLDOperationObserver(); |
|
53 |
|
54 private: // Constructors |
|
55 /** |
|
56 * C++ default constructor. |
|
57 */ |
|
58 CFLDOperationObserver(); |
|
59 |
|
60 protected: // Methods derived from MCLFOperationObserver |
|
61 |
|
62 void HandleOperationEventL( TCLFOperationEvent aOperationEvent, |
|
63 TInt aError ); |
|
64 |
|
65 public: // New functions |
|
66 |
|
67 /** |
|
68 * Check if there is a refresh operation is ongoing. |
|
69 * @return ETrue if refresh is not finished, |
|
70 * EFalse if refresh is finished |
|
71 */ |
|
72 TBool IsRefreshOngoing(); |
|
73 |
|
74 /** |
|
75 * Prepare for a refresh operation to start. |
|
76 * @param aWait The wait instance to stop when refreshing is completed |
|
77 */ |
|
78 void PrepareForRefresh( CActiveSchedulerWait& aWait ); |
|
79 |
|
80 private: // Data |
|
81 |
|
82 /// Own: For waiting the refresh operation to complete |
|
83 CActiveSchedulerWait* iWait; |
|
84 |
|
85 // For indicating that refresh operation is started but not finished |
|
86 TBool iRefreshOngoing; |
|
87 |
|
88 }; |
|
89 |
|
90 #endif // __CFLDOperationObserver_H__ |
|
91 |
|
92 // End of File |
|