|
1 /* |
|
2 * Copyright (c) 2005-2006 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: Class for manipulating scan channels masks. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CORE_SCAN_CHANNELS_H |
|
20 #define CORE_SCAN_CHANNELS_H |
|
21 |
|
22 #include "core_types.h" |
|
23 |
|
24 /** |
|
25 * This class implements a storage for channel masks. |
|
26 * |
|
27 * @since S60 v3.2 |
|
28 */ |
|
29 NONSHARABLE_CLASS( core_scan_channels_c ) |
|
30 { |
|
31 |
|
32 public: |
|
33 |
|
34 /** |
|
35 * Constructor. |
|
36 */ |
|
37 core_scan_channels_c(); |
|
38 |
|
39 /** |
|
40 * Constructor. |
|
41 */ |
|
42 core_scan_channels_c( |
|
43 const core_scan_channels_s& channels ); |
|
44 |
|
45 /** |
|
46 * Constructor. |
|
47 */ |
|
48 core_scan_channels_c( |
|
49 const core_scan_channels_c& channels ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~core_scan_channels_c(); |
|
55 |
|
56 /** |
|
57 * Return the current channel mask as a struct. |
|
58 * |
|
59 * @since S60 v3.2 |
|
60 * @return The current channel mask as a struct. |
|
61 */ |
|
62 const core_scan_channels_s& channels(); |
|
63 |
|
64 /** |
|
65 * Set the current channel mask to the given mask. |
|
66 * |
|
67 * @since S60 v3.2 |
|
68 * @param channels The channel mask to set. |
|
69 */ |
|
70 void set( |
|
71 const core_scan_channels_s& channels ); |
|
72 |
|
73 /** |
|
74 * Set the current channel mask to the given mask. |
|
75 * |
|
76 * @since S60 v3.2 |
|
77 * @param channels The channel mask to set. |
|
78 */ |
|
79 void set( |
|
80 const core_scan_channels_c& channels ); |
|
81 |
|
82 /** |
|
83 * Merge the current channel mask with the given mask. |
|
84 * |
|
85 * @since S60 v3.2 |
|
86 * @param channels The channel mask to merge. |
|
87 */ |
|
88 void merge( |
|
89 const core_scan_channels_c& channels ); |
|
90 |
|
91 /** |
|
92 * Add the given channel to the channel mask. |
|
93 * |
|
94 * @since S60 v3.2 |
|
95 * @param band Band of the scan channel. |
|
96 * @param channel Channel to add. |
|
97 */ |
|
98 void add( |
|
99 u8_t band, |
|
100 u8_t channel ); |
|
101 |
|
102 /** |
|
103 * Inverts the current channel mask. |
|
104 */ |
|
105 void invert_channels(); |
|
106 |
|
107 /** |
|
108 * Remove the given channel from the channel mask. |
|
109 * |
|
110 * @since S60 v5.0 |
|
111 * @param band Band of the scan channel. |
|
112 * @param channel Channel to remove. |
|
113 */ |
|
114 void remove( |
|
115 u8_t band, |
|
116 u8_t channel ); |
|
117 |
|
118 /** |
|
119 * Check whether the channel mask on the given band is empty. |
|
120 * |
|
121 * @since S60 v3.2 |
|
122 * @param band Band of the scan channel. |
|
123 * @return true_t if the mask is empty, false_t otherwise. |
|
124 */ |
|
125 bool_t is_empty( |
|
126 u8_t band ); |
|
127 |
|
128 private: // data |
|
129 |
|
130 /** |
|
131 * The current channels for 2.4GHz range. |
|
132 */ |
|
133 u16_t channels2dot4ghz_m; |
|
134 |
|
135 /** |
|
136 * The current channel mask. |
|
137 */ |
|
138 core_scan_channels_s channel_mask_m; |
|
139 |
|
140 }; |
|
141 |
|
142 #endif // CORE_SCAN_CHANNELS_H |