|
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 * CMsgErrorDiskSpaceObserver declaration file |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MSGERRORDISKSPACEOBSERVER_H |
|
22 #define MSGERRORDISKSPACEOBSERVER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <f32file.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CMsgErrorWatcher; |
|
30 class CMsvSession; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * CMsgErrorDiskSpaceObserver |
|
36 * |
|
37 * @lib msgerrorwatcher.dll |
|
38 * @since 2.0 |
|
39 */ |
|
40 class CMsgErrorDiskSpaceObserver : public CActive |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * |
|
47 * @param aWatcher A pointer to CMsgErrorWatcher |
|
48 * @param aSession A reference to message server session |
|
49 * @param aFs A reference to file session |
|
50 */ |
|
51 static CMsgErrorDiskSpaceObserver* NewL( CMsgErrorWatcher* aWatcher, CMsvSession& aSession, RFs& aFs ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CMsgErrorDiskSpaceObserver(); |
|
57 |
|
58 public: // New functions |
|
59 |
|
60 /** |
|
61 * Updates the trigger limit to aLimit, if it |
|
62 * is smaller than current limit. (Re)activates |
|
63 * the active object. |
|
64 * |
|
65 * @param aLimit The trigger limit in bytes |
|
66 */ |
|
67 void SetLimitAndActivateL( TInt32 aLimit ); |
|
68 |
|
69 private: |
|
70 |
|
71 /** |
|
72 * Private C++ constructor. |
|
73 * |
|
74 * @param aWatcher A pointer to CMsgErrorWatcher |
|
75 * @param aSession A reference to message server session |
|
76 * @param aFs A reference to file session |
|
77 */ |
|
78 CMsgErrorDiskSpaceObserver( CMsgErrorWatcher* aWatcher, CMsvSession& aSession, RFs& aFs ); |
|
79 |
|
80 private: |
|
81 |
|
82 /** |
|
83 * From CActive |
|
84 */ |
|
85 void RunL(); |
|
86 |
|
87 /** |
|
88 * From CActive |
|
89 */ |
|
90 void DoCancel(); |
|
91 |
|
92 private: // Data |
|
93 |
|
94 CMsgErrorWatcher* iWatcher; |
|
95 CMsvSession& iSession; |
|
96 RFs& iFs; |
|
97 TInt32 iLimit; |
|
98 }; |
|
99 |
|
100 #endif // MSGERRORDISKSPACEOBSERVER_H |
|
101 |
|
102 // End of File |