|
1 /* |
|
2 * Copyright (c) 2007 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MCCRESOURCEITERATORS_H |
|
22 #define MCCRESOURCEITERATORS_H |
|
23 |
|
24 #include <e32std.h> |
|
25 |
|
26 class CMccResourceContainer; |
|
27 class CMccResourceItem; |
|
28 class TMccResourceParams; |
|
29 |
|
30 enum TMccIteratorMatchType |
|
31 { |
|
32 ExactMatch, |
|
33 ExactReverseMatch |
|
34 }; |
|
35 |
|
36 |
|
37 /** |
|
38 * Resource container iterator. |
|
39 * |
|
40 * @lib |
|
41 */ |
|
42 class TMccResourceContainerIterator |
|
43 { |
|
44 public: // Constructors & Destructor |
|
45 |
|
46 TMccResourceContainerIterator( const RPointerArray<CMccResourceContainer>& aContainers ); |
|
47 |
|
48 TMccResourceContainerIterator( const RPointerArray<CMccResourceContainer>& aContainers, |
|
49 TMccResourceParams& aResourceParams ); |
|
50 |
|
51 TMccResourceContainerIterator( const RPointerArray<CMccResourceContainer>& aContainers, |
|
52 TUint32 aEndpointId ); |
|
53 |
|
54 public: // new functions |
|
55 |
|
56 TBool Next( CMccResourceContainer*& aCandidate, |
|
57 TMccIteratorMatchType aMatchType = ExactMatch ); |
|
58 |
|
59 void Reset(); |
|
60 |
|
61 TInt Current(); |
|
62 |
|
63 TBool IsEof(); |
|
64 |
|
65 TInt Delete( RPointerArray<CMccResourceContainer>& aContainers ); |
|
66 |
|
67 private: // NOT owned data |
|
68 |
|
69 const RPointerArray<CMccResourceContainer>& iContainers; |
|
70 |
|
71 TInt iCurrentIndex; |
|
72 |
|
73 TMccResourceParams* iResourceParams; |
|
74 |
|
75 TUint32 iEndpointId; |
|
76 |
|
77 }; |
|
78 |
|
79 /** |
|
80 * Resource item iterator. |
|
81 * |
|
82 * @lib |
|
83 */ |
|
84 class TMccResourceItemIterator |
|
85 { |
|
86 public: // Constructors & Destructor |
|
87 |
|
88 TMccResourceItemIterator( |
|
89 const RPointerArray<CMccResourceItem>& aItems, |
|
90 TBool aOnlyInternals = EFalse, |
|
91 TBool aOnlySinks = EFalse, |
|
92 TBool aOnlySources = EFalse ); |
|
93 |
|
94 TMccResourceItemIterator( |
|
95 const RPointerArray<CMccResourceItem>& aItems, |
|
96 TUid aUid ); |
|
97 |
|
98 TMccResourceItemIterator( |
|
99 const RPointerArray<CMccResourceItem>& aItems, |
|
100 TUid aUid, |
|
101 TMccResourceParams& aResourceParams ); |
|
102 |
|
103 TMccResourceItemIterator( |
|
104 const RPointerArray<CMccResourceItem>& aItems, |
|
105 TMccResourceParams& aResourceParams ); |
|
106 |
|
107 TMccResourceItemIterator( |
|
108 const RPointerArray<CMccResourceItem>& aItems, |
|
109 TUint32 aEndpointId ); |
|
110 |
|
111 public: // new functions |
|
112 |
|
113 TBool Next( CMccResourceItem*& aCandidate, |
|
114 TMccIteratorMatchType aMatchType = ExactMatch ); |
|
115 |
|
116 void Reset(); |
|
117 |
|
118 TInt Current(); |
|
119 |
|
120 TBool IsEof(); |
|
121 |
|
122 private: // NOT owned data |
|
123 |
|
124 const RPointerArray<CMccResourceItem>& iItems; |
|
125 |
|
126 TInt iCurrentIndex; |
|
127 |
|
128 TBool iOnlyInternals; |
|
129 |
|
130 TBool iOnlySinks; |
|
131 |
|
132 TBool iOnlySources; |
|
133 |
|
134 TUid iUid; |
|
135 |
|
136 TMccResourceParams* iResourceParams; |
|
137 |
|
138 TUint32 iEndpointId; |
|
139 |
|
140 }; |
|
141 |
|
142 #endif //MCCRESOURCEITERATORS_H |
|
143 |