|
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: Declaration of mail icon handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __FSMAIL_ICON_HANDLER_H__ |
|
20 #define __FSMAIL_ICON_HANDLER_H__ |
|
21 |
|
22 #include <coreapplicationuisdomainpskeys.h> |
|
23 |
|
24 #include "fsnotificationhandlerbase.h" |
|
25 #include "fsnotificationhandlertimerobserver.h" |
|
26 |
|
27 class CFSNotificationHandlerTimer; |
|
28 |
|
29 |
|
30 /** |
|
31 * Class to handle email icon. |
|
32 * A handler for observing inputs into email framework, setting icon on |
|
33 * if a message addition is performed on a Inbox folder. |
|
34 */ |
|
35 class CFSMailIconHandler : public CFSNotificationHandlerBase, |
|
36 public MFSNotificationHandlerTimerObserver |
|
37 { |
|
38 public: |
|
39 |
|
40 enum TState |
|
41 { |
|
42 EStarting, |
|
43 EStarted, |
|
44 EFailed |
|
45 }; |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @param aOwner Owner and manager of this handler. |
|
50 */ |
|
51 static CFSMailIconHandler* NewL( MFSNotificationHandlerMgr& aOwner ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CFSMailIconHandler(); |
|
57 |
|
58 |
|
59 // From base class MFSNotificationHandlerTimerObserver |
|
60 virtual void TimerCallBackL( TInt aError ); |
|
61 |
|
62 |
|
63 |
|
64 // from base class CFSNotificationHandlerBase |
|
65 virtual void HandleEventL( |
|
66 TFSMailEvent aEvent, |
|
67 TFSMailMsgId aMailbox, |
|
68 TAny* aParam1, |
|
69 TAny* aParam2, |
|
70 TAny* aParam3 ); |
|
71 private: |
|
72 |
|
73 /** |
|
74 * Constructor. |
|
75 * |
|
76 * @param aOwner Owner and manager of this handler. |
|
77 */ |
|
78 CFSMailIconHandler( MFSNotificationHandlerMgr& aOwner ); |
|
79 void ConstructL(); |
|
80 |
|
81 TInt TestIcon(); |
|
82 |
|
83 TInt SetProperty( TUid aCategory, TUint aKey, TInt aValue ); |
|
84 |
|
85 // from base class CFSNotificationHandlerBase |
|
86 virtual void TurnNotificationOn(); |
|
87 virtual void TurnNotificationOff(); |
|
88 |
|
89 private: // data |
|
90 |
|
91 TState iState; |
|
92 TInt iRetryCount; |
|
93 |
|
94 /** |
|
95 * Timer service. |
|
96 * Own. |
|
97 */ |
|
98 CFSNotificationHandlerTimer* iTimer; |
|
99 |
|
100 |
|
101 }; |
|
102 |
|
103 |
|
104 #endif //__FSMAIL_ICON_HANDLER_H__ |