1 /* |
|
2 * Copyright (c) 2005-2006 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: Shortcut plug-in shortcut extensions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAISCUTSHORTCUTEXT_H |
|
20 #define CAISCUTSHORTCUTEXT_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <badesca.h> |
|
24 #include <aicontentpublisher.h> |
|
25 |
|
26 #include "caiscutshortcut.h" |
|
27 #include "mpopupeventhandleractions.h" |
|
28 |
|
29 class CPopupEventHandler; |
|
30 class MAiScutExtData; |
|
31 |
|
32 /** |
|
33 * |
|
34 * The class extends CAiScutShortcut by offering means to store |
|
35 * changeable popup text lines. The class overrides content publishing |
|
36 * functions from base class. |
|
37 * |
|
38 * @since S60 v3.2 |
|
39 */ |
|
40 class CAiScutShortcutExt : public CAiScutShortcut, |
|
41 public MPopupEventHandlerActions |
|
42 { |
|
43 public: |
|
44 /** |
|
45 * Factory function |
|
46 * @see CAiScutShortcut |
|
47 * @since S60 v3.2 |
|
48 */ |
|
49 static CAiScutShortcutExt* NewL( TInt aId, const TDesC& aTarget, |
|
50 CAiScutEngine& aEngine ); |
|
51 |
|
52 /** |
|
53 * Factory function |
|
54 * @see CAiScutShortcut |
|
55 * @since S60 v3.2 |
|
56 */ |
|
57 static CAiScutShortcutExt* NewLC( TInt aId, const TDesC& aTarget, |
|
58 CAiScutEngine& aEngine ); |
|
59 |
|
60 /** |
|
61 * Destructor |
|
62 * @since S60 v3.2 |
|
63 */ |
|
64 ~CAiScutShortcutExt(); |
|
65 |
|
66 private: |
|
67 CAiScutShortcutExt( TInt aId, CAiScutEngine& aEngine ); |
|
68 void ConstructL( const TDesC& aTarget ); |
|
69 |
|
70 public: // New functions |
|
71 /** |
|
72 * @return Definition string of active target |
|
73 * @since S60 v3.2 |
|
74 */ |
|
75 TPtrC ActiveTargetDefinition() const; |
|
76 |
|
77 /** |
|
78 * Handles events (e.g. gain/lost focus) from AI framework |
|
79 * @param aEvent Event |
|
80 * @since S60 v3.2 |
|
81 */ |
|
82 void HandleAIEventL( TInt aEvent ); |
|
83 |
|
84 /** |
|
85 * Handles Resumed event |
|
86 * @param aResumeReason Resume reason |
|
87 * @since S60 v3.2 |
|
88 */ |
|
89 void HandleResumed( TAiTransitionReason aResumeReason ); |
|
90 |
|
91 /** |
|
92 * Set extension data |
|
93 * @param aAiScutExtData Pointer to new extension data |
|
94 * @since S60 v3.2 |
|
95 */ |
|
96 void SetAiScutExtData( const MAiScutExtData* aAiScutExtData ); |
|
97 |
|
98 |
|
99 private: // From CAiScutShortcut |
|
100 void PublishL( MAiPropertyExtension& aPlugin, |
|
101 MAiContentObserver& aObserver ); |
|
102 |
|
103 TInt PublishCaption( MAiPropertyExtension& aPlugin, |
|
104 MAiContentObserver& aObserver, TInt aCaptionContentId) const; |
|
105 |
|
106 void PublishPopupText( MAiPropertyExtension& aPlugin, |
|
107 MAiContentObserver& aObserver ) const; |
|
108 |
|
109 TInt PublishIcon( MAiPropertyExtension& aPlugin, |
|
110 MAiContentObserver& aObserver, TInt aIconContentId ); |
|
111 |
|
112 private: // From MPopupEventHandlerActions |
|
113 void IssuePublishShortcut(); |
|
114 |
|
115 private: // data |
|
116 |
|
117 /** |
|
118 * Extension data |
|
119 * Ref. |
|
120 */ |
|
121 const MAiScutExtData* iAiScutExtData; |
|
122 |
|
123 /** |
|
124 * Flag that tells whether to publish or clean the popup text box. |
|
125 * The flag is controlled by iPopupEventHandler |
|
126 * Own. |
|
127 */ |
|
128 //TBool iPublishLineArray; |
|
129 |
|
130 /** |
|
131 * Handler of various events, includes state machine |
|
132 * Own. |
|
133 */ |
|
134 CPopupEventHandler* iPopupEventHandler; |
|
135 |
|
136 /** |
|
137 * Pointer to previous popup line array. This is used detect changes |
|
138 * in data. |
|
139 * Ref. |
|
140 */ |
|
141 const MDesCArray* iPreviousPopupLineArray; |
|
142 |
|
143 /** |
|
144 * Pointer to previous icon. This is used detect changes |
|
145 * in data. |
|
146 * Ref. |
|
147 */ |
|
148 const CGulIcon* iPreviousIcon; |
|
149 |
|
150 /** |
|
151 * Has the icon changed |
|
152 */ |
|
153 TBool iIconChanged; |
|
154 |
|
155 /** |
|
156 * Has the text changed |
|
157 */ |
|
158 TBool iTextChanged; |
|
159 |
|
160 }; |
|
161 |
|
162 #endif // CAISCUTSHORTCUTEXT_H |
|
163 |
|
164 // End of File. |
|