1 /* |
|
2 * Copyright (c) 2007-2008 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: Active object for performing Async filtering |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MULFILTERAO_H_ |
|
20 #define MULFILTERAO_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include <alf/alfvarianttype.h> |
|
25 #include <osn/osndefines.h> |
|
26 |
|
27 #include "mulcallback.h" |
|
28 |
|
29 |
|
30 namespace osncore |
|
31 { |
|
32 template <class T> class CAlfPtrVector; |
|
33 class UString; |
|
34 } |
|
35 using namespace osncore; |
|
36 |
|
37 namespace Alf |
|
38 { |
|
39 //Forward Declaration |
|
40 |
|
41 class MulCacheManager; |
|
42 class MulDataWindow; |
|
43 class MulFilter; |
|
44 class IMulFilterDataProvider; |
|
45 class MulCallback; |
|
46 |
|
47 class MulFilterAo : public CActive |
|
48 { |
|
49 |
|
50 public: //constructor and destructor |
|
51 |
|
52 /** |
|
53 * symbian constcutor |
|
54 * |
|
55 * @param aModel Model refrence |
|
56 */ |
|
57 //static MulFilterAo* NewL( IMulFilterDataProvider& aModel ); |
|
58 |
|
59 /** |
|
60 * Destructor |
|
61 */ |
|
62 ~MulFilterAo(); |
|
63 |
|
64 public: //constructor and destructor |
|
65 |
|
66 /** |
|
67 * C++ constcutor |
|
68 * |
|
69 * @param aModel Model refrence |
|
70 */ |
|
71 MulFilterAo(IMulFilterDataProvider& aModel ); |
|
72 |
|
73 /** |
|
74 * symbian Second phase constructor |
|
75 */ |
|
76 //void ConstructL(); |
|
77 |
|
78 private: //from CActive |
|
79 |
|
80 void RunL(); |
|
81 |
|
82 void DoCancel(); |
|
83 |
|
84 public: //new method |
|
85 |
|
86 /** |
|
87 * Perform Async filtering. Model call this function when SetFilter is called on Model. |
|
88 * After performing async filtering function will notify model via callback object. |
|
89 * |
|
90 * @param aFilter Filter object |
|
91 * @param aCallback Callback object |
|
92 */ |
|
93 void DoAsyncFilter(MulFilter& aFilter,MulCallback aCallback); |
|
94 |
|
95 private: |
|
96 |
|
97 /** |
|
98 * Perform garbage collection operation |
|
99 */ |
|
100 void DoFilter(); |
|
101 |
|
102 private: //data |
|
103 |
|
104 IMulFilterDataProvider& mMulModel; |
|
105 MulFilter* mFilter; //not own |
|
106 MulCallback mCallback; |
|
107 }; |
|
108 |
|
109 } //namespace Alf |
|
110 |
|
111 #endif /*MULFILTERAO_H_*/ |
|
112 |
|
113 //End of file |
|
114 |
|
115 |
|