|
1 /* |
|
2 * Copyright (c) 2008-2009 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 */ |
|
16 |
|
17 #ifndef CPBK2ICONCUSTOMAPITESTPLUGIN_H |
|
18 #define CPBK2ICONCUSTOMAPITESTPLUGIN_H |
|
19 |
|
20 // INCLUDES |
|
21 #include <CContactCustomIconPluginBase.h> |
|
22 |
|
23 // FORWARD DECLARATIONS |
|
24 class CCustomIconDecisionData; |
|
25 class CCustomIconIdMap; |
|
26 class CPeriodic; |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // Implementation UID of this plug-in. |
|
31 const TInt KCPbk2IconCustomApiTestPluginImplValue = 0x10208413; |
|
32 const TUid KCPbk2IconCustomApiTestPluginImpl = |
|
33 { KCPbk2IconCustomApiTestPluginImplValue }; |
|
34 |
|
35 |
|
36 // CLASS DECLARATION |
|
37 /** |
|
38 * This is example implementation of UI customization plugin. |
|
39 */ |
|
40 class CPbk2IconCustomApiTestPlugin : |
|
41 public CContactCustomIconPluginBase |
|
42 { |
|
43 |
|
44 public: |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 */ |
|
48 static CPbk2IconCustomApiTestPlugin* NewL(); |
|
49 ~CPbk2IconCustomApiTestPlugin(); |
|
50 |
|
51 public: // API implementation from base class |
|
52 |
|
53 void AddObserverL( MCustomIconChangeObserver* aObserver ); |
|
54 |
|
55 void RemoveObserver( MCustomIconChangeObserver* aObserver ); |
|
56 |
|
57 CCustomIconIdMap* IconsL( TUid aContext, TIconSizeHint aSizeHint ); |
|
58 |
|
59 TBool IconChoiceL( const CCustomIconDecisionData& aHint, |
|
60 TCustomIconId& aIdResult ); |
|
61 |
|
62 CGulIcon* IconL( const CCustomIconDecisionData& aHint, |
|
63 TIconSizeHint aSizeHint ); |
|
64 |
|
65 CGulIcon* IconL( TCustomIconId aIconId, TIconSizeHint aSizeHint ); |
|
66 |
|
67 CGulIcon* IconL( TUid aContext, |
|
68 TCustomIconId aIconId, |
|
69 TIconSizeHint aSizeHint ); |
|
70 |
|
71 private: // Implementation |
|
72 |
|
73 static TInt Tick( TAny* aObject ); |
|
74 void NotifyObserversL(); |
|
75 |
|
76 private: // Construction and destruction |
|
77 |
|
78 /** |
|
79 * C++ default constructor. |
|
80 */ |
|
81 CPbk2IconCustomApiTestPlugin(); |
|
82 |
|
83 /** |
|
84 * By default Symbian 2nd phase constructor is private. |
|
85 */ |
|
86 void ConstructL(); |
|
87 |
|
88 private: // data |
|
89 |
|
90 TInt64 iSeed; |
|
91 RArray<MCustomIconChangeObserver*> iObservers; |
|
92 CPeriodic* iTimer; |
|
93 }; |
|
94 |
|
95 |
|
96 #endif // CPBK2ICONCUSTOMAPITESTPLUGIN_H |