|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Timer class for event handling delays |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef IPSPLGEVENTTIMER_H |
|
19 #define IPSPLGEVENTTIMER_H |
|
20 |
|
21 #include <msvapi.h> |
|
22 |
|
23 struct TIpsPlgEvent |
|
24 { |
|
25 TFSMailMsgId iAccountId; |
|
26 TFSMailEvent iEvent; |
|
27 TAny* iArg1; |
|
28 TAny* iArg2; |
|
29 TAny* iArg3; |
|
30 }; |
|
31 |
|
32 /** |
|
33 * Event timer. When timer expires, it passes it's event to FS framework |
|
34 */ |
|
35 class CIpsPlgEventTimer : public CMsvOperation |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * |
|
41 */ |
|
42 static CIpsPlgEventTimer* NewL( |
|
43 CMsvSession& aMsvSession, |
|
44 TInt aPriority, |
|
45 TRequestStatus& aObserverRequestStatus, |
|
46 TIpsPlgEvent aEvent, |
|
47 MFSMailEventObserver& aObserver ); |
|
48 |
|
49 /** |
|
50 * |
|
51 */ |
|
52 virtual ~CIpsPlgEventTimer(); |
|
53 |
|
54 /** |
|
55 * |
|
56 */ |
|
57 void ConstructL(); |
|
58 |
|
59 /** |
|
60 * |
|
61 */ |
|
62 virtual const TDesC8& ProgressL(); |
|
63 |
|
64 |
|
65 /** |
|
66 * |
|
67 */ |
|
68 void After(TTimeIntervalMicroSeconds32 aInterval); |
|
69 |
|
70 |
|
71 protected: |
|
72 |
|
73 /** |
|
74 * From CActive |
|
75 */ |
|
76 virtual void DoCancel(); |
|
77 |
|
78 /** |
|
79 * From CActive |
|
80 */ |
|
81 virtual void RunL(); |
|
82 |
|
83 /** |
|
84 * |
|
85 */ |
|
86 CIpsPlgEventTimer( |
|
87 CMsvSession& aMsvSession, |
|
88 TInt aPriority, |
|
89 TRequestStatus& aObserverRequestStatus, |
|
90 TIpsPlgEvent aEvent, |
|
91 MFSMailEventObserver& aObserver ); |
|
92 |
|
93 protected: // Data |
|
94 |
|
95 RTimer iTimer; |
|
96 TBuf8<1> iProgress; |
|
97 TIpsPlgEvent iEvent; |
|
98 MFSMailEventObserver& iObserver; |
|
99 }; |
|
100 |
|
101 |
|
102 |
|
103 #endif//IPSPLGEVENTTIMER_H |