|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CCSRVSESSION_H |
|
19 #define CCSRVSESSION_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 |
|
24 // Forward declarations |
|
25 #include "ccsrv.h" |
|
26 |
|
27 /** |
|
28 * Home screen content control server session |
|
29 * |
|
30 * |
|
31 * @code |
|
32 * |
|
33 * @endcode |
|
34 * |
|
35 * @lib ccsrv.exe |
|
36 * @since S60 v5.0 |
|
37 */ |
|
38 class CCcSrvSession : public CSession2 |
|
39 { |
|
40 public: // Constructor and destructor |
|
41 /** |
|
42 * Constructor |
|
43 */ |
|
44 CCcSrvSession(); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CCcSrvSession(); |
|
50 |
|
51 public: // From CSession2 |
|
52 /** |
|
53 * |
|
54 */ |
|
55 void CreateL(); |
|
56 |
|
57 /** |
|
58 * |
|
59 */ |
|
60 void ServiceL( |
|
61 const RMessage2& aMessage ); |
|
62 |
|
63 public: // New functions |
|
64 /** |
|
65 * |
|
66 */ |
|
67 TUint32 Id(); |
|
68 |
|
69 /** |
|
70 * |
|
71 */ |
|
72 void SetId( TUint32 aId ); |
|
73 |
|
74 /** |
|
75 * |
|
76 * |
|
77 */ |
|
78 void RegisterObserverSessionL( |
|
79 TUint32 aObserver ); |
|
80 |
|
81 /** |
|
82 * |
|
83 * |
|
84 */ |
|
85 void UnregisterObserverSessionL( |
|
86 TUint32 aObserver ); |
|
87 |
|
88 /** |
|
89 * |
|
90 * |
|
91 */ |
|
92 void ReceiveMsgL( |
|
93 TUint32 aSender, |
|
94 TUint32 aReceiver, |
|
95 CCcSrvMsg& aMessage ); |
|
96 |
|
97 private: |
|
98 /** |
|
99 * |
|
100 * |
|
101 */ |
|
102 inline CCcSrv& Server() |
|
103 { |
|
104 return *static_cast<CCcSrv*>( const_cast<CServer2*>( CSession2::Server() ) ); |
|
105 }; |
|
106 |
|
107 /** |
|
108 * |
|
109 */ |
|
110 void DoServiceL( |
|
111 RMessage2& aMessage ); |
|
112 |
|
113 |
|
114 /** |
|
115 * |
|
116 * |
|
117 */ |
|
118 void HandleRegisterProviderL( |
|
119 RMessage2& aMessage ); |
|
120 |
|
121 /** |
|
122 * |
|
123 * |
|
124 */ |
|
125 void HandleRegisterObserverL( |
|
126 RMessage2& aMessage ); |
|
127 |
|
128 /** |
|
129 * |
|
130 * |
|
131 */ |
|
132 void HandleCancelReqL( |
|
133 RMessage2& aMessage ); |
|
134 |
|
135 /** |
|
136 * |
|
137 * |
|
138 */ |
|
139 void HandleWaitForApiReqL( |
|
140 RMessage2& aMessage ); |
|
141 |
|
142 /** |
|
143 * |
|
144 * |
|
145 */ |
|
146 void HandleWaitForApiNtfL( |
|
147 RMessage2& aMessage ); |
|
148 |
|
149 /** |
|
150 * |
|
151 * |
|
152 */ |
|
153 void HandleApiReqL( |
|
154 RMessage2& aMessage ); |
|
155 |
|
156 /** |
|
157 * |
|
158 * |
|
159 */ |
|
160 void HandleApiRespL( |
|
161 RMessage2& aMessage ); |
|
162 |
|
163 /** |
|
164 * |
|
165 * |
|
166 */ |
|
167 void HandleGetMsgDataL( |
|
168 RMessage2& aMessage ); |
|
169 |
|
170 /** |
|
171 * |
|
172 * |
|
173 */ |
|
174 void HandleApiNtfL( |
|
175 RMessage2& aMessage ); |
|
176 |
|
177 /** |
|
178 * |
|
179 * |
|
180 */ |
|
181 void SendObserverNtfL( |
|
182 TUint32 aSender, |
|
183 TUint32 aNtf ); |
|
184 |
|
185 private: // Data |
|
186 /** |
|
187 * Session id |
|
188 */ |
|
189 TUint32 iId; |
|
190 |
|
191 /** |
|
192 * Last used transaction id |
|
193 */ |
|
194 TInt iLastTrId; |
|
195 |
|
196 /** |
|
197 * Outstanding transactions |
|
198 */ |
|
199 RPointerArray<CCcSrvMsg> iRequests; |
|
200 |
|
201 /** |
|
202 * Observers |
|
203 */ |
|
204 RArray<TUint32> iObservers; |
|
205 |
|
206 }; |
|
207 |
|
208 #endif // CCSRVSESSION_H |
|
209 |
|
210 // End of file |