|
1 /* |
|
2 * Copyright (c) 2006 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: Sub session base |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_ALFSRVSUBSESSIONBASE_H |
|
21 #define C_ALFSRVSUBSESSIONBASE_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class CAlfAppSrvSessionBase; |
|
26 class MHuiVisualOwner; |
|
27 class CHuiVisual; |
|
28 class CHuiLayout; |
|
29 class CHuiBrush; |
|
30 class CHuiControl; |
|
31 class CHuiControlGroup; |
|
32 class MHuiMappingFunction; |
|
33 class CAlfBrushHandler; |
|
34 class MAlfExtension; |
|
35 class CHuiDisplay; |
|
36 |
|
37 /** |
|
38 * Sub session base. |
|
39 * |
|
40 * @lib alfappservercore.lib |
|
41 * @since S60 v3.2 |
|
42 */ |
|
43 NONSHARABLE_CLASS(CAlfSrvSubSessionBase) : public CObject |
|
44 { |
|
45 |
|
46 public: |
|
47 |
|
48 /** |
|
49 * Public constructor |
|
50 */ |
|
51 CAlfSrvSubSessionBase( CAlfAppSrvSessionBase& aSession ); |
|
52 |
|
53 /** |
|
54 * static c-tor |
|
55 */ |
|
56 static CAlfSrvSubSessionBase* NewLC(const RMessage2& aMessage, |
|
57 TInt aImplementationUid, |
|
58 TInt aImplementationId, |
|
59 CAlfAppSrvSessionBase& aSession); |
|
60 |
|
61 /** |
|
62 * Destructor |
|
63 */ |
|
64 ~CAlfSrvSubSessionBase(); |
|
65 |
|
66 /** |
|
67 * Processes message. |
|
68 * |
|
69 * @param aMessage |
|
70 */ |
|
71 void ProcessMessageL(const RMessage2& aMessage); |
|
72 |
|
73 // Interfaces: |
|
74 /** |
|
75 * needed for visual factory, only subsessions having instance implementing the interface |
|
76 * should implement this virtual |
|
77 */ |
|
78 virtual MHuiVisualOwner* AsVisualOwner(); |
|
79 |
|
80 /** |
|
81 * needed for visual factory, only subsessions having instance implementing the interface |
|
82 * should implement this virtual |
|
83 */ |
|
84 virtual CHuiControl* AsHuiControl(); |
|
85 |
|
86 /** |
|
87 * needed for visual factory, only subsessions having instance implementing the interface |
|
88 * should implement this virtual |
|
89 */ |
|
90 virtual CHuiVisual* AsHuiVisual(); |
|
91 |
|
92 /** |
|
93 * needed for visual factory, only subsessions having instance implementing the interface |
|
94 * should implement this virtual |
|
95 */ |
|
96 virtual CHuiLayout* AsHuiLayout(); |
|
97 |
|
98 /** |
|
99 * needed for visual factory, only subsessions having instance implementing the interface |
|
100 * should implement this virtual |
|
101 */ |
|
102 virtual CHuiBrush* AsHuiBrush(); |
|
103 |
|
104 /** |
|
105 * needed for visual factory, only subsessions having instance implementing the interface |
|
106 * should implement this virtual |
|
107 */ |
|
108 virtual MHuiMappingFunction* AsMappingFunction(); |
|
109 |
|
110 /** |
|
111 * needed for visual factory, only subsessions having instance implementing the interface |
|
112 * should implement this virtual |
|
113 */ |
|
114 virtual CHuiControlGroup* AsHuiControlCroup(); |
|
115 |
|
116 /** |
|
117 * needed for visual factory, only subsessions having instance implementing the interface |
|
118 * should implement this virtual |
|
119 */ |
|
120 virtual CHuiDisplay* AsHuiDisplay(); |
|
121 |
|
122 /** |
|
123 * needed for visual factory, only subsessions having instance implementing the interface |
|
124 * should implement this virtual |
|
125 */ |
|
126 virtual CAlfBrushHandler* AsBrushHandler(); |
|
127 |
|
128 /** |
|
129 * Request to complete pending asynchornous request(s) |
|
130 * Initiated by client |
|
131 */ |
|
132 virtual void CancelAsynchRequests(); |
|
133 |
|
134 virtual MAlfExtension* AsCommandHandler(); |
|
135 |
|
136 /** |
|
137 * Public member for session to check what factory was used to create this |
|
138 */ |
|
139 TInt iFactoryUid; |
|
140 |
|
141 protected: |
|
142 |
|
143 /** |
|
144 * Processes message. Meant for child class to implement. |
|
145 * |
|
146 * @param aMessage |
|
147 */ |
|
148 virtual void DoProcessMessageL(const RMessage2& aMessage); |
|
149 |
|
150 /** |
|
151 * Returns the session this sub session belongs to. |
|
152 * |
|
153 * @return Session. |
|
154 */ |
|
155 CAlfAppSrvSessionBase& Session(); |
|
156 |
|
157 /** |
|
158 * must be base-called from deriving classes to finalize construction |
|
159 */ |
|
160 virtual void ConstructL(); |
|
161 |
|
162 private: |
|
163 void ConstructL(const RMessage2& aMessage, |
|
164 TInt aImplementationUid, |
|
165 TInt aImplementationId ); |
|
166 |
|
167 |
|
168 private: // data |
|
169 |
|
170 CAlfAppSrvSessionBase& iSession; |
|
171 |
|
172 class TPrivateData; |
|
173 TPrivateData* iData; |
|
174 }; |
|
175 |
|
176 |
|
177 #endif // C_ALFSRVSUBSESSIONBASE_H |