|
1 /* |
|
2 * Copyright (c) 2007 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: PSM server side session. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PSMSRVSESSION_H |
|
20 #define PSMSRVSESSION_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <psmtypes.h> |
|
24 #include "psmmodechangeobserver.h" |
|
25 |
|
26 class CPsmManager; |
|
27 class CPsmSrvServer; |
|
28 class CPsmMessage; |
|
29 |
|
30 /** |
|
31 * PSM Session |
|
32 * |
|
33 * Server side session for PSM client-server |
|
34 * |
|
35 * @since S60 5.0 |
|
36 */ |
|
37 class CPsmSession : public CSession2 |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Creates a new PSM plug-in loader. |
|
43 * |
|
44 * @return A pointer to the created object. |
|
45 */ |
|
46 static CPsmSession* NewL( CPsmManager& aPsmManager, CPsmSrvServer& aServer ); |
|
47 |
|
48 /** |
|
49 * Creates a new PSM plug-in loader. Newly created instance is left in the cleanup stack. |
|
50 * |
|
51 * @return A pointer to the created object. |
|
52 */ |
|
53 static CPsmSession* NewLC( CPsmManager& aPsmManager, CPsmSrvServer& aServer ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CPsmSession(); |
|
59 |
|
60 /** |
|
61 * Service requests |
|
62 */ |
|
63 void ServiceL( const RMessage2& aMessage ); |
|
64 |
|
65 private: |
|
66 |
|
67 /** |
|
68 * C++ constructor. |
|
69 */ |
|
70 CPsmSession( CPsmManager& aPsmManager, CPsmSrvServer& aServer ); |
|
71 |
|
72 /** |
|
73 * By default Symbian 2nd phase constructor is private. |
|
74 */ |
|
75 void ConstructL(); |
|
76 |
|
77 /** |
|
78 * Handles client requests |
|
79 */ |
|
80 void DispatchL( const RMessage2& aMessage ); |
|
81 |
|
82 /** |
|
83 * Handles settings related requests |
|
84 */ |
|
85 void HandleSettingsRequestL( const RMessage2& aMessage ); |
|
86 |
|
87 /** |
|
88 * Reads config array from message |
|
89 */ |
|
90 void ReadConfigArrayL( RConfigInfoArray& aArray, const RMessage2& aMessage ); |
|
91 |
|
92 private: // Data |
|
93 |
|
94 /** |
|
95 * Reference to server |
|
96 */ |
|
97 CPsmSrvServer& iPsmServer; |
|
98 |
|
99 /** |
|
100 * Reference to PSM engine |
|
101 */ |
|
102 CPsmManager& iPsmManager; |
|
103 |
|
104 /** |
|
105 * Pointer to NotifyModeChange async message |
|
106 */ |
|
107 CPsmMessage* iNotifyModeMessage; |
|
108 |
|
109 /** |
|
110 * Config array for Settings handling |
|
111 */ |
|
112 RConfigInfoArray iConfigArray; |
|
113 |
|
114 }; |
|
115 |
|
116 #endif // PSMSRVSESSION_H |