|
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 the License "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: Implementation of RC client's ServiceBase* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "RCRServiceBase.h" |
|
22 #include "RCRClient.h" |
|
23 #include <e32math.h> |
|
24 |
|
25 // CONSTANTS |
|
26 // None |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // RCRServiceBase::RCRServiceBase |
|
32 // |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 RCRServiceBase::RCRServiceBase() |
|
36 : RSubSessionBase(), |
|
37 iClient( NULL ) |
|
38 { |
|
39 // None |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // RCRServiceBase::Open |
|
44 // |
|
45 // ----------------------------------------------------------------------------- |
|
46 // |
|
47 TInt RCRServiceBase::Open( RCRClient& aClient ) |
|
48 { |
|
49 __ASSERT_ALWAYS( aClient.Handle(), PanicClient( KErrBadHandle ) ); |
|
50 iClient = &aClient; |
|
51 TIpcArgs args( TIpcArgs::ENothing ); |
|
52 return CreateSubSession( aClient, ECRServCreateSubSession, args ); |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // RCRServiceBase::Close |
|
57 // |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 void RCRServiceBase::Close() |
|
61 { |
|
62 RSubSessionBase::CloseSubSession( ECRServCloseSubSession ); |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // RCRServiceBase::PanicClient |
|
67 // |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 void RCRServiceBase::PanicClient( TInt aFault ) |
|
71 { |
|
72 _LIT( KCRClientFault, "CRApi Client Fault" ); |
|
73 User::Panic( KCRClientFault, aFault ); |
|
74 } |
|
75 |
|
76 // End of File |