|
1 /* |
|
2 * Copyright (c) 2008-2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "hidconnectioninfo.h" |
|
21 #include "hidreportroot.h" |
|
22 #include "debug.h" |
|
23 |
|
24 // ======== MEMBER FUNCTIONS ======== |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // Constructor |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 CConnectionInfo::CConnectionInfo(TInt aConnectionID, CReportRoot* aReportRoot): |
|
31 iConnectionID(aConnectionID), |
|
32 iReportRoot(aReportRoot) |
|
33 { |
|
34 TRACE_FUNC |
|
35 } |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // NewL |
|
39 // --------------------------------------------------------------------------- |
|
40 // |
|
41 CConnectionInfo* CConnectionInfo::NewL(TInt aConnectionID, CReportRoot* aReportRoot) |
|
42 { |
|
43 CConnectionInfo* self = CConnectionInfo::NewLC(aConnectionID, aReportRoot); |
|
44 CleanupStack::Pop( self ); |
|
45 return self; |
|
46 } |
|
47 |
|
48 |
|
49 // --------------------------------------------------------------------------- |
|
50 // NewLC |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 CConnectionInfo* CConnectionInfo::NewLC(TInt aConnectionID, CReportRoot* aReportRoot) |
|
54 { |
|
55 CConnectionInfo* self = new( ELeave ) CConnectionInfo( aConnectionID, aReportRoot); |
|
56 CleanupStack::PushL( self ); |
|
57 return self; |
|
58 } |
|
59 |
|
60 |
|
61 // --------------------------------------------------------------------------- |
|
62 // Destructor |
|
63 // --------------------------------------------------------------------------- |
|
64 // |
|
65 CConnectionInfo::~CConnectionInfo() |
|
66 { |
|
67 TRACE_FUNC_ENTRY |
|
68 delete iReportRoot; |
|
69 iReportRoot = NULL; |
|
70 TRACE_FUNC_EXIT |
|
71 } |
|
72 |
|
73 // --------------------------------------------------------------------------- |
|
74 // ConnectionID |
|
75 // --------------------------------------------------------------------------- |
|
76 // |
|
77 TInt CConnectionInfo::ConnectionID() |
|
78 { |
|
79 return iConnectionID; |
|
80 } |
|
81 |
|
82 // --------------------------------------------------------------------------- |
|
83 // ReportRoot |
|
84 // --------------------------------------------------------------------------- |
|
85 // |
|
86 CReportRoot* CConnectionInfo::ReportRoot() |
|
87 { |
|
88 return iReportRoot; |
|
89 } |
|
90 |
|
91 // --------------------------------------------------------------------------- |
|
92 // SetLastCommandHandler |
|
93 // --------------------------------------------------------------------------- |
|
94 // |
|
95 void CConnectionInfo::SetLastCommandHandler(CHidDriver* aHidDriverItem) |
|
96 { |
|
97 iLastCmdDriver = aHidDriverItem; |
|
98 } |
|
99 // --------------------------------------------------------------------------- |
|
100 // ReturnLastCommandHandler |
|
101 // --------------------------------------------------------------------------- |
|
102 // |
|
103 CHidDriver* CConnectionInfo::ReturnLastCommandHandler() |
|
104 { |
|
105 return iLastCmdDriver; |
|
106 } |