|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __SUSRTCADAPTATION_H__ |
|
17 #define __SUSRTCADAPTATION_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "ssmadaptation.h" |
|
21 #include "ssmdebug.h" |
|
22 #include "ssmadaptationcmn.h" |
|
23 |
|
24 /** |
|
25 CRtcAdaptation |
|
26 |
|
27 This class implements the RTC Adaptation related functionality as part of |
|
28 Adaptation server.This class implements an active object to route the requests |
|
29 to Adaptation plugins loaded by CSsmAdaptationServer.When requests are received |
|
30 from multiple clients this class queues the requests and processes them in order. |
|
31 Adaptation server handles only one request from each session and uses Cancel() |
|
32 methods to cancel any of the session's requests made before. |
|
33 The queueing mechanism is to handle multiple clients at a time not to handle multiple |
|
34 requests from one particular clients session. |
|
35 |
|
36 @internalComponent |
|
37 */ |
|
38 |
|
39 |
|
40 class CRtcAdaptation : public CActive |
|
41 { |
|
42 public: |
|
43 static CRtcAdaptation* NewL(MRtcAdaptation& aAdaptation); |
|
44 ~CRtcAdaptation(); |
|
45 |
|
46 void Release(); |
|
47 |
|
48 void DoValidateRtcL(const RMessage2& aMessage); |
|
49 void DoSetWakeupAlarmL(const RMessage2& aMessage); |
|
50 void DoUnsetWakeupAlarmL(const RMessage2& aMessage); |
|
51 void DoRtcCancelL(const RMessage2& aMessage); |
|
52 |
|
53 protected: |
|
54 void RunL(); |
|
55 TInt RunError( TInt aError ); |
|
56 void DoCancel(); |
|
57 |
|
58 private: |
|
59 CRtcAdaptation(MRtcAdaptation& aAdaptation); |
|
60 void SubmitOrQueueL(const RMessage2 &aMessage); |
|
61 void WriteResponseDataToClientMessageL(); |
|
62 void SubmitL(CAdaptationMessage*& aMessage); |
|
63 |
|
64 private: |
|
65 |
|
66 CAdaptationMessage *iCurrentMessage; |
|
67 RSsmAdaptationRequestQueue iPendingRequestsQueue; |
|
68 |
|
69 HBufC8 *iParam; |
|
70 MRtcAdaptation& iRtcAdaptation; |
|
71 TPckgBuf<TBool> iValidityPckg; |
|
72 }; |
|
73 |
|
74 #endif // __SUSRTCADAPTATION_H__ |