114
|
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 |
CCcSrvMsg& aMessage );
|
|
94 |
|
|
95 |
private:
|
|
96 |
/**
|
|
97 |
*
|
|
98 |
*
|
|
99 |
*/
|
|
100 |
inline CCcSrv& Server()
|
|
101 |
{
|
|
102 |
return *static_cast<CCcSrv*>( const_cast<CServer2*>( CSession2::Server() ) );
|
|
103 |
};
|
|
104 |
|
|
105 |
/**
|
|
106 |
*
|
|
107 |
*/
|
|
108 |
void DoServiceL(
|
|
109 |
RMessage2& aMessage );
|
|
110 |
|
|
111 |
|
|
112 |
/**
|
|
113 |
*
|
|
114 |
*
|
|
115 |
*/
|
|
116 |
void HandleRegisterProviderL(
|
|
117 |
RMessage2& aMessage );
|
|
118 |
|
|
119 |
/**
|
|
120 |
*
|
|
121 |
*
|
|
122 |
*/
|
|
123 |
void HandleRegisterObserverL(
|
|
124 |
RMessage2& aMessage );
|
|
125 |
|
|
126 |
/**
|
|
127 |
*
|
|
128 |
*
|
|
129 |
*/
|
|
130 |
void HandleCancelReqL(
|
|
131 |
RMessage2& aMessage );
|
|
132 |
|
|
133 |
/**
|
|
134 |
*
|
|
135 |
*
|
|
136 |
*/
|
|
137 |
void HandleWaitForApiReqL(
|
|
138 |
RMessage2& aMessage );
|
|
139 |
|
|
140 |
/**
|
|
141 |
*
|
|
142 |
*
|
|
143 |
*/
|
|
144 |
void HandleWaitForApiNtfL(
|
|
145 |
RMessage2& aMessage );
|
|
146 |
|
|
147 |
/**
|
|
148 |
*
|
|
149 |
*
|
|
150 |
*/
|
|
151 |
void HandleApiReqL(
|
|
152 |
RMessage2& aMessage );
|
|
153 |
|
|
154 |
/**
|
|
155 |
*
|
|
156 |
*
|
|
157 |
*/
|
|
158 |
void HandleApiRespL(
|
|
159 |
RMessage2& aMessage );
|
|
160 |
|
|
161 |
/**
|
|
162 |
*
|
|
163 |
*
|
|
164 |
*/
|
|
165 |
void HandleGetMsgDataL(
|
|
166 |
RMessage2& aMessage );
|
|
167 |
|
|
168 |
/**
|
|
169 |
*
|
|
170 |
*
|
|
171 |
*/
|
|
172 |
void HandleApiNtfL(
|
|
173 |
RMessage2& aMessage );
|
|
174 |
|
|
175 |
/**
|
|
176 |
*
|
|
177 |
*
|
|
178 |
*/
|
|
179 |
void SendObserverNtfL(
|
|
180 |
TUint32 aSender,
|
|
181 |
TUint32 aNtf );
|
|
182 |
|
|
183 |
private: // Data
|
|
184 |
/**
|
|
185 |
* Session id
|
|
186 |
*/
|
|
187 |
TUint32 iId;
|
|
188 |
|
|
189 |
/**
|
|
190 |
* Last used transaction id
|
|
191 |
*/
|
|
192 |
TInt iLastTrId;
|
|
193 |
|
|
194 |
/**
|
|
195 |
* Outstanding transactions
|
|
196 |
*/
|
|
197 |
RPointerArray<CCcSrvMsg> iRequests;
|
|
198 |
|
|
199 |
/**
|
|
200 |
* Observers
|
|
201 |
*/
|
|
202 |
RArray<TUint32> iObservers;
|
|
203 |
|
|
204 |
};
|
|
205 |
|
|
206 |
#endif // CCSRVSESSION_H
|
|
207 |
|
|
208 |
// End of file
|