160 aCaEntry->SetFlags( EVisible ); |
161 aCaEntry->SetFlags( EVisible ); |
161 } |
162 } |
162 if( aEntry->IsRemovable() ) |
163 if( aEntry->IsRemovable() ) |
163 { |
164 { |
164 aCaEntry->SetFlags( aCaEntry->GetFlags() | ERemovable ); |
165 aCaEntry->SetFlags( aCaEntry->GetFlags() | ERemovable ); |
165 } |
166 |
|
167 TChar drive; |
|
168 RBuf drives; |
|
169 drives.CreateL(KMaxFileName); |
|
170 CleanupClosePushL( drives ); |
|
171 const TInt driveListLen(aEntry->InstalledDrives().Length()); |
|
172 for (TInt i( 0 ); i < driveListLen; ++i) |
|
173 { |
|
174 // Skip PhoneMemory and if we have some icon resolved |
|
175 if (aEntry->InstalledDrives()[i] != '\0' && drives.Length() == 0 |
|
176 && (DriveInfo::GetDefaultDrive( |
|
177 DriveInfo::EDefaultPhoneMemory, drive ) == KErrNone |
|
178 && TChar('A'+ i) != TChar(drive))) |
|
179 { |
|
180 TUint drvStatus( 0 ); |
|
181 int err = DriveInfo::GetDriveStatus( iFs, i, drvStatus ); |
|
182 if ( ( drvStatus & DriveInfo::EDriveInternal ) && |
|
183 ( drvStatus & DriveInfo::EDriveExternallyMountable ) ){ |
|
184 // Mass Storage |
|
185 drives.Append(_L("qtg_mono_hard_disk")); |
|
186 } |
|
187 else if(drvStatus & DriveInfo::EDriveRemote || |
|
188 drvStatus & DriveInfo::EDriveUsbMemory) |
|
189 { |
|
190 // Usb or remote drive |
|
191 drives.Append(_L("qtg_mono_usb")); |
|
192 } |
|
193 else if( ( drvStatus & DriveInfo::EDriveRemovable ) && |
|
194 ( drvStatus & DriveInfo::EDriveExternallyMountable ) ) |
|
195 { |
|
196 // MMC |
|
197 drives.Append(_L("qtg_mono_memory_in_use")); |
|
198 } |
|
199 } |
|
200 } |
|
201 if (drives.Length() > 0) { |
|
202 aCaEntry->AddAttributeL( KCaAttrDrivesIconIds, drives ); |
|
203 } |
|
204 CleanupStack::PopAndDestroy( &drives ); |
|
205 } |
|
206 |
|
207 |
166 // entries obtained with usif should have component id. |
208 // entries obtained with usif should have component id. |
167 //it's needed for uninstalling |
209 //it's needed for uninstalling |
168 RBuf compIdDesc; |
210 RBuf compIdDesc; |
169 CleanupClosePushL( compIdDesc ); |
211 CleanupClosePushL( compIdDesc ); |
170 compIdDesc.CreateL( KCaMaxAttrValueLen ); |
212 compIdDesc.CreateL( KCaMaxAttrValueLen ); |