|
1 /* |
|
2 * Copyright (c) 2002-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: Server-side sub-session base class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "AccSrvSubBase.h" |
|
22 #include "AccSrvMainSession.h" |
|
23 #include "AccClientServerMessages.h" |
|
24 #include "AccSrvSubBase.h" |
|
25 #include "AccPolGenericIDAccessor.h" |
|
26 #include "AccPolGenericIDArrayAccessor.h" |
|
27 #include "acc_debug.h" |
|
28 |
|
29 // EXTERNAL DATA STRUCTURES |
|
30 |
|
31 // EXTERNAL FUNCTION PROTOTYPES |
|
32 |
|
33 // CONSTANTS |
|
34 |
|
35 // MACROS |
|
36 |
|
37 // LOCAL CONSTANTS AND MACROS |
|
38 |
|
39 // MODULE DATA STRUCTURES |
|
40 |
|
41 // LOCAL FUNCTION PROTOTYPES |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 |
|
45 // ============================= LOCAL FUNCTIONS =============================== |
|
46 |
|
47 // ============================ MEMBER FUNCTIONS =============================== |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CAccSrvSubBase::CAccSrvSubBase |
|
51 // C++ default constructor can NOT contain any code, that |
|
52 // might leave. |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 CAccSrvSubBase::CAccSrvSubBase( CASYProxyAPI* aProxy, |
|
56 CAccSrvConnectionController* aConnectionController, |
|
57 CAccSrvServerModel* aServerModel ) : |
|
58 iConnectionController( aConnectionController ), |
|
59 iServerModel( aServerModel ), |
|
60 iProxy( aProxy ) |
|
61 { |
|
62 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::CAccSrvSubBase()" ); |
|
63 |
|
64 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::CAccSrvSubBase - return" ); |
|
65 } |
|
66 |
|
67 // Destructor |
|
68 CAccSrvSubBase::~CAccSrvSubBase() |
|
69 { |
|
70 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::~CAccSrvSubBase()" ); |
|
71 } |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // CAccSrvSubBase::Write |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 void CAccSrvSubBase::Write( const RMessage2& aMessage, TInt aFlag ) |
|
78 { |
|
79 COM_TRACE_1( "[AccFW:AccServer] CAccSrvSubBase::Write(%d)", aFlag ); |
|
80 |
|
81 TInt flags( 0 ); |
|
82 TInt err( KErrNone ); |
|
83 TPckg<TInt> flagsPckg( flags ); |
|
84 |
|
85 err = aMessage.Read( KAccServParamPosThird, flagsPckg );//It's allways argument number 2 which is used in client side |
|
86 |
|
87 if( KErrNone == err) |
|
88 { |
|
89 flags = flags & ( ~aFlag );//Turn bit number aFlag to zero |
|
90 aMessage.Write( KAccServParamPosThird, flagsPckg ); |
|
91 } |
|
92 else |
|
93 { |
|
94 TRACE_ASSERT_ALWAYS; |
|
95 } |
|
96 |
|
97 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::Write - return void" ); |
|
98 } |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CAccSrvSubBase::CompleteMessageL |
|
102 // |
|
103 // If this base class implementation is called, something is wrong. |
|
104 // Function is defined here to avoid unnecessary implementation |
|
105 // in derived classes. |
|
106 // ----------------------------------------------------------------------------- |
|
107 // |
|
108 TBool CAccSrvSubBase::CompleteMessageL( TMsgID /*aMsgID*/, |
|
109 TInt /*aErrorCode*/, |
|
110 TInt /*aUniqueID*/ ) |
|
111 { |
|
112 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::CompleteMessageL()" ); |
|
113 |
|
114 TRACE_ASSERT_ALWAYS; |
|
115 User::Leave( KErrGeneral ); |
|
116 |
|
117 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::CompleteMessageL - return EFalse" ); |
|
118 return EFalse; |
|
119 } |
|
120 |
|
121 // ----------------------------------------------------------------------------- |
|
122 // CAccSrvSubBase::CompleteProcessCommandL |
|
123 // |
|
124 // If this base class implementation is called, something is wrong. |
|
125 // Function is defined here to avoid unnecessary implementation |
|
126 // in derived classes. |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 TBool CAccSrvSubBase::CompleteProcessCommandL( TProcessCmdId /*aCmdn*/, |
|
130 TInt /*aTrId*/, |
|
131 TASYCommandParamRecord& /*aASYCommandParamRecord*/, |
|
132 TPtr8* /*aPtrBuf*/ ) |
|
133 { |
|
134 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::CompleteProcessCommandL()" ); |
|
135 |
|
136 TRACE_ASSERT_ALWAYS; |
|
137 User::Leave( KErrGeneral ); |
|
138 |
|
139 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::CompleteProcessCommandL - return EFalse" ); |
|
140 return EFalse; |
|
141 } |
|
142 |
|
143 // ----------------------------------------------------------------------------- |
|
144 // CAccSrvSubBase::HandleValueMessageL |
|
145 // |
|
146 // If this base class implementation is called, something is wrong. |
|
147 // Function is defined here to avoid unnecessary implementation |
|
148 // in derived classes. |
|
149 // ----------------------------------------------------------------------------- |
|
150 // |
|
151 void CAccSrvSubBase::HandleValueMessageL( TMsgID /*aMsgID*/, |
|
152 TAccValueTypeTBool /*aCmdResponse*/, |
|
153 TInt /*aErrorCode*/, |
|
154 TInt /*aTrId*/ ) |
|
155 { |
|
156 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::HandleValueMessageL() - TBool" ); |
|
157 |
|
158 TRACE_ASSERT_ALWAYS; |
|
159 User::Leave( KErrGeneral ); |
|
160 |
|
161 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::HandleValueMessageL - TBool - return void" ); |
|
162 } |
|
163 |
|
164 // ----------------------------------------------------------------------------- |
|
165 // CAccSrvSubBase::HandleValueMessageL |
|
166 // |
|
167 // If this base class implementation is called, something is wrong. |
|
168 // Function is defined here to avoid unnecessary implementation |
|
169 // in derived classes. |
|
170 // ----------------------------------------------------------------------------- |
|
171 // |
|
172 void CAccSrvSubBase::HandleValueMessageL( TMsgID /*aMsgID*/, |
|
173 TAccValueTypeTInt /*aCmdResponse*/, |
|
174 TInt /*aErrorCode*/, |
|
175 TInt /*aTrId*/ ) |
|
176 { |
|
177 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::HandleValueMessageL() - TInt" ); |
|
178 |
|
179 TRACE_ASSERT_ALWAYS; |
|
180 User::Leave( KErrGeneral ); |
|
181 |
|
182 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::HandleValueMessageL - TInt - return void" ); |
|
183 } |
|
184 |
|
185 // ----------------------------------------------------------------------------- |
|
186 // CAccSrvSubBase::HandleValueMessageL |
|
187 // |
|
188 // If this base class implementation is called, something is wrong. |
|
189 // Function is defined here to avoid unnecessary implementation |
|
190 // in derived classes. |
|
191 // ----------------------------------------------------------------------------- |
|
192 // |
|
193 void CAccSrvSubBase::HandleValueMessageL( TMsgID /*aMsgID*/, |
|
194 TDesC8& /*aCmdResponse*/, |
|
195 TInt /*aErrorCode*/, |
|
196 TInt /*aTrId*/ ) |
|
197 { |
|
198 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::HandleValueMessageL() - TDesC8t" ); |
|
199 |
|
200 TRACE_ASSERT_ALWAYS; |
|
201 User::Leave( KErrGeneral ); |
|
202 |
|
203 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::HandleValueMessageL - TDesC8 - return void" ); |
|
204 } |
|
205 |
|
206 void CAccSrvSubBase::HandleValueMessageL( TMsgID /*aMsgID*/, |
|
207 TInt /*aTrId*/, |
|
208 TPtr8* /*aPtrBuf*/, |
|
209 TInt /*aErrorCode*/ ) |
|
210 { |
|
211 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::HandleValueMessageL() - Object" ); |
|
212 |
|
213 TRACE_ASSERT_ALWAYS; |
|
214 User::Leave( KErrGeneral ); |
|
215 |
|
216 COM_TRACE_( "[AccFW:AccServer] CAccSrvSubBase::HandleValueMessageL - Object - return void" ); |
|
217 } |
|
218 |
|
219 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
220 |
|
221 // End of File |