|
1 /* |
|
2 * Copyright (c) 2008-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: |
|
15 * Name : strtsecnoterequestqueue.h |
|
16 * Part of : System Startup / StrtSecObs |
|
17 * Declaration of CStrtSecNoteRequestQueue class |
|
18 * Version : %version: 1 % << Don't touch! Updated by Synergy at check-out. |
|
19 * This material, including documentation and any related computer |
|
20 * programs, is protected by copyright controlled by Nokia. All |
|
21 * rights are reserved. Copying, including reproducing, storing, |
|
22 * adapting or translating, any or all of this material requires the |
|
23 * prior written consent of Nokia. This material also contains |
|
24 * confidential information which may not be disclosed to others |
|
25 * without the prior written consent of Nokia. |
|
26 * Template version: 4.2 |
|
27 * Nokia Core OS * |
|
28 * |
|
29 */ |
|
30 |
|
31 |
|
32 |
|
33 #ifndef C_STRTSECNOTEREQUESTQUEUE_H |
|
34 #define C_STRTSECNOTEREQUESTQUEUE_H |
|
35 |
|
36 #include <e32base.h> |
|
37 |
|
38 #include "strtsecuritynotetype.h" |
|
39 |
|
40 /* |
|
41 * @publishedPartner |
|
42 * @released |
|
43 */ |
|
44 |
|
45 /** |
|
46 * A queue of TStrtSecurityNoteType items. |
|
47 * The queue contains at most one item of each type (no duplicates). |
|
48 * Items can be added to the end of the queue, and taken out from the beginning. |
|
49 * An item can be removed anywhere from the queue by type. |
|
50 * |
|
51 * lib : strtsecobs.lib |
|
52 * @since S60 3.2 |
|
53 */ |
|
54 NONSHARABLE_CLASS( CStrtSecNoteRequestQueue ) : public CBase |
|
55 { |
|
56 |
|
57 public: |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 */ |
|
62 static CStrtSecNoteRequestQueue* NewL(); |
|
63 |
|
64 /** |
|
65 * Destructor. |
|
66 */ |
|
67 virtual ~CStrtSecNoteRequestQueue(); |
|
68 |
|
69 /** |
|
70 * Add an item to the queue. |
|
71 * If there already is identical item in the queue, don't add the new item. |
|
72 * |
|
73 * @param aItem The item to add. |
|
74 */ |
|
75 TInt Add( const TStrtSecurityNoteType aItem ); |
|
76 |
|
77 /** |
|
78 * Remove an item from the queue, if there is an item matching the one given |
|
79 * as parameter. |
|
80 * |
|
81 * @param aItem The item to remove. |
|
82 */ |
|
83 void Remove( const TStrtSecurityNoteType aItem ); |
|
84 |
|
85 /** |
|
86 * Remove and return the first item in the queue, or ESecNoteNone if the |
|
87 * queue is empty. |
|
88 * |
|
89 * @return The item that was in front of the queue. |
|
90 */ |
|
91 TStrtSecurityNoteType GetFirst(); |
|
92 |
|
93 private: |
|
94 |
|
95 /** |
|
96 * First phase constructor. |
|
97 */ |
|
98 CStrtSecNoteRequestQueue(); |
|
99 |
|
100 /** |
|
101 * Second phase constructor. |
|
102 */ |
|
103 void ConstructL(); |
|
104 |
|
105 private: // data |
|
106 |
|
107 /** |
|
108 * Array for holding the queue contents. |
|
109 */ |
|
110 RArray<TStrtSecurityNoteType> iArray; |
|
111 |
|
112 #ifdef TEST_CLAYER_MACRO |
|
113 friend class CLayerTestSsmEventObserver; |
|
114 #endif //TEST_CLAYER_MACRO |
|
115 }; |
|
116 |
|
117 #endif // C_STRTSECNOTEREQUESTQUEUE_H |