28
|
1 |
/*
|
|
2 |
* Copyright (c) 2006-2009 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: Cch client api
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
// INCLUDE FILES
|
|
20 |
#include <e32def.h>
|
|
21 |
|
|
22 |
#include "cchserviceimpl.h"
|
|
23 |
#include "cchlogger.h"
|
|
24 |
#include "cchimpl.h"
|
|
25 |
#include "cchclientobserver.h"
|
|
26 |
#include "cchclientserverinternal.h"
|
|
27 |
#include "cchserviceimplasynchroniser.h"
|
|
28 |
|
|
29 |
#ifdef CCHAPI_USE_CCHUI
|
|
30 |
#include "cchuiprivateapi.h"
|
|
31 |
#endif
|
|
32 |
|
|
33 |
// EXTERNAL DATA STRUCTURES
|
|
34 |
// None
|
|
35 |
|
|
36 |
// EXTERNAL FUNCTION PROTOTYPES
|
|
37 |
// None
|
|
38 |
|
|
39 |
// CONSTANTS
|
|
40 |
// None
|
|
41 |
|
|
42 |
// MACROS
|
|
43 |
// None
|
|
44 |
|
|
45 |
// LOCAL CONSTANTS AND MACROS
|
|
46 |
// None
|
|
47 |
|
|
48 |
// MODULE DATA STRUCTURES
|
|
49 |
// None
|
|
50 |
|
|
51 |
// LOCAL FUNCTION PROTOTYPES
|
|
52 |
// None
|
|
53 |
|
|
54 |
// FORWARD DECLARATIONS
|
|
55 |
// None
|
|
56 |
|
|
57 |
// ============================= LOCAL FUNCTIONS =============================
|
|
58 |
|
|
59 |
// ============================ MEMBER FUNCTIONS =============================
|
|
60 |
|
|
61 |
// ---------------------------------------------------------------------------
|
|
62 |
// CCchServiceImpl::CCchServiceImpl
|
|
63 |
// C++ default constructor can NOT contain any code, that might leave.
|
|
64 |
// ---------------------------------------------------------------------------
|
|
65 |
//
|
|
66 |
CCchServiceImpl::CCchServiceImpl( CCchImpl& aCch,
|
|
67 |
TInt aServiceId,
|
|
68 |
CCchUiPrivateApi& aCchUi )
|
|
69 |
: iCch( aCch ),
|
|
70 |
iServiceId( aServiceId ),
|
|
71 |
iCchUi( aCchUi )
|
|
72 |
{
|
|
73 |
|
|
74 |
}
|
|
75 |
|
|
76 |
CCchServiceImpl::~CCchServiceImpl()
|
|
77 |
{
|
|
78 |
if( iObserver )
|
|
79 |
{
|
|
80 |
RemoveObserver();
|
|
81 |
}
|
|
82 |
delete iObserver;
|
|
83 |
delete iAsynchroniser;
|
|
84 |
}
|
|
85 |
|
|
86 |
// ---------------------------------------------------------------------------
|
|
87 |
// CCchServiceImpl::ConstructL
|
|
88 |
// Symbian 2nd phase constructor can leave.
|
|
89 |
// ---------------------------------------------------------------------------
|
|
90 |
//
|
|
91 |
void CCchServiceImpl::ConstructL()
|
|
92 |
{
|
|
93 |
CCHLOGSTRING( "CCchServiceImpl::ConstructL: IN" );
|
|
94 |
iObserver = CCchClientObserver::NewL( *this );
|
|
95 |
iAsynchroniser = CCchServiceImplAsynchroniser::NewL(iCch, iServiceId, iCchUi );
|
|
96 |
CCHLOGSTRING( "CCchServiceImpl::ConstructL: OUT" );
|
|
97 |
}
|
|
98 |
// ---------------------------------------------------------------------------
|
|
99 |
// CCchServiceImpl::NewL
|
|
100 |
// Two-phased constructor.
|
|
101 |
// ---------------------------------------------------------------------------
|
|
102 |
//
|
|
103 |
CCchServiceImpl* CCchServiceImpl::NewL( CCchImpl& aCch,
|
|
104 |
TInt aServiceId,
|
|
105 |
CCchUiPrivateApi& aCchUi )
|
|
106 |
{
|
|
107 |
CCHLOGSTRING( "CCchServiceImpl::NewL: IN" );
|
|
108 |
CCchServiceImpl* self =
|
|
109 |
CCchServiceImpl::NewLC( aCch, aServiceId, aCchUi );
|
|
110 |
CleanupStack::Pop( self );
|
|
111 |
CCHLOGSTRING( "CCchServiceImpl::NewL: OUT" );
|
|
112 |
return self;
|
|
113 |
}
|
|
114 |
|
|
115 |
// ---------------------------------------------------------------------------
|
|
116 |
// CCchServiceImpl::NewLC
|
|
117 |
// Two-phased constructor.
|
|
118 |
// ---------------------------------------------------------------------------
|
|
119 |
//
|
|
120 |
CCchServiceImpl* CCchServiceImpl::NewLC( CCchImpl& aCch, TInt aServiceId,
|
|
121 |
CCchUiPrivateApi& aCchUi )
|
|
122 |
{
|
|
123 |
CCHLOGSTRING( "CCchServiceImpl::NewLC: IN" );
|
|
124 |
CCchServiceImpl* self =
|
|
125 |
new (ELeave) CCchServiceImpl( aCch, aServiceId, aCchUi );
|
|
126 |
CleanupStack::PushL( self );
|
|
127 |
self->ConstructL();
|
|
128 |
CCHLOGSTRING( "CCchServiceImpl::NewLC: OUT" );
|
|
129 |
return self;
|
|
130 |
}
|
|
131 |
|
|
132 |
// ---------------------------------------------------------------------------
|
|
133 |
// CCchServiceImpl::Enable
|
|
134 |
// ---------------------------------------------------------------------------
|
|
135 |
//
|
|
136 |
TInt CCchServiceImpl::Enable( TCCHSubserviceType aType )
|
|
137 |
{
|
|
138 |
CCHLOGSTRING( "CCchServiceImpl::Enable: IN" );
|
|
139 |
TInt error = KErrNone;
|
|
140 |
if (iCch.ConnectivityDialogsAllowed())
|
|
141 |
{
|
|
142 |
CCHLOGSTRING( "CCchServiceImpl::Enable: Async mode" );
|
|
143 |
iAsynchroniser->Enable(aType);
|
|
144 |
}
|
|
145 |
else
|
|
146 |
{
|
|
147 |
CCHLOGSTRING( "CCchServiceImpl::Enable: Sync mode" );
|
|
148 |
TServiceSelection selection( iServiceId, aType );
|
|
149 |
TRequestStatus status = KErrNone;
|
|
150 |
iCch.CchClient().EnableService( selection, status, EFalse );
|
|
151 |
|
|
152 |
//even the cchclient api seems to be asynchronous,
|
|
153 |
//this method is completed immediately
|
|
154 |
User::WaitForRequest( status );
|
|
155 |
error = status.Int();
|
|
156 |
}
|
|
157 |
|
|
158 |
CCHLOGSTRING2( " CCchServiceImpl::Enable: return %d", error );
|
|
159 |
|
|
160 |
CCHLOGSTRING( "CCchServiceImpl::Enable: OUT" );
|
|
161 |
return error;
|
|
162 |
}
|
|
163 |
|
|
164 |
// ---------------------------------------------------------------------------
|
|
165 |
// CCchServiceImpl::Disable
|
|
166 |
// ---------------------------------------------------------------------------
|
|
167 |
//
|
|
168 |
TInt CCchServiceImpl::Disable( TCCHSubserviceType aType )
|
|
169 |
{
|
|
170 |
CCHLOGSTRING( "CCchServiceImpl::Disable: IN" );
|
|
171 |
|
|
172 |
iAsynchroniser->Disable(aType);
|
|
173 |
CCHLOGSTRING( "CCchServiceImpl::Disable: OUT" );
|
|
174 |
return KErrNone;
|
|
175 |
}
|
|
176 |
|
|
177 |
// ---------------------------------------------------------------------------
|
|
178 |
// CCchServiceImpl::GetStatus
|
|
179 |
// ---------------------------------------------------------------------------
|
|
180 |
//
|
|
181 |
TInt CCchServiceImpl::GetStatus( TCCHSubserviceType aType,
|
|
182 |
TCchServiceStatus& aStatus ) const
|
|
183 |
{
|
|
184 |
CCHLOGSTRING( "CCchServiceImpl::GetStatus: IN" );
|
|
185 |
TCCHSubserviceState state( ECCHUninitialized );
|
|
186 |
TServiceSelection selection( iServiceId, aType );
|
|
187 |
TInt error = iCch.CchClient().GetServiceState( selection, state );
|
|
188 |
//if this is a cch error, return it in the structure, otherwise in return
|
|
189 |
if( KCCHErrorInvalidIap >= error || KErrNone == error )
|
|
190 |
{
|
|
191 |
aStatus.SetError( error );
|
|
192 |
aStatus.SetState( state );
|
|
193 |
error = KErrNone;
|
|
194 |
}
|
|
195 |
CCHLOGSTRING( "CCchServiceImpl::GetStatus: OUT" );
|
|
196 |
return error;
|
|
197 |
}
|
|
198 |
|
|
199 |
// ---------------------------------------------------------------------------
|
|
200 |
// CCchServiceImpl::GetConnectionParameter
|
|
201 |
// ---------------------------------------------------------------------------
|
|
202 |
//
|
|
203 |
TInt CCchServiceImpl::GetConnectionParameter( TCCHSubserviceType aType,
|
|
204 |
TCchConnectionParameter aParameter, TInt& aValue ) const
|
|
205 |
{
|
|
206 |
CCHLOGSTRING( "CCchServiceImpl::GetConnectionParameter: IN" );
|
|
207 |
TRequestStatus status = KErrNone;
|
|
208 |
|
|
209 |
switch( aParameter )
|
|
210 |
{
|
|
211 |
case ECchIapId:
|
|
212 |
case ECchSnapId:
|
|
213 |
case ECchSnapLocked:
|
|
214 |
case ECchPasswordSet:
|
|
215 |
case ECchReserved:
|
|
216 |
{
|
|
217 |
TServiceSelection selection( iServiceId, aType, aParameter );
|
|
218 |
TServiceConnectionInfo serviceConnInfo;
|
|
219 |
TPckgBuf<TServiceConnectionInfo> serviceConnInfoPckg;
|
|
220 |
|
|
221 |
iCch.CchClient().GetConnectionInfo( selection,
|
|
222 |
serviceConnInfoPckg, status );
|
|
223 |
//even the cchclient api seems to be asynchronous,
|
|
224 |
//this method is completed immediately
|
|
225 |
User::WaitForRequest( status );
|
|
226 |
if ( KErrNone == status.Int() )
|
|
227 |
{
|
|
228 |
serviceConnInfo = serviceConnInfoPckg();
|
|
229 |
if( ECchSnapId == aParameter )
|
|
230 |
{
|
|
231 |
aValue = serviceConnInfo.iSNAPId;
|
|
232 |
}
|
|
233 |
else if( ECchIapId == aParameter )
|
|
234 |
{
|
|
235 |
aValue = serviceConnInfo.iIapId;
|
|
236 |
}
|
|
237 |
else if( ECchSnapLocked == aParameter )
|
|
238 |
{
|
|
239 |
aValue = serviceConnInfo.iSNAPLocked;
|
|
240 |
}
|
|
241 |
else if( ECchPasswordSet == aParameter )
|
|
242 |
{
|
|
243 |
aValue = serviceConnInfo.iPasswordSet;
|
|
244 |
}
|
|
245 |
else if( ECchReserved == aParameter )
|
|
246 |
{
|
|
247 |
aValue = serviceConnInfo.iReserved;
|
|
248 |
}
|
|
249 |
}
|
|
250 |
}
|
|
251 |
break;
|
|
252 |
default:
|
|
253 |
{
|
|
254 |
status = KErrArgument;
|
|
255 |
}
|
|
256 |
break;
|
|
257 |
}
|
|
258 |
|
|
259 |
CCHLOGSTRING( "CCchServiceImpl::GetConnectionParameter: OUT" );
|
|
260 |
return status.Int();
|
|
261 |
}
|
|
262 |
|
|
263 |
// ---------------------------------------------------------------------------
|
|
264 |
// CCchServiceImpl::SetConnectionParameter
|
|
265 |
// ---------------------------------------------------------------------------
|
|
266 |
//
|
|
267 |
TInt CCchServiceImpl::SetConnectionParameter( TCCHSubserviceType aType,
|
|
268 |
TCchConnectionParameter aParameter, TInt aValue )
|
|
269 |
{
|
|
270 |
CCHLOGSTRING( "CCchServiceImpl::SetConnectionParameter: IN" );
|
|
271 |
TPckgBuf<TServiceConnectionInfo> serviceConnInfoPckg;
|
|
272 |
TRequestStatus status = KErrNone;
|
|
273 |
TInt error = KErrNone;
|
|
274 |
|
|
275 |
switch( aParameter )
|
|
276 |
{
|
|
277 |
case ECchIapId:
|
|
278 |
case ECchSnapId:
|
|
279 |
case ECchReserved:
|
|
280 |
{
|
|
281 |
serviceConnInfoPckg().SetServiceId( iServiceId );
|
|
282 |
serviceConnInfoPckg().SetType( aType );
|
|
283 |
if( ECchSnapId == aParameter )
|
|
284 |
{
|
|
285 |
serviceConnInfoPckg().iSNAPId = aValue;
|
|
286 |
}
|
|
287 |
else if ( ECchIapId == aParameter )
|
|
288 |
{
|
|
289 |
serviceConnInfoPckg().iIapId = aValue;
|
|
290 |
}
|
|
291 |
else // ECchReserved == aParameter
|
|
292 |
{
|
|
293 |
serviceConnInfoPckg().SetParameter( aParameter );
|
|
294 |
serviceConnInfoPckg().iReserved = aValue;
|
|
295 |
}
|
|
296 |
iCch.CchClient().SetConnectionInfo( serviceConnInfoPckg, status );
|
|
297 |
//even the cchclient api seems to be asynchronous,
|
|
298 |
//this method is completed immediately
|
|
299 |
User::WaitForRequest( status );
|
|
300 |
error = status.Int();
|
|
301 |
}
|
|
302 |
break;
|
|
303 |
case ECchSnapLocked:
|
|
304 |
case ECchPasswordSet:
|
|
305 |
{
|
|
306 |
error = KErrNotSupported;
|
|
307 |
}
|
|
308 |
break;
|
|
309 |
default:
|
|
310 |
{
|
|
311 |
error = KErrArgument;
|
|
312 |
}
|
|
313 |
break;
|
|
314 |
}
|
|
315 |
|
|
316 |
CCHLOGSTRING( "CCchServiceImpl::SetConnectionParameter: OUT" );
|
|
317 |
return error;
|
|
318 |
}
|
|
319 |
|
|
320 |
// ---------------------------------------------------------------------------
|
|
321 |
// CCchServiceImpl::GetConnectionParameters
|
|
322 |
// ---------------------------------------------------------------------------
|
|
323 |
//
|
|
324 |
TInt CCchServiceImpl::GetConnectionParameter( TCCHSubserviceType aType,
|
|
325 |
TCchConnectionParameter aParameter, RBuf& aValue ) const
|
|
326 |
{
|
|
327 |
CCHLOGSTRING( "CCchServiceImpl::GetConnectionParameter: IN" );
|
|
328 |
TServiceSelection selection( iServiceId, aType, aParameter );
|
|
329 |
TRequestStatus status = KErrNone;
|
|
330 |
TInt error = KErrNone;
|
|
331 |
|
|
332 |
switch( aParameter )
|
|
333 |
{
|
|
334 |
case ECchServiceInfo:
|
|
335 |
{
|
|
336 |
error = iCch.CchClient().GetServiceInfo( selection, aValue );
|
|
337 |
}
|
|
338 |
break;
|
|
339 |
|
|
340 |
case ECchUsername:
|
|
341 |
{
|
|
342 |
TServiceConnectionInfo serviceConnInfo;
|
|
343 |
TPckgBuf<TServiceConnectionInfo> serviceConnInfoPckg;
|
|
344 |
|
|
345 |
iCch.CchClient().GetConnectionInfo( selection,serviceConnInfoPckg, status );
|
|
346 |
//even the cchclient api seems to be asynchronous,
|
|
347 |
//this method is completed immediately
|
|
348 |
User::WaitForRequest( status );
|
|
349 |
|
|
350 |
serviceConnInfo = serviceConnInfoPckg();
|
|
351 |
aValue = serviceConnInfo.iUsername;
|
|
352 |
}
|
|
353 |
break;
|
|
354 |
case ECchPassword:
|
|
355 |
{
|
|
356 |
error = KErrNotSupported;
|
|
357 |
}
|
|
358 |
break;
|
|
359 |
default:
|
|
360 |
{
|
|
361 |
error = KErrArgument;
|
|
362 |
}
|
|
363 |
break;
|
|
364 |
}
|
|
365 |
|
|
366 |
CCHLOGSTRING( "CCchServiceImpl::GetConnectionParameter: OUT" );
|
|
367 |
return error;
|
|
368 |
}
|
|
369 |
|
|
370 |
// ---------------------------------------------------------------------------
|
|
371 |
// CCchServiceImpl::SetConnectionParameters
|
|
372 |
// ---------------------------------------------------------------------------
|
|
373 |
//
|
|
374 |
TInt CCchServiceImpl::SetConnectionParameter( TCCHSubserviceType aType,
|
|
375 |
TCchConnectionParameter aParameter, const TDesC& aValue )
|
|
376 |
{
|
|
377 |
CCHLOGSTRING( "CCchServiceImpl::SetConnectionParameter: IN" );
|
|
378 |
CCHLOGSTRING2( " aValue: %S", &aValue );
|
|
379 |
|
|
380 |
// Type of subservice has to be ECCHUnknown for username and password
|
|
381 |
__ASSERT_ALWAYS( aType == ECCHUnknown,
|
|
382 |
User::Panic( KNullDesC, KErrArgument ) );
|
|
383 |
|
|
384 |
TPckgBuf<TServiceConnectionInfo> serviceConnInfoPckg;
|
|
385 |
TRequestStatus status = KErrNone;
|
|
386 |
TInt error = KErrNone;
|
|
387 |
|
|
388 |
switch( aParameter )
|
|
389 |
{
|
|
390 |
case ECchUsername:
|
|
391 |
{
|
|
392 |
serviceConnInfoPckg().SetServiceId( iServiceId );
|
|
393 |
serviceConnInfoPckg().SetType( aType );
|
|
394 |
serviceConnInfoPckg().SetParameter( aParameter );
|
|
395 |
|
|
396 |
if ( aValue.Length() < KCCHMaxUsernameLength )
|
|
397 |
{
|
|
398 |
serviceConnInfoPckg().iUsername.Append( aValue );
|
|
399 |
|
|
400 |
iCch.CchClient().SetConnectionInfo( serviceConnInfoPckg, status );
|
|
401 |
//even the cchclient api seems to be asynchronous,
|
|
402 |
//this method is completed immediately
|
|
403 |
User::WaitForRequest( status );
|
|
404 |
error = status.Int();
|
|
405 |
}
|
|
406 |
else
|
|
407 |
{
|
|
408 |
error = KErrArgument;
|
|
409 |
}
|
|
410 |
}
|
|
411 |
break;
|
|
412 |
case ECchPassword:
|
|
413 |
{
|
|
414 |
serviceConnInfoPckg().SetServiceId( iServiceId );
|
|
415 |
serviceConnInfoPckg().SetType( aType );
|
|
416 |
serviceConnInfoPckg().SetParameter( aParameter );
|
|
417 |
if ( aValue.Length() < KCCHMaxPasswordLength )
|
|
418 |
{
|
|
419 |
serviceConnInfoPckg().iPassword.Append( aValue );
|
|
420 |
|
|
421 |
iCch.CchClient().SetConnectionInfo( serviceConnInfoPckg, status );
|
|
422 |
//even the cchclient api seems to be asynchronous,
|
|
423 |
//this method is completed immediately
|
|
424 |
User::WaitForRequest( status );
|
|
425 |
error = status.Int();
|
|
426 |
}
|
|
427 |
else
|
|
428 |
{
|
|
429 |
error = KErrArgument;
|
|
430 |
}
|
|
431 |
}
|
|
432 |
break;
|
|
433 |
default:
|
|
434 |
{
|
|
435 |
error = KErrArgument;
|
|
436 |
}
|
|
437 |
break;
|
|
438 |
}
|
|
439 |
|
|
440 |
CCHLOGSTRING( "CCchServiceImpl::SetConnectionParameter: OUT" );
|
|
441 |
return error;
|
|
442 |
}
|
|
443 |
|
|
444 |
// ---------------------------------------------------------------------------
|
|
445 |
// CCchServiceImpl::Reserve
|
|
446 |
// ---------------------------------------------------------------------------
|
|
447 |
//
|
|
448 |
TInt CCchServiceImpl::Reserve( TCCHSubserviceType aType )
|
|
449 |
{
|
|
450 |
CCHLOGSTRING( "CCchServiceImpl::Reserve: IN" );
|
|
451 |
TServiceSelection selection( iServiceId, aType );
|
|
452 |
TInt error = iCch.CchClient().ReserveService( selection );
|
|
453 |
CCHLOGSTRING( "CCchServiceImpl::Reserve: OUT" );
|
|
454 |
return error;
|
|
455 |
}
|
|
456 |
|
|
457 |
// ---------------------------------------------------------------------------
|
|
458 |
// CCchServiceImpl::Free
|
|
459 |
// ---------------------------------------------------------------------------
|
|
460 |
//
|
|
461 |
TInt CCchServiceImpl::Free( TCCHSubserviceType aType )
|
|
462 |
{
|
|
463 |
CCHLOGSTRING( "CCchServiceImpl::Free: IN" );
|
|
464 |
TServiceSelection selection( iServiceId, aType );
|
|
465 |
TInt error = iCch.CchClient().FreeService( selection );
|
|
466 |
CCHLOGSTRING( "CCchServiceImpl::Free: OUT" );
|
|
467 |
return error;
|
|
468 |
}
|
|
469 |
|
|
470 |
// ---------------------------------------------------------------------------
|
|
471 |
// CCchServiceImpl::IsReserved
|
|
472 |
// ---------------------------------------------------------------------------
|
|
473 |
//
|
|
474 |
TInt CCchServiceImpl::IsReserved( TCCHSubserviceType aType,
|
|
475 |
TBool& aReserved ) const
|
|
476 |
{
|
|
477 |
CCHLOGSTRING( "CCchServiceImpl::IsReserved: IN" );
|
|
478 |
TServiceSelection selection( iServiceId, aType );
|
|
479 |
aReserved = iCch.CchClient().IsReserved( selection );
|
|
480 |
CCHLOGSTRING( "CCchServiceImpl::IsReserved: OUT" );
|
|
481 |
return KErrNone;
|
|
482 |
}
|
|
483 |
|
|
484 |
// ---------------------------------------------------------------------------
|
|
485 |
// CCchServiceImpl::ServiceId
|
|
486 |
// ---------------------------------------------------------------------------
|
|
487 |
//
|
|
488 |
TInt CCchServiceImpl::ServiceId() const
|
|
489 |
{
|
|
490 |
CCHLOGSTRING( "CCchServiceImpl::ServiceId: IN" );
|
|
491 |
return iServiceId;
|
|
492 |
}
|
|
493 |
|
|
494 |
// ---------------------------------------------------------------------------
|
|
495 |
// CCchServiceImpl::IsSupported
|
|
496 |
// ---------------------------------------------------------------------------
|
|
497 |
//
|
|
498 |
TInt CCchServiceImpl::IsSupported( TCCHSubserviceType aType,
|
|
499 |
TBool& aSupported ) const
|
|
500 |
{
|
|
501 |
CCHLOGSTRING( "CCchServiceImpl::IsSupported: IN" );
|
|
502 |
TCCHSubserviceState state( ECCHUninitialized );
|
|
503 |
TServiceSelection selection( iServiceId, aType );
|
|
504 |
TInt error = iCch.CchClient().GetServiceState( selection, state );
|
|
505 |
if( error == KErrNone ||
|
|
506 |
error <= KCCHErrorInvalidIap ) // cch errors are ok
|
|
507 |
{
|
|
508 |
aSupported = ETrue;
|
|
509 |
}
|
|
510 |
else
|
|
511 |
{
|
|
512 |
aSupported = EFalse;
|
|
513 |
}
|
|
514 |
|
|
515 |
CCHLOGSTRING( "CCchServiceImpl::IsSupported: OUT" );
|
|
516 |
return error;
|
|
517 |
}
|
|
518 |
|
|
519 |
// ---------------------------------------------------------------------------
|
|
520 |
// CCchClientObserver::SetObserver
|
|
521 |
// ---------------------------------------------------------------------------
|
|
522 |
//
|
|
523 |
void CCchServiceImpl::SetObserver( MCchServiceStatusObserver& aObserver )
|
|
524 |
{
|
|
525 |
CCHLOGSTRING( "CCchServiceImpl::SetObserver: IN - deprecated - do not use this anymore " );
|
|
526 |
iObserver->SetObserver( aObserver );
|
|
527 |
CCHLOGSTRING( "CCchServiceImpl::SetObserver: OUT - deprecated - do not use this anymore " );
|
|
528 |
}
|
|
529 |
|
|
530 |
// ---------------------------------------------------------------------------
|
|
531 |
// CCchClientObserver::RemoveObserver
|
|
532 |
// ---------------------------------------------------------------------------
|
|
533 |
//
|
|
534 |
void CCchServiceImpl::RemoveObserver( )
|
|
535 |
{
|
|
536 |
CCHLOGSTRING( "CCchServiceImpl::RemoveObserver: IN - deprecated - do not use this anymore " );
|
|
537 |
iObserver->RemoveObserver( );
|
|
538 |
CCHLOGSTRING( "CCchServiceImpl::RemoveObserver: OUT - deprecated - do not use this anymore " );
|
|
539 |
}
|
|
540 |
|
|
541 |
// ---------------------------------------------------------------------------
|
|
542 |
// CCchClientObserver::AddObserver
|
|
543 |
// ---------------------------------------------------------------------------
|
|
544 |
//
|
|
545 |
TInt CCchServiceImpl::AddObserver(
|
|
546 |
MCchServiceStatusObserver& aObserver )
|
|
547 |
{
|
|
548 |
CCHLOGSTRING( "CCchServiceImpl::AddObserver: IN" );
|
|
549 |
TInt err = iObserver->AddObserver( aObserver );
|
|
550 |
CCHLOGSTRING( "CCchServiceImpl::AddObserver: OUT" );
|
|
551 |
|
|
552 |
return err;
|
|
553 |
}
|
|
554 |
|
|
555 |
// ---------------------------------------------------------------------------
|
|
556 |
// CCchClientObserver::RemoveObserver
|
|
557 |
// ---------------------------------------------------------------------------
|
|
558 |
//
|
|
559 |
TInt CCchServiceImpl::RemoveObserver(
|
|
560 |
MCchServiceStatusObserver& aObserver )
|
|
561 |
{
|
|
562 |
CCHLOGSTRING( "CCchServiceImpl::RemoveObserver: IN" );
|
|
563 |
TInt err = iObserver->RemoveObserver( aObserver );
|
|
564 |
CCHLOGSTRING( "CCchServiceImpl::RemoveObserver: OUT" );
|
|
565 |
|
|
566 |
return err;
|
|
567 |
}
|
|
568 |
|
|
569 |
|
|
570 |
// ---------------------------------------------------------------------------
|
|
571 |
// CCchClientObserver::CchImpl
|
|
572 |
// ---------------------------------------------------------------------------
|
|
573 |
//
|
|
574 |
CCchImpl* CCchServiceImpl::CchImpl() const
|
|
575 |
{
|
|
576 |
return &iCch;
|
|
577 |
}
|
|
578 |
|
|
579 |
|
|
580 |
|
|
581 |
// ========================== OTHER EXPORTED FUNCTIONS =========================
|
|
582 |
|
|
583 |
|
|
584 |
// End of File
|