|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Disk space level watcher for CPbkDefaultCompressionStrategy. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CDISKSPACEWATCHER_H__ |
|
21 #define __CDISKSPACEWATCHER_H__ |
|
22 |
|
23 |
|
24 // CLASS DECLARATION |
|
25 |
|
26 /** |
|
27 * Database compression timeout timer. |
|
28 */ |
|
29 NONSHARABLE_CLASS(CPbkDefaultCompressionStrategy::CDiskSpaceWatcher) : |
|
30 public CActive |
|
31 { |
|
32 public: // Interface |
|
33 /** |
|
34 * Creates a new instance of this class. |
|
35 * @param aCompressionStrategy compressions strategy |
|
36 * @param aFs file server session |
|
37 * @param aThreshold threshold |
|
38 * @param aDrive disk drive |
|
39 */ |
|
40 static CDiskSpaceWatcher* NewL |
|
41 (MPbkCompressionStrategy& aCompressionStrategy, |
|
42 RFs& aFs, TInt64 aThreshold, TInt aDrive); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CDiskSpaceWatcher(); |
|
48 |
|
49 private: // from CActive |
|
50 void DoCancel(); |
|
51 void RunL(); |
|
52 TInt RunError(TInt aError); |
|
53 |
|
54 private: // Implementation |
|
55 CDiskSpaceWatcher |
|
56 (MPbkCompressionStrategy& aCompressionStrategy, |
|
57 RFs& aFs, TInt64 aThreshold, TInt aDrive); |
|
58 void RequestNotification(); |
|
59 |
|
60 private: // Data |
|
61 /// Ref. compression strategy |
|
62 MPbkCompressionStrategy& iCompressionStrategy; |
|
63 /// Ref: file server session |
|
64 RFs iFs; |
|
65 /// Own: threshold |
|
66 TInt64 iThreshold; |
|
67 /// Own: disk drive |
|
68 TInt iDrive; |
|
69 }; |
|
70 |
|
71 #endif // __CDISKSPACEWATCHER_H__ |
|
72 |
|
73 // End of File |