|
1 /* |
|
2 * Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Check disk space if it is under Critical Level |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CVPBKFFSCHECK_H |
|
21 #define C_CVPBKFFSCHECK_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> // CBase |
|
25 |
|
26 namespace VPbkEngUtils { |
|
27 |
|
28 /** |
|
29 * Disk space check helper class. |
|
30 * |
|
31 * @lib VPbkEngUtils.dll |
|
32 */ |
|
33 class CVPbkDiskSpaceCheck : public CBase |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * @param aFs Open file system session |
|
40 * |
|
41 * @param aDrive number of the drive to be checked. |
|
42 * (see TDriveNumber of f32file.h) |
|
43 */ |
|
44 IMPORT_C static CVPbkDiskSpaceCheck* NewL( RFs& aFs, TInt aDrive ); |
|
45 |
|
46 IMPORT_C ~CVPbkDiskSpaceCheck(); |
|
47 |
|
48 /** |
|
49 * Checks critical disk space level. |
|
50 * Will leave with KErrDiskFull if space is below CL |
|
51 * |
|
52 * @param aBytesToWrite how many bytes will be written to FFS. |
|
53 * Default is unknown (=0). Leaves with KErrDiskFull |
|
54 * if not enough space. |
|
55 */ |
|
56 IMPORT_C void DiskSpaceCheckL( TInt aBytesToWrite=0 ); |
|
57 |
|
58 private: |
|
59 |
|
60 CVPbkDiskSpaceCheck( RFs& aFs, TInt aDrive ); |
|
61 |
|
62 private: // data |
|
63 |
|
64 /// Not Owned: Open file system session |
|
65 RFs& iFs; |
|
66 /// Not Owned: Drive which space is checked |
|
67 TInt iDrive; |
|
68 |
|
69 }; |
|
70 |
|
71 } // namespace VPbkEngUtils |
|
72 #endif // C_CVPBKFFSCHECK_H |