equal
deleted
inserted
replaced
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #include <glxtracer.h> |
19 #include <glxtracer.h> |
20 #include <glxlog.h> |
20 #include <glxlog.h> |
21 #include <driveinfo.h> |
21 |
22 #include "glxmmcnotifier.h" |
22 #include "glxmmcnotifier.h" |
23 |
23 |
24 // --------------------------------------------------------- |
24 // --------------------------------------------------------- |
25 // CGlxMMCNotifier::NewL |
25 // CGlxMMCNotifier::NewL |
26 // --------------------------------------------------------- |
26 // --------------------------------------------------------- |
90 void CGlxMMCNotifier::ConstructL() |
90 void CGlxMMCNotifier::ConstructL() |
91 { |
91 { |
92 TRACER("CGlxMMCNotifier::ConstructL()"); |
92 TRACER("CGlxMMCNotifier::ConstructL()"); |
93 TInt err = iFs.Connect(); |
93 TInt err = iFs.Connect(); |
94 GLX_LOG_INFO1("CGlxMMCNotifier::ConstructL iFs.Connect err %d",err ); |
94 GLX_LOG_INFO1("CGlxMMCNotifier::ConstructL iFs.Connect err %d",err ); |
95 |
|
96 User::LeaveIfError(DriveInfo::GetDefaultDrive( |
|
97 DriveInfo::EDefaultRemovableMassStorage, iDefaultMemoryCardDrive)); |
|
98 GLX_LOG_INFO1("CGlxMMCNotifier::ConstructL iFs.Connect iDrive %d", |
|
99 iDefaultMemoryCardDrive ); |
|
100 IssueRequest(); |
95 IssueRequest(); |
101 } |
96 } |
102 |
97 |
103 // --------------------------------------------------------- |
98 // --------------------------------------------------------- |
104 // CGlxMMCNotifier::DoCancel() |
99 // CGlxMMCNotifier::DoCancel() |
117 void CGlxMMCNotifier::RunL() |
112 void CGlxMMCNotifier::RunL() |
118 { |
113 { |
119 TRACER("CGlxMMCNotifier::RunL()"); |
114 TRACER("CGlxMMCNotifier::RunL()"); |
120 TDriveInfo driveInfo; |
115 TDriveInfo driveInfo; |
121 // Get the drive info for memory card |
116 // Get the drive info for memory card |
122 TInt err = iFs.Drive(driveInfo, iDefaultMemoryCardDrive); |
117 TInt err = iFs.Drive( driveInfo, EDriveF ); |
123 GLX_LOG_INFO1("CGlxMMCNotifier::RunL driveInfo err=%d", err); |
118 GLX_LOG_INFO1("CGlxMMCNotifier::RunL err %d",err ); |
124 if (err == KErrNone && (driveInfo.iDriveAtt & KDriveAttRemovable)) |
119 if( err == KErrNone ) |
125 { |
120 { |
126 GLX_LOG_INFO1("CGlxMMCNotifier::RunL driveInfo.iDriveAtt=%d", |
121 switch( driveInfo.iType ) |
127 driveInfo.iDriveAtt); |
|
128 switch (driveInfo.iType) |
|
129 { |
122 { |
130 case EMediaNotPresent: |
123 case EMediaNotPresent: |
131 { |
124 { |
132 //MMC removed don't do anything |
125 //MMC removed don't do anything |
133 iNotify.HandleMMCRemovalL(); |
126 iNotify.HandleMMCRemovalL(); |