|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * CMsgGarbageCollection declaration file |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MSGGARBAGECOLLECTION_H |
|
22 #define MSGGARBAGECOLLECTION_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 #include <e32base.h> |
|
27 #include <msvapi.h> |
|
28 |
|
29 #include "MsgErrorWatcher.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 |
|
33 class CClientMtmRegistry; |
|
34 class CBaseMtm; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * CMsgGarbageCollection |
|
40 * |
|
41 * @lib msgerrorwatcher.dll |
|
42 * @since 3.2 |
|
43 */ |
|
44 class CMsgGarbageCollection : public CActive |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 * |
|
51 * @param aSession A pointer to CMsvSession |
|
52 */ |
|
53 static CMsgGarbageCollection* NewL( CClientMtmRegistry& aMtmRegistry ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 ~CMsgGarbageCollection(); |
|
59 |
|
60 private: |
|
61 |
|
62 /** |
|
63 * By default Symbian OS constructor is private. |
|
64 */ |
|
65 void ConstructL(); |
|
66 |
|
67 /** |
|
68 * Private C++ constructor. |
|
69 * |
|
70 * @param aSession A pointer to CMsvSession |
|
71 */ |
|
72 CMsgGarbageCollection( CClientMtmRegistry& aMtmRegistry ); |
|
73 |
|
74 /** |
|
75 * |
|
76 */ |
|
77 void StartWaiting(); |
|
78 |
|
79 /** |
|
80 * |
|
81 */ |
|
82 void WapPushGarbageCollectionL(); |
|
83 |
|
84 private: //from CActive |
|
85 |
|
86 /** |
|
87 * From CActive |
|
88 */ |
|
89 void RunL(); |
|
90 |
|
91 /** |
|
92 * From CActive |
|
93 */ |
|
94 void DoCancel(); |
|
95 |
|
96 private: // Data |
|
97 |
|
98 enum TGarbageCollectionState |
|
99 { |
|
100 EGarbageCollectionWaiting, |
|
101 EGarbageCollectionWapPush |
|
102 }; |
|
103 |
|
104 CClientMtmRegistry& iMtmRegistry; |
|
105 CBaseMtm* iWapMtm; |
|
106 CMsvOperation* iOp; |
|
107 |
|
108 TGarbageCollectionState iState; |
|
109 RTimer iTimer; |
|
110 |
|
111 }; |
|
112 |
|
113 #endif // MSGSENTITEMSOBSERVER_H |
|
114 |
|
115 // End of File |