equal
deleted
inserted
replaced
49 |
49 |
50 Frees resources before destruction of the object. |
50 Frees resources before destruction of the object. |
51 */ |
51 */ |
52 CProxyDrive::~CProxyDrive() |
52 CProxyDrive::~CProxyDrive() |
53 { |
53 { |
54 |
54 delete iBody; |
55 } |
55 } |
56 |
56 |
57 |
57 |
58 /** |
58 /** |
59 An interface with which control commands can be passed to |
59 An interface with which control commands can be passed to |
172 { |
172 { |
173 return(KErrNotSupported); |
173 return(KErrNotSupported); |
174 } |
174 } |
175 |
175 |
176 |
176 |
|
177 TInt CProxyDrive::SetAndOpenLibrary(RLibrary aLibrary) |
|
178 { |
|
179 TInt r = KErrNone; |
|
180 if (iBody) |
|
181 { |
|
182 iBody->iLibrary = aLibrary; |
|
183 r = iBody->iLibrary.Duplicate(RThread(), EOwnerProcess); |
|
184 } |
|
185 return r; |
|
186 } |
|
187 |
|
188 /** |
|
189 Gets a copy of the Proxy Drive library (previously opened by OpenLibrary()) prior to deleting the proxy drive itself. |
|
190 After deleting the proxy drive, RLibrary::Close() should be called on the returned RLibrary object. |
|
191 */ |
|
192 RLibrary CProxyDrive::GetLibrary() |
|
193 { |
|
194 RLibrary lib; |
|
195 if (iBody) |
|
196 { |
|
197 lib = iBody->iLibrary; |
|
198 iBody->iLibrary.SetHandle(NULL); |
|
199 } |
|
200 return lib; |
|
201 } |
|
202 |
177 /** |
203 /** |
178 Constructor. |
204 Constructor. |
179 */ |
205 */ |
180 EXPORT_C CLocDrvMountCB::CLocDrvMountCB() {} |
206 EXPORT_C CLocDrvMountCB::CLocDrvMountCB() {} |
181 |
207 |
187 */ |
213 */ |
188 EXPORT_C CLocDrvMountCB::~CLocDrvMountCB() |
214 EXPORT_C CLocDrvMountCB::~CLocDrvMountCB() |
189 { |
215 { |
190 __PRINT1(_L("CLocDrvMountCB::~CLocDrvMountCB() 0x%x"),this); |
216 __PRINT1(_L("CLocDrvMountCB::~CLocDrvMountCB() 0x%x"),this); |
191 if(iProxyDrive && !LocalDrives::IsProxyDrive(Drive().DriveNumber())) |
217 if(iProxyDrive && !LocalDrives::IsProxyDrive(Drive().DriveNumber())) |
192 delete(iProxyDrive); |
218 { |
|
219 RLibrary lib = iProxyDrive->GetLibrary(); |
|
220 delete iProxyDrive; |
|
221 lib.Close(); |
|
222 } |
193 } |
223 } |
194 |
224 |
195 |
225 |
196 /** |
226 /** |
197 Creates and initialises the local drive. |
227 Creates and initialises the local drive. |