108 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL start"))); |
108 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL start"))); |
109 |
109 |
110 ClearWepKeys( aSettings); |
110 ClearWepKeys( aSettings); |
111 |
111 |
112 aSettings.Id = iWLANRecord->RecordId(); |
112 aSettings.Id = iWLANRecord->RecordId(); |
|
113 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.Id: %d"), |
|
114 aSettings.Id)); |
113 |
115 |
114 aSettings.Name = *((CMDBField<TDesC>*)iWLANRecord->GetFieldByIdL(KCDTIdRecordName)); |
116 aSettings.Name = *((CMDBField<TDesC>*)iWLANRecord->GetFieldByIdL(KCDTIdRecordName)); |
|
117 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.Name: %S [%d]"), |
|
118 &aSettings.Name, aSettings.Name.Length())); |
115 |
119 |
116 aSettings.ServiceID = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanServiceId)); |
120 aSettings.ServiceID = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanServiceId)); |
|
121 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.ServiceID: %d"), |
|
122 aSettings.ServiceID)); |
117 |
123 |
118 aSettings.ConnectionMode = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanConnMode)); |
124 aSettings.ConnectionMode = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanConnMode)); |
|
125 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.ConnectionMode: %d"), |
|
126 aSettings.ConnectionMode)); |
119 |
127 |
120 aSettings.SSID = *((CMDBField<TDesC>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanSSID)); |
128 aSettings.SSID = *((CMDBField<TDesC>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanSSID)); |
|
129 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.SSID: %S [%d]"), |
|
130 &aSettings.SSID, aSettings.SSID.Length())); |
121 |
131 |
122 // new |
132 // new |
123 aSettings.UsedSSID = *((CMDBField<TDesC>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanUsedSSID)); |
133 aSettings.UsedSSID = *((CMDBField<TDesC>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanUsedSSID)); |
|
134 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.UsedSSID: %S [%d]"), |
|
135 &aSettings.UsedSSID, aSettings.UsedSSID.Length())); |
124 |
136 |
125 aSettings.ScanSSID = *((CMDBField<TBool>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanScanSSID)); |
137 aSettings.ScanSSID = *((CMDBField<TBool>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanScanSSID)); |
126 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL ScanSSID = %d"),aSettings.ScanSSID)); |
138 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.ScanSSID: %d"), |
|
139 aSettings.ScanSSID)); |
127 |
140 |
128 aSettings.ChannelID = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanChannelID)); |
141 aSettings.ChannelID = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanChannelID)); |
|
142 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.ChannelID: %d"), |
|
143 aSettings.ChannelID)); |
|
144 |
129 // end new |
145 // end new |
130 |
146 |
131 aSettings.AuthenticationMode = EWepAuthModeOpen; // defaults to open (in case of wep, the value will be read from db later) |
147 aSettings.AuthenticationMode = EWepAuthModeOpen; // defaults to open (in case of wep, the value will be read from db later) |
132 aSettings.EnableWpaPsk = EFalse; |
148 aSettings.EnableWpaPsk = EFalse; |
133 aSettings.WPAKeyLength = 0; |
149 aSettings.WPAKeyLength = 0; |
|
150 aSettings.WPAPreSharedKey.Zero(); |
|
151 aSettings.PresharedKeyFormat = EWlanPresharedKeyFormatAscii; |
134 |
152 |
135 aSettings.SecurityMode = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanSecMode)); |
153 aSettings.SecurityMode = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanSecMode)); |
136 |
154 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.SecurityMode: %d"), |
137 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL, SecurityMode = %d"),aSettings.SecurityMode)); |
155 aSettings.SecurityMode)); |
138 |
156 |
139 if( aSettings.SecurityMode == Wep) |
157 if( aSettings.SecurityMode == Wep) |
140 { |
158 { |
141 // authentication mode can be != open only when WEP in use |
159 // authentication mode can be != open only when WEP in use |
142 aSettings.AuthenticationMode = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanAuthMode)); |
160 aSettings.AuthenticationMode = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanAuthMode)); |
|
161 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.AuthenticationMode: %d"), |
|
162 aSettings.AuthenticationMode)); |
143 |
163 |
144 aSettings.WepIndex = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanWepIndex)); |
164 aSettings.WepIndex = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanWepIndex)); |
145 ReadWepKeysL(aSettings); |
165 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.WepIndex: %d"), |
|
166 aSettings.WepIndex)); |
|
167 ReadWepKeysL(aSettings); |
146 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL, Wep keys succesfully read"))); |
168 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL, Wep keys succesfully read"))); |
147 } |
169 } |
148 else if( aSettings.SecurityMode > Wep) |
170 else if( aSettings.SecurityMode > Wep) |
149 { |
171 { |
150 aSettings.WPAKeyLength = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanWpaKeyLength)); |
172 aSettings.WPAKeyLength = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanWpaKeyLength)); |
|
173 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.WPAKeyLength: %d"), |
|
174 aSettings.WPAKeyLength)); |
151 aSettings.EnableWpaPsk = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanEnableWpaPsk)); |
175 aSettings.EnableWpaPsk = *((CMDBField<TUint32>*)iWLANRecord->GetFieldByIdL(KCDTIdWlanEnableWpaPsk)); |
152 aSettings.PresharedKeyFormat = EWlanPresharedKeyFormatAscii; |
176 TraceDump(WARNING_LEVEL,(_L("CWlanSettings::GetDataL() - aSettings.EnableWpaPsk: %d"), |
153 aSettings.WPAPreSharedKey.Zero(); |
177 aSettings.EnableWpaPsk)); |
154 CMDBField<TDesC8>* wpaKey = static_cast<CMDBField<TDesC8>*>(iWLANRecord->GetFieldByIdL(KCDTIdWlanWpaPreSharedKey)); |
178 CMDBField<TDesC8>* wpaKey = static_cast<CMDBField<TDesC8>*>(iWLANRecord->GetFieldByIdL(KCDTIdWlanWpaPreSharedKey)); |
155 |
|
156 aSettings.WPAPreSharedKey.Append( *wpaKey); |
179 aSettings.WPAPreSharedKey.Append( *wpaKey); |
157 |
180 |
158 // In WPA-PSK case the preshared key can be either 8 - 63 characters in ASCII |
181 // In WPA-PSK case the preshared key can be either 8 - 63 characters in ASCII |
159 // or 64 characters in hex. |
182 // or 64 characters in hex. |
160 // |
183 // |