|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "clesessionproxy.h" |
|
17 #include "ssmserverpanic.h" |
|
18 |
|
19 CCleSessionProxy* CCleSessionProxy::NewL() |
|
20 { |
|
21 CCleSessionProxy* self = new (ELeave) CCleSessionProxy; |
|
22 return self; |
|
23 } |
|
24 |
|
25 void CCleSessionProxy::ExecuteCommandList(const CSsmCommandList& aCmdList, TRequestStatus& aStatus, TCmdErrorSeverity& aSeverity) |
|
26 { |
|
27 iCleSession.ExecuteCommandList(aCmdList, aStatus, aSeverity); |
|
28 } |
|
29 |
|
30 void CCleSessionProxy::ExecuteCommandListCancel() |
|
31 { |
|
32 iCleSession.ExecuteCommandListCancel(); |
|
33 } |
|
34 |
|
35 void CCleSessionProxy::ConnectL() |
|
36 { |
|
37 __ASSERT_DEBUG(!iConnected, PanicNow(KPanicSysStateMgr, ESsmCCleSessionProxy1)); |
|
38 iCleSession.ConnectL(); |
|
39 iConnected = ETrue; |
|
40 } |
|
41 |
|
42 void CCleSessionProxy::ReleaseCle() |
|
43 { |
|
44 delete this; |
|
45 } |
|
46 |
|
47 void CCleSessionProxy::Close() |
|
48 { |
|
49 iCleSession.Close(); |
|
50 iConnected = EFalse; |
|
51 } |
|
52 |
|
53 TBool CCleSessionProxy::IsConnected() |
|
54 { |
|
55 return iConnected; |
|
56 } |
|
57 |
|
58 CCleSessionProxy::~CCleSessionProxy() |
|
59 { |
|
60 if(iConnected) |
|
61 iCleSession.Close(); |
|
62 } |
|
63 |
|
64 MCleSessionProxy* CCleSessionProxy::CreateNewProxyL() |
|
65 { |
|
66 return CCleSessionProxy::NewL(); |
|
67 } |