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 xSP extension server class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAISCUTEXTSERVER_H |
|
20 #define CAISCUTEXTSERVER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <w32std.h> |
|
24 |
|
25 #include "maiscutextmessagehandler.h" |
|
26 #include "aicontentpublisher.h" |
|
27 |
|
28 class CAiScutExtServer; |
|
29 class CAknMessageQueryDialog; |
|
30 |
|
31 /** |
|
32 * |
|
33 * Helper class for passing parameters to the callback function. |
|
34 * |
|
35 * @since S60 v3.2 |
|
36 */ |
|
37 class CLinkParams : public CBase |
|
38 { |
|
39 public: |
|
40 |
|
41 CLinkParams(CAiScutExtServer& aServer, HBufC* aTargetDefinition); |
|
42 |
|
43 ~CLinkParams(); |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Reference to the server object. |
|
49 * Ref. |
|
50 */ |
|
51 CAiScutExtServer& iServer; |
|
52 |
|
53 /** |
|
54 * Application identifier. |
|
55 * Own. |
|
56 */ |
|
57 HBufC* iTargetDefinition; |
|
58 |
|
59 /** |
|
60 * The dialog that owns the link.. |
|
61 * Ref. |
|
62 */ |
|
63 CAknMessageQueryDialog* iNote; |
|
64 }; |
|
65 |
|
66 /** |
|
67 * Server class for xSP extensions. |
|
68 * |
|
69 * Handles sessions. |
|
70 * |
|
71 * @since S60 v3.2 |
|
72 */ |
|
73 class CAiScutExtServer : public CServer2 |
|
74 { |
|
75 public: |
|
76 /** |
|
77 * Constructor |
|
78 * @param aObserver Reference to observer |
|
79 * @since S60 v3.2 |
|
80 */ |
|
81 CAiScutExtServer( MAiScutExtMessageHandler& aObserver, RWsSession& aWsSession ); |
|
82 |
|
83 /** |
|
84 * 2nd-phase constructor |
|
85 * @since S60 v3.2 |
|
86 */ |
|
87 void ConstructL(); |
|
88 |
|
89 /** |
|
90 * Destructor |
|
91 * @since S60 v3.2 |
|
92 */ |
|
93 ~CAiScutExtServer(); |
|
94 |
|
95 private: // From CServer2 |
|
96 |
|
97 CSession2* NewSessionL( |
|
98 const TVersion& aVersion, const RMessage2& aMessage ) const; |
|
99 |
|
100 private: // New methods |
|
101 |
|
102 void ReadAppListL(); |
|
103 |
|
104 void WriteAppListL(); |
|
105 |
|
106 static TInt LinkCallBack(TAny* aParam); |
|
107 |
|
108 static TInt IdleCallBack(TAny* aParam); |
|
109 |
|
110 void DoShowTipMessageL(); |
|
111 |
|
112 public: |
|
113 |
|
114 TBool HasConnectedBefore( TUid& aUid, const RMessage2& aMessage ); |
|
115 |
|
116 void ShowTipMessage( TUid aUid ); |
|
117 |
|
118 void ResumeL( TAiTransitionReason aReason ); |
|
119 |
|
120 private: // data |
|
121 |
|
122 /** |
|
123 * Reference to observer |
|
124 * Ref. |
|
125 */ |
|
126 MAiScutExtMessageHandler& iObserver; |
|
127 |
|
128 /** |
|
129 * Reference to Window Server session |
|
130 * Ref. |
|
131 */ |
|
132 RWsSession& iWsSession; |
|
133 |
|
134 /** |
|
135 * List of applications we are not going to |
|
136 * show the tip dialog. |
|
137 * Own. |
|
138 */ |
|
139 RArray<TUid> iUids; |
|
140 |
|
141 /** |
|
142 * List of applications to show the dialog. |
|
143 * |
|
144 * Own. |
|
145 */ |
|
146 RArray<TUid> iShowUids; |
|
147 |
|
148 /** |
|
149 * Resource offset for releasing the resoruce on destruction. |
|
150 * |
|
151 * Own. |
|
152 */ |
|
153 TInt iResourceOffset; |
|
154 |
|
155 /** |
|
156 * CIdle for the tip dialog |
|
157 * |
|
158 * Own. |
|
159 */ |
|
160 CIdle* iIdle; |
|
161 |
|
162 /** |
|
163 * Foreground/background indication |
|
164 * |
|
165 */ |
|
166 TBool iIsForeground; |
|
167 |
|
168 /** |
|
169 * Tip message visible indication |
|
170 * |
|
171 */ |
|
172 TBool iIsTipMessageVisible; |
|
173 }; |
|
174 |
|
175 #endif // CAISCUTEXTSERVER_H |
|
176 |
|
177 // End of File. |
|