|
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 __SUSMISCADAPTATION_H__ |
|
17 #define __SUSMISCADAPTATION_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "ssmadaptation.h" |
|
21 #include "ssmdebug.h" |
|
22 #include "ssmadaptationcmn.h" |
|
23 |
|
24 |
|
25 /** |
|
26 CMiscAdaptation |
|
27 |
|
28 This class implements the Miscellaneous Adaptation related functionality as part of |
|
29 Adaptation server.This class implements an active object to route the requests |
|
30 to Adaptation plugins loaded by CSsmAdaptationServer.When requests are received |
|
31 from multiple clients this class queues the requests and processes them in order. |
|
32 Adaptation server handles only one request from each session and uses Cancel() |
|
33 methods to cancel any of the session's requests made before. |
|
34 The queueing mechanism is to handle multiple clients at a time not to handle multiple |
|
35 requests from one particular clients session. |
|
36 |
|
37 @internalComponent |
|
38 */ |
|
39 |
|
40 class CMiscAdaptation : public CActive |
|
41 { |
|
42 public: |
|
43 static CMiscAdaptation* NewL(MMiscAdaptation& aAdaptation); |
|
44 ~CMiscAdaptation(); |
|
45 |
|
46 void Release(); |
|
47 |
|
48 void DoSecurityStateChangeL(const RMessage2& aMessage); |
|
49 void DoGetGlobalStartupModeL(const RMessage2& aMessage); |
|
50 void DoPrepareSimLanguagesL(const RMessage2& aMessage); |
|
51 void DoMiscAdaptationCancelL(const RMessage2& aMessage); |
|
52 void DoMiscAdaptationHiddenResetL(const RMessage2& aMessage); |
|
53 void DoGetSimLanguagesArrayL(const RMessage2& aMessage); |
|
54 |
|
55 protected: |
|
56 void RunL(); |
|
57 TInt RunError( TInt aError ); |
|
58 void DoCancel(); |
|
59 |
|
60 private: |
|
61 CMiscAdaptation(MMiscAdaptation& aAdaptation); |
|
62 void SubmitOrQueueL(const RMessage2 &aMessage); |
|
63 void WriteResponseDataToClientMessageL(); |
|
64 void Submit(CAdaptationMessage*& aMessage); |
|
65 |
|
66 private: |
|
67 CAdaptationMessage *iCurrentMessage; |
|
68 RSsmAdaptationRequestQueue iPendingRequestsQueue; |
|
69 |
|
70 MMiscAdaptation& iMiscAdaptation; |
|
71 TPckgBuf<TInt> iResponsePckg; |
|
72 TPckgBuf<TInt> iModePckg; |
|
73 TPckgBuf<TInt> iSizePckg; |
|
74 TPckgBuf<TInt> iListPckg; |
|
75 TPckgBuf<TBool> iHiddenResetPckg; |
|
76 }; |
|
77 |
|
78 #endif // __SUSMISCADAPTATION_H__ |