equal
deleted
inserted
replaced
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // INCLUDE FILES |
18 // INCLUDE FILES |
19 #include "widgetscannerutils.h" |
19 #include "widgetscannerutils.h" |
20 #include "cainnerentry.h" |
20 #include "cainnerentry.h" |
21 #include "cadef.h" |
21 #include "cadef.h" |
22 |
22 |
23 // ----------------------------------------------------------------------------- |
23 // ----------------------------------------------------------------------------- |
24 // |
24 // |
25 // ----------------------------------------------------------------------------- |
25 // ----------------------------------------------------------------------------- |
26 // |
26 // |
27 TBool WidgetScannerUtils::IsFileOnDrive(const TDesC& aFileName, |
27 TBool WidgetScannerUtils::IsFileOnDrive(const TDesC& aFileName, |
28 const DriveInfo::TDefaultDrives& aDefaultDrive) |
28 const DriveInfo::TDefaultDrives& aDefaultDrive) |
29 { |
29 { |
30 if (aFileName.Length()) { |
30 if (aFileName.Length()) { |
31 TInt drive; |
31 TInt drive; |
32 TInt err = DriveInfo::GetDefaultDrive(aDefaultDrive, drive); |
32 TInt err = DriveInfo::GetDefaultDrive(aDefaultDrive, drive); |
33 if (!err) { |
33 if (!err) { |
41 return EFalse; |
41 return EFalse; |
42 } |
42 } |
43 |
43 |
44 |
44 |
45 // ----------------------------------------------------------------------------- |
45 // ----------------------------------------------------------------------------- |
46 // |
46 // |
47 // ----------------------------------------------------------------------------- |
47 // ----------------------------------------------------------------------------- |
48 // |
48 // |
49 TUint WidgetScannerUtils::CurrentMmcId( RFs& aFs ) |
49 void WidgetScannerUtils::CurrentMmcId( const RFs& aFs, TDes& aMmcId ) |
50 { |
50 { |
51 TUint mmcId = 0; |
|
52 TInt mmcDrive; |
51 TInt mmcDrive; |
53 if ( DriveInfo::GetDefaultDrive( |
52 if ( DriveInfo::GetDefaultDrive( |
54 DriveInfo::EDefaultRemovableMassStorage, mmcDrive ) == KErrNone ) |
53 DriveInfo::EDefaultRemovableMassStorage, mmcDrive ) == KErrNone ) |
55 { |
54 { |
56 TVolumeInfo volumeInfo; |
55 TVolumeInfo volumeInfo; |
57 if( aFs.Volume( volumeInfo, mmcDrive ) == KErrNone ) |
56 if( aFs.Volume( volumeInfo, mmcDrive ) == KErrNone ) |
58 { |
57 { |
59 mmcId = volumeInfo.iUniqueID; |
58 aMmcId.Zero(); |
|
59 aMmcId.AppendNum( volumeInfo.iUniqueID ); |
60 } |
60 } |
61 } |
61 } |
62 return mmcId; |
|
63 } |
62 } |
64 |
63 |
65 // End of File |
64 // End of File |