equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "debug.h" |
18 #include "debug.h" |
19 #include "lcstylustapdismount.h" |
19 #include "lcstylustapdismount.h" |
20 #include "driveinfo.h" |
|
21 |
20 |
22 // --------------------------------------------------------------------------- |
21 // --------------------------------------------------------------------------- |
23 // Destructor. |
22 // Destructor. |
24 // --------------------------------------------------------------------------- |
23 // --------------------------------------------------------------------------- |
25 // |
24 // |
124 // Dismount next drive |
123 // Dismount next drive |
125 // --------------------------------------------------------------------------- |
124 // --------------------------------------------------------------------------- |
126 // |
125 // |
127 void CLcStylusTapDismount::DoDismount() |
126 void CLcStylusTapDismount::DoDismount() |
128 { |
127 { |
129 TRACE_FUNC |
128 TRACE_FUNC |
130 TUint driveStatus( 0 ); |
129 TDriveInfo info; |
131 |
130 TInt err = KErrNone; |
132 for ( ; iDriveIndex < KMaxDrives; iDriveIndex++ ) |
131 for ( ; iDriveIndex < KMaxDrives; iDriveIndex++ ) |
133 { |
132 { |
134 if ( iDriveList[iDriveIndex] ) |
133 if ( iDriveList[iDriveIndex] ) |
135 { |
134 { |
136 DriveInfo::GetDriveStatus( iRFs, iDriveIndex, driveStatus ); |
135 err = iRFs.Drive( info , iDriveIndex ); |
137 if ( driveStatus & DriveInfo::EDriveUsbMemory ) |
136 if ( info.iConnectionBusType == EConnectionBusUsb && |
|
137 info.iDriveAtt & KDriveAttExternal && |
|
138 err == KErrNone ) |
138 { |
139 { |
139 TRACE_INFO(_L("CLcStylusTapDismount::DoDismount Dismount notify request ")); |
140 TRACE_INFO(_L("CLcStylusTapDismount::DoDismount Dismount notify request ")); |
140 iRFs.NotifyDismount( iDriveIndex, iStatus, EFsDismountNotifyClients ); |
141 iRFs.NotifyDismount( iDriveIndex, iStatus, EFsDismountNotifyClients ); |
141 TRAP_IGNORE( iDismountTimer = CForceDismountTimer::NewL(this) ); |
142 TRAP_IGNORE( iDismountTimer = CForceDismountTimer::NewL(this) ); |
142 SetActive(); |
143 SetActive(); |