|
1 /* |
|
2 * Copyright (c) 2005-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: Session class for Mediator Server |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MEDIATORSERVERSESSION_H |
|
20 #define MEDIATORSERVERSESSION_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 #include "MediatorCommon.h" |
|
27 #include "MediatorServerEventHandler.h" |
|
28 #include "MediatorServerCommandHandler.h" |
|
29 #include "MediatorServerObjectHandler.h" |
|
30 #include "MediatorServerObjects.h" |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CMediatorServer; |
|
35 class CMediatorQueItem; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Session class for Mediator Server. |
|
41 * |
|
42 * @lib MediatorServer |
|
43 * @since S60 3.1 |
|
44 */ |
|
45 class CMediatorServerSession : public CSession2, |
|
46 public MMediatorServerEventObserver, |
|
47 public MMediatorServerNotificationObserver, |
|
48 public MMediatorCommandObserver, |
|
49 public MMediatorCommandResponseObserver |
|
50 { |
|
51 public: // Construction and destruction |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CMediatorServerSession(); |
|
56 |
|
57 /** |
|
58 * Two-phased constructor. |
|
59 */ |
|
60 static CMediatorServerSession* NewL(); |
|
61 |
|
62 public: // from CSession2 |
|
63 |
|
64 /** |
|
65 * Handles the servicing of a client request that has been passed |
|
66 * to the server. |
|
67 * @since S60 3.1 |
|
68 * @param aMessage message to be served |
|
69 * @return None. |
|
70 */ |
|
71 void ServiceL( const RMessage2& aMessage ); |
|
72 |
|
73 /** |
|
74 * Reports error thas has occurred during service. |
|
75 * |
|
76 * @since S60 3.1 |
|
77 * @param aMessage message that was served |
|
78 * @param aError error code of service error |
|
79 * @return None. |
|
80 */ |
|
81 |
|
82 void ServiceError(const RMessage2& aMessage,TInt aError); |
|
83 |
|
84 public: // from MMediatorCommandObserver |
|
85 |
|
86 /** |
|
87 * A Mediator Service command. |
|
88 * |
|
89 * @since S60 3.1 |
|
90 * @param aDomain The identifier of the domain |
|
91 * @param aCategory The identifier of the category. |
|
92 * @param aCommandId The identifier of the command. |
|
93 * @param aVersion The version information of the command. |
|
94 * @param aData The parameters of the command. |
|
95 * @return None. |
|
96 */ |
|
97 void MediatorCommandL( TUid aDomain, |
|
98 TUid aCategory, |
|
99 TInt aCommandId, |
|
100 TVersion aVersion, |
|
101 const TDesC8& aData ); |
|
102 |
|
103 /** |
|
104 * Cancel a Mediator Service command. |
|
105 * |
|
106 * @since S60 3.1 |
|
107 * @param aDomain The identifier of the domain |
|
108 * @param aCategory The identifier of the category. |
|
109 * @param aCommandId The identifier of the command. |
|
110 * @return None. |
|
111 */ |
|
112 void CancelMediatorCommandL( TUid aDomain, |
|
113 TUid aCategory, |
|
114 TInt aCommandId ); |
|
115 |
|
116 /** |
|
117 * Mediator command timeout has occurred |
|
118 * |
|
119 * @since S60 3.1 |
|
120 * @param aDomain The identifier of the domain |
|
121 * @param aCategory The identifier of the category. |
|
122 * @param aCommandId The identifier of the command. |
|
123 * @return None. |
|
124 */ |
|
125 void MediatorCommandTimeoutL( TUid aDomain, |
|
126 TUid aCategory, |
|
127 TInt aCommandId ); |
|
128 public: |
|
129 |
|
130 /** |
|
131 * A response to a Mediator Service command. |
|
132 * |
|
133 * @since S60 3.1 |
|
134 * @param aDomain The identifier of the domain |
|
135 * @param aCategory The identifier of the category. |
|
136 * @param aCommandId The identifier of the command. |
|
137 * @param aStatus Standard Symbian error code indicating the |
|
138 * success of the command. |
|
139 * @param aData The parameters of the response. |
|
140 * @return None. |
|
141 */ |
|
142 void CommandResponseL( TUid aDomain, |
|
143 TUid aCategory, |
|
144 TInt aCommandId, |
|
145 TInt aStatus, |
|
146 const TDesC8& aData ); |
|
147 |
|
148 public: // from MMediatorServerEventObserver |
|
149 |
|
150 /** |
|
151 * A Mediator Service event. |
|
152 * |
|
153 * @since S60 3.1 |
|
154 * @param aDomain The identifier of the domain. |
|
155 * @param aCategory The identifier of the category. |
|
156 * @param aEventId The identifier of the event. |
|
157 * @param aData The parameters of the event. |
|
158 * @return None. |
|
159 */ |
|
160 void MediatorEventL( TUid aDomain, |
|
161 TUid aCategory, |
|
162 TInt aEventId, |
|
163 const TDesC8& aData ); |
|
164 |
|
165 public: // from MMediatorServerNotificationObserver |
|
166 |
|
167 /** |
|
168 * Events have been registered. The events can now be subscribed. |
|
169 * The list can contain 1-n new events into the category. |
|
170 * |
|
171 * @since S60 3.1 |
|
172 * @param aDomain The identifier of the domain. |
|
173 * @param aCategory The identifier of the category. |
|
174 * @param aEvents The list of events that have been registered. |
|
175 * @return None. |
|
176 */ |
|
177 void MediatorEventsAddedL( TUid aDomain, |
|
178 TUid aCategory, |
|
179 const REventList& aEvents ); |
|
180 |
|
181 /** |
|
182 * New commands have been registered. The commands can now be subscribed. |
|
183 * The list can contain 1-n new commands into the category. |
|
184 * |
|
185 * @since S60 3.1 |
|
186 * @param aDomain The identifier of the domain. |
|
187 * @param aCategory The identifier of the category. |
|
188 * @param aCommands List of commands that have been registered. |
|
189 * @return None. |
|
190 */ |
|
191 void MediatorCommandsAddedL( TUid aDomain, |
|
192 TUid aCategory, |
|
193 const RCommandList& aCommands ); |
|
194 |
|
195 /** |
|
196 * A category has been removed. All subscriptions are cancelled. |
|
197 * |
|
198 * @since S60 3.1 |
|
199 * @param aDomain The identifier of the domain. |
|
200 * @param aCategory The identifier of the category. |
|
201 * @return None. |
|
202 */ |
|
203 void MediatorCategoryRemovedL( TUid aDomain, TUid aCategory ); |
|
204 |
|
205 /** |
|
206 * List of events has been removed. All subscriptions are cancelled. |
|
207 * List can contain 1-n events from the specified category. |
|
208 * |
|
209 * @since S60 3.1 |
|
210 * @param aDomain The identifier of the domain. |
|
211 * @param aCategory The identifier of the category. |
|
212 * @param aEvents The list of events removed. |
|
213 * @return None. |
|
214 */ |
|
215 void MediatorEventsRemovedL( TUid aDomain, |
|
216 TUid aCategory, |
|
217 const REventList& aEvents ); |
|
218 |
|
219 /** |
|
220 * List of commands have been removed. All subscriptions are cancelled. |
|
221 * List can contain 1-n commands from the specified category. |
|
222 * |
|
223 * @since S60 3.1 |
|
224 * @param aDomain The identifier of the domain. |
|
225 * @param aCategory The identifier of the category. |
|
226 * @param aCommands The list of commands removed |
|
227 * @return None. |
|
228 */ |
|
229 void MediatorCommandsRemovedL( TUid aDomain, |
|
230 TUid aCategory, |
|
231 const RCommandList& aCommands ); |
|
232 private: // new functions |
|
233 |
|
234 /** |
|
235 * Server returns the server reference. |
|
236 * @since S60 3.1 |
|
237 * @param void |
|
238 * @return Mediator Server reference |
|
239 */ |
|
240 CMediatorServer& Server(); |
|
241 |
|
242 /** |
|
243 * Reads category (and domain) information from message. |
|
244 * @since S60 3.1 |
|
245 * @param aMessage reference to message |
|
246 * @param aMessageSlot where category information can be found |
|
247 * @return TMediatorCategory information |
|
248 */ |
|
249 TMediatorCategory ReadCategoryL( const RMessage2& aMessage, |
|
250 const TInt aMessageSlot ); |
|
251 |
|
252 /** |
|
253 * Writes category (and domain) information to message. |
|
254 * @since S60 3.1 |
|
255 * @param aDomain UID of the domain |
|
256 * @param aCategory UID of the category |
|
257 * @param aMessage reference to target message |
|
258 * @param aMessageSlot where information is written |
|
259 * @return none |
|
260 */ |
|
261 void WriteCategoryL( TUid aDomain, |
|
262 TUid aCategory, |
|
263 const RMessage2& aMessage, |
|
264 const TInt aMessageSlot ); |
|
265 |
|
266 /** |
|
267 * Reads event from message |
|
268 * @since S60 3.1 |
|
269 * @param aMessage reference to message |
|
270 * @param aMessageSlot where event information can be found |
|
271 * @return MediatorService::TEvent information |
|
272 */ |
|
273 MediatorService::TEvent ReadEventL( const RMessage2& aMessage, |
|
274 const TInt aMessageSlot ); |
|
275 |
|
276 /** |
|
277 * Reads command from message |
|
278 * @since S60 3.1 |
|
279 * @param aMessage reference to message |
|
280 * @param aMessageSlot where event information can be found |
|
281 * @return MediatorService::TCommand information |
|
282 */ |
|
283 MediatorService::TCommand ReadCommandL( const RMessage2& aMessage, |
|
284 const TInt aMessageSlot ); |
|
285 |
|
286 /** |
|
287 * Writes event to message. |
|
288 * @since S60 3.1 |
|
289 * @param aEventId id of the event |
|
290 * @param aMessage reference to target message |
|
291 * @param aMessageSlot wwhere information is written |
|
292 * @return none |
|
293 */ |
|
294 void WriteEventL( TInt aEventId, |
|
295 const RMessage2& aMessage, |
|
296 const TInt aMessageSlot ); |
|
297 |
|
298 /** |
|
299 * Writes command to message. |
|
300 * @since S60 3.1 |
|
301 * @param aCommandId id of the command |
|
302 * @param aVersion version of the command |
|
303 * @param aMessage reference to target message |
|
304 * @param aMessageSlot wwhere information is written |
|
305 * @return none |
|
306 */ |
|
307 void WriteCommandL( TInt aCommandId, |
|
308 TVersion aVersion, |
|
309 const RMessage2& aMessage, |
|
310 const TInt aMessageSlot ); |
|
311 |
|
312 /** |
|
313 * Reads event list from message. |
|
314 * @since S60 3.1 |
|
315 * @param aMessage reference to target message |
|
316 * @param aMessageSlot where information is written |
|
317 * @return REventList list of read events |
|
318 */ |
|
319 REventList ReadEventListL( const RMessage2& aMessage, |
|
320 const TInt aMessageSlot ); |
|
321 |
|
322 /** |
|
323 * Writes event list to message. |
|
324 * @since S60 3.1 |
|
325 * @param aEvents list of events |
|
326 * @param aMessage reference to target message |
|
327 * @param aMessageSlot where information is written |
|
328 * @return none |
|
329 */ |
|
330 void WriteEventListL( const REventList& aEvents, |
|
331 const RMessage2& aMessage, |
|
332 const TInt aMessageSlot ); |
|
333 |
|
334 /** |
|
335 * Writes event list to message. |
|
336 * @since S60 5.1 |
|
337 * @param aEvents list of events |
|
338 * @return none |
|
339 */ |
|
340 void WriteEventListToBufferL( const REventList& aEvents ); |
|
341 |
|
342 /** |
|
343 * Reads command list from message. |
|
344 * @since S60 3.1 |
|
345 * @param aMessage reference to target message |
|
346 * @param aMessageSlot where information is written |
|
347 * @return RCommandList list of read commands |
|
348 */ |
|
349 RCommandList ReadCommandListL( const RMessage2& aMessage, |
|
350 const TInt aMessageSlot ); |
|
351 |
|
352 /** |
|
353 * Writes command list to message. |
|
354 * @since S60 3.1 |
|
355 * @param aEvents list of events |
|
356 * @param aMessage reference to target message |
|
357 * @param aMessageSlot where information is written |
|
358 * @return none |
|
359 */ |
|
360 void WriteCommandListL( const RCommandList& aCommands, |
|
361 const RMessage2& aMessage, |
|
362 const TInt aMessageSlot ); |
|
363 |
|
364 /** |
|
365 * Reads data from message. |
|
366 * Note that leaves the pointer to cleanup stack. |
|
367 * @since S60 3.1 |
|
368 * @param aMessage reference to target message |
|
369 * @param aMessageSlot where information is read |
|
370 * @return HBufC8 pointer to data buffer |
|
371 */ |
|
372 HBufC8* ReadDataLC( const RMessage2& aMessage, |
|
373 const TInt aMessageSlot ); |
|
374 |
|
375 /** |
|
376 * Writes data to message. |
|
377 * @since S60 3.1 |
|
378 * @param aData reference to data buffer |
|
379 * @param aMessage reference to target message |
|
380 * @param aMessageSlot where category information can be found |
|
381 * @return none |
|
382 */ |
|
383 void WriteDataL( const TDesC8& aData, |
|
384 const RMessage2& aMessage, |
|
385 const TInt aMessageSlot ); |
|
386 |
|
387 |
|
388 |
|
389 /** |
|
390 * Dispatches incoming client-server request |
|
391 * |
|
392 * @since S60 3.1 |
|
393 * @param aMessage message to be handled |
|
394 * @return None. |
|
395 */ |
|
396 void DispatchMessageL( const RMessage2& aMessage ); |
|
397 |
|
398 /** |
|
399 * Registers list of events to Event Handler |
|
400 * |
|
401 * @since S60 3.1 |
|
402 * @param aMessage message to be handled |
|
403 * @return None. |
|
404 */ |
|
405 void RegisterEventListL( const RMessage2& aMessage ); |
|
406 |
|
407 /** |
|
408 * Registers list of commands to Command Handler |
|
409 * |
|
410 * @since S60 3.1 |
|
411 * @param aMessage message to be handled |
|
412 * @return None. |
|
413 */ |
|
414 void RegisterCommandListL( const RMessage2& aMessage ); |
|
415 |
|
416 /** |
|
417 * Unregisters event(s) |
|
418 * |
|
419 * @since S60 3.1 |
|
420 * @param aMessage message to be handled |
|
421 * @return None. |
|
422 */ |
|
423 void UnregisterEventListL( const RMessage2& aMessage ); |
|
424 |
|
425 /** |
|
426 * Unregisters command(s) |
|
427 * |
|
428 * @since S60 3.1 |
|
429 * @param aMessage message to be handled |
|
430 * @return None. |
|
431 */ |
|
432 void UnregisterCommandListL( const RMessage2& aMessage ); |
|
433 |
|
434 /** |
|
435 * Subscribes to event(s) |
|
436 * |
|
437 * @since S60 3.1 |
|
438 * @param aMessage message to be handled |
|
439 * @return None. |
|
440 */ |
|
441 void SubscribeEventListL( const RMessage2& aMessage ); |
|
442 |
|
443 |
|
444 /** |
|
445 * Ubsubscribes to event(s) |
|
446 * |
|
447 * @since S60 3.1 |
|
448 * @param aMessage message to be handled |
|
449 * @return None. |
|
450 */ |
|
451 void UnsubscribeEventListL( const RMessage2& aMessage ); |
|
452 |
|
453 /** |
|
454 * Handles incoming event notification request |
|
455 * |
|
456 * @since S60 3.1 |
|
457 * @param aMessage message to be handled |
|
458 * @return None. |
|
459 */ |
|
460 void RaiseEventL( const RMessage2& aMessage ); |
|
461 |
|
462 /** |
|
463 * Handles incoming command request |
|
464 * |
|
465 * @since S60 3.1 |
|
466 * @param aMessage message to be handled |
|
467 * @return None. |
|
468 */ |
|
469 void IssueCommandL( const RMessage2& aMessage ); |
|
470 |
|
471 /** |
|
472 * Cancels ongoing command process |
|
473 * |
|
474 * @since S60 3.1 |
|
475 * @param aMessage message to be handled |
|
476 * @return None. |
|
477 */ |
|
478 void CancelCommandL( const RMessage2& aMessage ); |
|
479 |
|
480 /** |
|
481 * Handles incoming command response |
|
482 * |
|
483 * @since S60 3.1 |
|
484 * @param aMessage message to be handled |
|
485 * @return None. |
|
486 */ |
|
487 void IssueResponseL( const RMessage2& aMessage ); |
|
488 |
|
489 /** |
|
490 * Gets registered domains |
|
491 * |
|
492 * @since S60 3.1 |
|
493 * @param aMessage message to be handled |
|
494 * @return None. |
|
495 */ |
|
496 void GetDomainsL( const RMessage2& aMessage ); |
|
497 |
|
498 /** |
|
499 * Gets registered categories |
|
500 * |
|
501 * @since S60 3.1 |
|
502 * @param aMessage message to be handled |
|
503 * @return None. |
|
504 */ |
|
505 void GetCategoriesL( const RMessage2& aMessage ); |
|
506 |
|
507 /** |
|
508 * Gets registered commands |
|
509 * |
|
510 * @since S60 3.1 |
|
511 * @param aMessage message to be handled |
|
512 * @return None. |
|
513 */ |
|
514 void GetCommandsL( const RMessage2& aMessage ); |
|
515 |
|
516 /** |
|
517 * Gets registered events |
|
518 * |
|
519 * @since S60 3.1 |
|
520 * @param aMessage message to be handled |
|
521 * @return None. |
|
522 */ |
|
523 void GetEventsL( const RMessage2& aMessage ); |
|
524 |
|
525 private: // For async notifications |
|
526 |
|
527 /** |
|
528 * Turn on async waiting for events |
|
529 * |
|
530 * @since S60 3.1 |
|
531 * @param aMessage message to be handled |
|
532 * @return None. |
|
533 */ |
|
534 void WaitForEventsL( const RMessage2& aMessage ); |
|
535 |
|
536 /** |
|
537 * Turn on async waiting for commands |
|
538 * |
|
539 * @since S60 3.1 |
|
540 * @param aMessage message to be handled |
|
541 * @return None. |
|
542 */ |
|
543 void WaitForCommandsL( const RMessage2& aMessage ); |
|
544 |
|
545 /** |
|
546 * Turn on async waiting for events/command registrations changes |
|
547 * |
|
548 * @since S60 3.1 |
|
549 * @param aMessage message to be handled |
|
550 * @return None. |
|
551 */ |
|
552 void WaitForNotificationsL( const RMessage2& aMessage ); |
|
553 |
|
554 /** |
|
555 * Turn off async waiting for events/command registrations changes |
|
556 * |
|
557 * @since S60 3.1 |
|
558 * @param aMessage message to be handled |
|
559 * @return None. |
|
560 */ |
|
561 void CancelNotificationsL( const RMessage2& aMessage ); |
|
562 |
|
563 /** |
|
564 * Turn on async waiting for command responses |
|
565 * |
|
566 * @since S60 3.1 |
|
567 * @param aMessage message to be handled |
|
568 * @return None. |
|
569 */ |
|
570 void WaitForCommandResponseL( const RMessage2& aMessage ); |
|
571 |
|
572 /** |
|
573 * Fetch method to get full amount of parameter data |
|
574 * |
|
575 * @since S60 3.1 |
|
576 * @param aMessage message to be handled |
|
577 * @return None. |
|
578 */ |
|
579 void FetchParameterDataL( const RMessage2& aMessage ); |
|
580 |
|
581 /** |
|
582 * Fetch method to get full event list |
|
583 * |
|
584 * @since S60 3.1 |
|
585 * @param aMessage message to be handled |
|
586 * @return None. |
|
587 */ |
|
588 void FetchNotificationEventListL( const RMessage2& aMessage ); |
|
589 |
|
590 /** |
|
591 * Fetch method to get full command list |
|
592 * |
|
593 * @since S60 3.1 |
|
594 * @param aMessage message to be handled |
|
595 * @return None. |
|
596 */ |
|
597 void FetchNotificationCommandListL( const RMessage2& aMessage ); |
|
598 |
|
599 /** |
|
600 * Cancels all async operations |
|
601 * |
|
602 * @since S60 3.1 |
|
603 * @param aMessage message to be handled |
|
604 * @return None. |
|
605 */ |
|
606 void CancelAll( const RMessage2& aMessage ); |
|
607 |
|
608 /** |
|
609 * Cancels all async operations |
|
610 * |
|
611 * @since S60 3.1 |
|
612 * @param aError error code causing cancelation |
|
613 * @return None. |
|
614 */ |
|
615 void CancelAll( TInt aError ); |
|
616 |
|
617 /** |
|
618 * Returns whether event list can be passed with provided client message. |
|
619 */ |
|
620 TBool EventListFitsToClientMemory( const REventList& aEvents, |
|
621 const RMessage2& aMessage, |
|
622 const TInt aMessageSlot ); |
|
623 |
|
624 /** |
|
625 * Returns whether command list can be passed with provided client message. |
|
626 */ |
|
627 TBool CommandListFitsToClientMemory( const RCommandList& aCommands, |
|
628 const RMessage2& aMessage, |
|
629 const TInt aMessageSlot ); |
|
630 |
|
631 |
|
632 /** |
|
633 * Handles an event registration status change (events either added or removed). |
|
634 * Events are buffered to nofication queue if they cannot be passed to the client |
|
635 * with the current request. |
|
636 */ |
|
637 void HandleMediatorEventsChangedL( TMediatorNotificationType aNotificationType, |
|
638 const TUid& aDomain, |
|
639 const TUid& aCategory, |
|
640 const REventList& aEvents ); |
|
641 |
|
642 /** |
|
643 * Completes the current notification request due to events registration status change. |
|
644 * |
|
645 * @param[out] aEventsPassedToClient if ETrue, the provided event list was passed to client |
|
646 * with the current request. |
|
647 */ |
|
648 void DoMediatorEventsChangedL( TMediatorNotificationType aNotificationType, |
|
649 const TUid& aDomain, |
|
650 const TUid& aCategory, |
|
651 const REventList& aEvents, |
|
652 TBool& aEventsPassedToClient ); |
|
653 |
|
654 /** |
|
655 * Completes the current notification request due to removal of a category. |
|
656 */ |
|
657 void DoMediatorCategoryRemovedL( const TUid& aDomain, const TUid& aCategory ); |
|
658 |
|
659 /** |
|
660 * Handles a command registrations status change (commands either added or removed). |
|
661 * Commands are buffered to nofication queue if they cannot be passed to |
|
662 * the client with the current request. |
|
663 */ |
|
664 void HandleMediatorCommandsChangedL( TMediatorNotificationType aNotificationType, |
|
665 const TUid& aDomain, |
|
666 const TUid& aCategory, |
|
667 const RCommandList& aCommands ); |
|
668 |
|
669 /** |
|
670 * Completes the current notification request due to commands registration status change. |
|
671 * |
|
672 * @param[out] aCommandsPassedToClient if ETrue, the provided command list was passed to client |
|
673 * with the current request. |
|
674 */ |
|
675 void DoMediatorCommandsChangedL( TMediatorNotificationType aNotificationType, |
|
676 const TUid& aDomain, |
|
677 const TUid& aCategory, |
|
678 const RCommandList& aCommands, |
|
679 TBool& aCommandsPassedToClient ); |
|
680 |
|
681 /** |
|
682 * Empties the notification queue. |
|
683 */ |
|
684 void CleanNotificationQueue(); |
|
685 |
|
686 /** |
|
687 * Completes the current notification request with the next notification in queue, |
|
688 * if any. |
|
689 */ |
|
690 void PurgeNextBufferedNotificationL(); |
|
691 |
|
692 private: |
|
693 |
|
694 /** |
|
695 * Constructor. |
|
696 */ |
|
697 CMediatorServerSession(); |
|
698 |
|
699 |
|
700 private: // data |
|
701 |
|
702 friend class RMediatorDebug; |
|
703 // For async event notification |
|
704 RMessage2 iEventNotificationMessage; |
|
705 |
|
706 // For async notification |
|
707 RMessage2 iNotificationMessage; |
|
708 |
|
709 // For async command initiations |
|
710 RMessage2 iCommandInitMessage; |
|
711 |
|
712 // For async command responses |
|
713 RMessage2 iCommandResponseMessage; |
|
714 |
|
715 // Status if notifications are registered |
|
716 TBool iNotificationsRegistered; |
|
717 |
|
718 // Event service buffer |
|
719 RPointerArray<CEvent> iEventServiceList; |
|
720 |
|
721 // Command service buffer |
|
722 RPointerArray<CCommand> iCommandServiceList; |
|
723 |
|
724 /** |
|
725 * Reserve buffer for big amount of data |
|
726 * Own. |
|
727 */ |
|
728 HBufC8* iDataBuffer; |
|
729 |
|
730 /** |
|
731 * Queue for buffering notifications. |
|
732 */ |
|
733 TSglQue<CMediatorQueItem> iNotificationQueue; |
|
734 |
|
735 }; |
|
736 |
|
737 |
|
738 #endif // MEDIATORSERVERSESSION_H |
|
739 |
|
740 // End of File |