|
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 the License "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: Iterator for traffic stream list. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: % |
|
20 */ |
|
21 |
|
22 #ifndef CORE_TRAFFIC_STREAM_LIST_ITER_H |
|
23 #define CORE_TRAFFIC_STREAM_LIST_ITER_H |
|
24 |
|
25 #include "core_traffic_stream_list.h" |
|
26 |
|
27 /** |
|
28 * This class implements an iterator for traffic stream list. |
|
29 * |
|
30 * @since S60 v3.2 |
|
31 */ |
|
32 NONSHARABLE_CLASS( core_traffic_stream_list_iter_c ) |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Constructor. |
|
39 * |
|
40 * @param list Reference to the list being iterated. |
|
41 */ |
|
42 core_traffic_stream_list_iter_c( |
|
43 core_traffic_stream_list_c& list ); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~core_traffic_stream_list_iter_c(); |
|
49 |
|
50 /** |
|
51 * Return the first entry in the list. |
|
52 * @return The first entry in the list. NULL if none. |
|
53 */ |
|
54 core_traffic_stream_c* first(); |
|
55 |
|
56 /** |
|
57 * Return the next entry in the list. |
|
58 * @return The next entry in the list. NULL if none. |
|
59 */ |
|
60 core_traffic_stream_c* next(); |
|
61 |
|
62 /** |
|
63 * Return the current entry in the list. |
|
64 * @return The current entry in the list. NULL if none. |
|
65 */ |
|
66 core_traffic_stream_c* current() const; |
|
67 |
|
68 /** |
|
69 * Remove the current entry from the list. |
|
70 * |
|
71 * @return core_error_ok if removed successfully, an error code otherwise. |
|
72 */ |
|
73 core_error_e remove(); |
|
74 |
|
75 private: // data |
|
76 |
|
77 /** |
|
78 * An iterator for iterating the list. |
|
79 */ |
|
80 core_type_list_iterator_c<core_traffic_stream_list_c::entry_s> iter_m; |
|
81 |
|
82 }; |
|
83 |
|
84 #endif // CORE_TRAFFIC_STREAM_LIST_ITER_H |