|
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 * Timer implementation designed for always online timed operations |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __ALWAYSONLINEEMAILPLUGINTIMER_H__ |
|
21 #define __ALWAYSONLINEEMAILPLUGINTIMER_H__ |
|
22 |
|
23 //INCLUDES |
|
24 #include <msvapi.h> |
|
25 |
|
26 /** |
|
27 * CAlwaysOnlineEmailPluginTimer |
|
28 * |
|
29 */ |
|
30 class CAlwaysOnlineEmailPluginTimer : public CMsvOperation |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * NewL |
|
35 * Symbian OS constructor. |
|
36 * @param CMsvSession&, session reference |
|
37 * @param TRequestStatus&, request status |
|
38 * @return CAlwaysOnlineEmailPluginTimer*, self pointer |
|
39 */ |
|
40 static CAlwaysOnlineEmailPluginTimer* NewL( |
|
41 CMsvSession& aMsvSession, TRequestStatus& aStatus ); |
|
42 |
|
43 |
|
44 /** |
|
45 * ~CAlwaysOnlineEmailPluginTimer |
|
46 * destructor |
|
47 */ |
|
48 virtual ~CAlwaysOnlineEmailPluginTimer(); |
|
49 |
|
50 private: |
|
51 /** |
|
52 * CAlwaysOnlineEmailPluginTimer |
|
53 * @param CMsvSession&, session reference |
|
54 * @param TInt, priority |
|
55 * @param TRequestStatus&, request status |
|
56 */ |
|
57 CAlwaysOnlineEmailPluginTimer( |
|
58 CMsvSession& aMsvSession, |
|
59 TInt aPriority, |
|
60 TRequestStatus& aObserverRequestStatus ); |
|
61 |
|
62 /** |
|
63 * ConstructL |
|
64 * Symbian OS second phase constructor. |
|
65 */ |
|
66 void ConstructL(); |
|
67 |
|
68 public: |
|
69 |
|
70 /** |
|
71 * ProgressL |
|
72 * @return TDesC8&, progress |
|
73 */ |
|
74 virtual const TDesC8& ProgressL(); |
|
75 |
|
76 /** |
|
77 * At |
|
78 * @param const TTime&, time when to complete |
|
79 */ |
|
80 void At(const TTime& aTime); |
|
81 |
|
82 |
|
83 protected: |
|
84 |
|
85 /** |
|
86 * DoCancel |
|
87 * From CActive |
|
88 */ |
|
89 virtual void DoCancel(); |
|
90 |
|
91 /** |
|
92 * RunL |
|
93 * From CActive |
|
94 */ |
|
95 virtual void RunL(); |
|
96 |
|
97 /** |
|
98 * Function to handle error during running the operation |
|
99 * @since Series60 2.6 |
|
100 * @return KErrNone, when error has been handled |
|
101 */ |
|
102 virtual TInt RunError( TInt aError ); |
|
103 |
|
104 protected: // Data |
|
105 RTimer iTimer; |
|
106 TBuf8<1> iProgress; |
|
107 TTime iCompletionTime; |
|
108 }; |
|
109 |
|
110 |
|
111 #endif |
|
112 //EOF |