1 /* |
|
2 * Copyright (c) 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 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 inline CRTSecMgrSession::CRTSecMgrSession() |
|
23 { |
|
24 iSecMgrServer = dynamic_cast<CRTSecMgrServer*> (const_cast<CServer2*> (Server())); |
|
25 } |
|
26 inline CRTSecMgrSession::~CRTSecMgrSession() |
|
27 { |
|
28 } |
|
29 |
|
30 inline CRTSecMgrSession* CRTSecMgrSession::NewL() |
|
31 { |
|
32 return new (ELeave) CRTSecMgrSession(); |
|
33 } |
|
34 |
|
35 /** |
|
36 * First line servicing of a client request. |
|
37 |
|
38 * This function dispatches requests to the appropriate handler. |
|
39 * Some messages are handled by the session itself, and are |
|
40 * implemented as CRTSecMgrSession member functions, while |
|
41 * other messages are handled by the subsession, and are |
|
42 * implemented as CRTSecMgrSubSession member functions. |
|
43 */ |
|
44 inline void CRTSecMgrSession::ServiceL(const RMessage2& aMessage) |
|
45 { |
|
46 TRAPD(err,DispatchMessageL(aMessage)); |
|
47 aMessage.Complete (err); |
|
48 } |
|
49 |
|
50 /** |
|
51 * Delete a subsession object through its handle. |
|
52 * |
|
53 */ |
|
54 inline void CRTSecMgrSession::DeleteSubSession(TInt aHandle) |
|
55 { |
|
56 // This will delete the SubSession object; the object is |
|
57 // reference counted, and removing the handle causes the object to be closed |
|
58 // [closing reduces the access count - the object is deleted if the access |
|
59 // count reaches zero etc]. |
|
60 iSubSessionObjectIndex->Remove (aHandle); |
|
61 // decrement resource count |
|
62 iSubSessionCount--; |
|
63 } |
|
64 |
|
65 inline void CRTSecMgrSession::PanicClient(const RMessage2& aMessage, TInt aPanic) const |
|
66 { |
|
67 _LIT(KTxtServer,"SecurityMgr server"); |
|
68 aMessage.Panic (KTxtServer, aPanic); |
|
69 } |
|