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