|
1 /* |
|
2 * Copyright (c) 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: Item activator |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _XNITEMACTIVATOR_H |
|
20 #define _XNITEMACTIVATOR_H |
|
21 |
|
22 // System includes |
|
23 #include <e32base.h> |
|
24 |
|
25 // User includes |
|
26 |
|
27 // Forward declarations |
|
28 class CXnAppUiAdapter; |
|
29 class CXnNode; |
|
30 |
|
31 /** |
|
32 * Item activator |
|
33 * |
|
34 * @ingroup group_xnlayoutengine |
|
35 * @lib xn3layoutengine.lib |
|
36 * @since S60 5.2 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CXnItemActivator ) : public CTimer |
|
39 { |
|
40 public: |
|
41 // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CXnItemActivator* NewL( CXnAppUiAdapter& aAppUiAdapter ); |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. Leaving on stack |
|
50 */ |
|
51 static CXnItemActivator* NewLC( CXnAppUiAdapter& aAppUiAdapter ); |
|
52 |
|
53 /** |
|
54 * Destructor |
|
55 */ |
|
56 ~CXnItemActivator(); |
|
57 |
|
58 private: |
|
59 // private constructors |
|
60 |
|
61 /** |
|
62 * Leaving constructor |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 /** |
|
67 * C++ default constructor |
|
68 */ |
|
69 CXnItemActivator( CXnAppUiAdapter& aAppUiAdapter ); |
|
70 |
|
71 private: |
|
72 // from CTimer |
|
73 |
|
74 /** |
|
75 * @see CTimer |
|
76 */ |
|
77 void RunL(); |
|
78 |
|
79 /** |
|
80 * @see CTimer |
|
81 */ |
|
82 TInt RunError( TInt aError ); |
|
83 |
|
84 /** |
|
85 * @see CTimer |
|
86 */ |
|
87 void DoCancel(); |
|
88 |
|
89 public: |
|
90 // new functions |
|
91 |
|
92 /** |
|
93 * Schedules item activation. |
|
94 * Outstanding activation is cancelled. |
|
95 * |
|
96 * @since S60 5.2 |
|
97 * @param aItemToActivate Item to activate |
|
98 */ |
|
99 void Activate( CXnNode* aItemToActivate ); |
|
100 |
|
101 private: |
|
102 // data |
|
103 |
|
104 /** AppUiAdapter, not owned */ |
|
105 CXnAppUiAdapter& iAppUiAdapter; |
|
106 /** Activate trigger, owned */ |
|
107 CXnNode* iTrigger; |
|
108 /** Item to activate, not owned */ |
|
109 CXnNode* iItemToActivate; |
|
110 }; |
|
111 |
|
112 #endif // _XNITEMACTIVATOR_H |
|
113 |
|
114 // End of file |