|
1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __ASSRVITERATORBYSTATUS_H__ |
|
17 #define __ASSRVITERATORBYSTATUS_H__ |
|
18 |
|
19 // System includes |
|
20 #include <e32base.h> |
|
21 |
|
22 // User includes |
|
23 #include "ASSrvIteratorBase.h" |
|
24 #include "ASSrvDefs.h" |
|
25 |
|
26 // Type definitions |
|
27 |
|
28 // Constants |
|
29 |
|
30 // Enumerations |
|
31 |
|
32 // Classes referenced |
|
33 |
|
34 |
|
35 // |
|
36 // ----> RASSrvIteratorByStatus (header) |
|
37 // |
|
38 /** |
|
39 * Locate alarms by their status |
|
40 */ |
|
41 class RASSrvIteratorByStatus : public RASSrvIteratorBase |
|
42 { |
|
43 // |
|
44 public: // ENUMERATIONS |
|
45 // |
|
46 /** |
|
47 * The match type |
|
48 */ |
|
49 enum TStatusMatchType |
|
50 { |
|
51 /** |
|
52 * The status must match |
|
53 */ |
|
54 EStatusMustMatch = 0, |
|
55 |
|
56 /** |
|
57 * The status must not match |
|
58 */ |
|
59 EStatusMustNotMatch = 1 |
|
60 }; |
|
61 |
|
62 // |
|
63 public: // CONSTRUCT |
|
64 // |
|
65 |
|
66 /** |
|
67 * Constructor |
|
68 * |
|
69 * @param aQueue The alarm queue |
|
70 * @param aStatus The alarm status to use as search criteria |
|
71 * @param aMatchType The match type |
|
72 */ |
|
73 RASSrvIteratorByStatus(CASSrvAlarmQueue& aQueue, TAlarmStatus aStatus, TStatusMatchType aMatchType = EStatusMustMatch); |
|
74 |
|
75 // |
|
76 public: // ACCESS |
|
77 // |
|
78 |
|
79 /** |
|
80 * Change the category for this iterator. Resets the iterator back to the start |
|
81 * of the queue |
|
82 */ |
|
83 void SetStatus(TAlarmStatus aStatus, TStatusMatchType aMatchType = EStatusMustMatch); |
|
84 |
|
85 // |
|
86 private: // FROM RASSrvIteratorBase |
|
87 // |
|
88 |
|
89 /** |
|
90 * @see RASSrvIteratorBase |
|
91 */ |
|
92 TBool Matches(const TASSrvAlarm& aAlarm) const; |
|
93 |
|
94 // |
|
95 private: // MEMBER DATA |
|
96 // |
|
97 |
|
98 /** |
|
99 * The matching status |
|
100 */ |
|
101 TAlarmStatus iStatus; |
|
102 |
|
103 /** |
|
104 * The match type |
|
105 */ |
|
106 TStatusMatchType iMatchType; |
|
107 |
|
108 }; |
|
109 |
|
110 #endif |