|
1 /* |
|
2 * Copyright (c) 2004-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 "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: Declares driver list itemapplication class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_DRIVERLISTITEM_H |
|
21 #define C_DRIVERLISTITEM_H |
|
22 |
|
23 #include "hidreportroot.h" |
|
24 #include "hidinterfaces.h" |
|
25 |
|
26 /** |
|
27 * Container class so we can maintain a list of driver instances |
|
28 * |
|
29 * @lib generichid.lib |
|
30 * @since S60 v5.0 |
|
31 */ |
|
32 class CDriverListItem : public CBase |
|
33 { |
|
34 // Give access to the TSglQueLink offset: |
|
35 friend class CGenericHid; |
|
36 |
|
37 public : |
|
38 |
|
39 explicit CDriverListItem(TInt aConnectionId); |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 virtual ~CDriverListItem(); |
|
45 |
|
46 |
|
47 /** |
|
48 * Set driver instance |
|
49 * |
|
50 * @since S60 v5.0 |
|
51 * @param aDriver Driver instance |
|
52 * @return None |
|
53 */ |
|
54 void SetDriver(CHidDriver* aDriver); |
|
55 |
|
56 /** |
|
57 * Return connection ID |
|
58 * |
|
59 * @since S60 v5.0 |
|
60 * @return Connection id |
|
61 */ |
|
62 TInt ConnectionId() const; |
|
63 |
|
64 /** |
|
65 * Return driver instance |
|
66 * |
|
67 * @since S60 v5.0 |
|
68 * @return driver instance |
|
69 */ |
|
70 CHidDriver* Driver() const; |
|
71 |
|
72 |
|
73 private : |
|
74 |
|
75 /** |
|
76 * Queue link |
|
77 */ |
|
78 TSglQueLink iSlink; |
|
79 |
|
80 /** |
|
81 * The transport-layer ID for the connection |
|
82 */ |
|
83 TInt iConnectionId; |
|
84 |
|
85 /** |
|
86 * The device driver |
|
87 * Own. |
|
88 */ |
|
89 CHidDriver* iDriver; |
|
90 |
|
91 }; |
|
92 #endif |
|
93 |