author | hgs |
Wed, 07 Jul 2010 15:08:54 +0800 | |
changeset 29 | 59aa7d6e3e0f |
parent 26 | f3a1ae528dee |
child 43 | 012cc2ee6408 |
permissions | -rw-r--r-- |
0
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/** |
26 | 2 |
* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). |
0
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* Implements a utitility class which holds the information about a USB device personality |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
* |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
* |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
*/ |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
|
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
|
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
|
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
/** |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
@file |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
*/ |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#ifndef __CPERSONALITY_INL__ |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
#define __CPERSONALITY_INL__ |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
|
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
/** |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
* @internalComponent |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
* @return version |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
*/ |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
inline TInt CPersonality::Version() const |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
{ |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
return iVersion; |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
} |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
|
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
/** |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
* @internalComponent |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
* @return the property information |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
*/ |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
inline TUint32 CPersonality::Property() const |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
{ |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
return iProperty; |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
} |
26 | 46 |
|
47 |
/** |
|
48 |
* @internalComponent |
|
49 |
* @return the Device Class information |
|
50 |
*/ |
|
51 |
inline TUint8 CPersonality::DeviceClass() const |
|
52 |
{ |
|
53 |
return iDeviceClass; |
|
54 |
} |
|
55 |
||
56 |
/** |
|
57 |
* @internalComponent |
|
58 |
* @return the Device Sub Class information |
|
59 |
*/ |
|
60 |
inline TUint8 CPersonality::DeviceSubClass() const |
|
61 |
{ |
|
62 |
return iDeviceSubClass; |
|
63 |
} |
|
64 |
||
65 |
/** |
|
66 |
* @internalComponent |
|
67 |
* @return the Device Protocol information |
|
68 |
*/ |
|
69 |
inline TUint8 CPersonality::DeviceProtocol() const |
|
70 |
{ |
|
71 |
return iDeviceProtocol; |
|
72 |
} |
|
73 |
||
74 |
/** |
|
75 |
* @internalComponent |
|
76 |
* @return the Configurations Number information |
|
77 |
*/ |
|
78 |
inline TUint8 CPersonality::NumConfigurations() const |
|
79 |
{ |
|
80 |
return iNumConfigurations; |
|
81 |
} |
|
82 |
||
83 |
/** |
|
84 |
* @internalComponent |
|
85 |
* @return the Product Id information |
|
86 |
*/ |
|
87 |
inline TUint16 CPersonality::ProductId() const |
|
88 |
{ |
|
89 |
return iProductId; |
|
90 |
} |
|
91 |
||
92 |
/** |
|
93 |
* @internalComponent |
|
94 |
* @return the Feature Id information |
|
95 |
*/ |
|
96 |
inline TInt CPersonality::FeatureId() const |
|
97 |
{ |
|
98 |
return iFeatureId; |
|
99 |
} |
|
100 |
||
101 |
/** |
|
102 |
* @internalComponent |
|
103 |
* @return the Feature Id information |
|
104 |
*/ |
|
105 |
inline TUint16 CPersonality::BcdDevice() const |
|
106 |
{ |
|
107 |
return iBcdDevice; |
|
108 |
} |
|
109 |
||
110 |
/** |
|
111 |
* @internalComponent |
|
112 |
* @return personality id |
|
113 |
*/ |
|
114 |
inline TInt CPersonality::PersonalityId() const |
|
115 |
{ |
|
116 |
return iPersonalityId; |
|
117 |
} |
|
118 |
||
119 |
/** |
|
120 |
* @internalComponent |
|
121 |
* @return a const pointer to description string |
|
122 |
*/ |
|
123 |
inline const TDesC* CPersonality::Description() const |
|
124 |
{ |
|
125 |
return iDescription; |
|
126 |
} |
|
127 |
||
128 |
/** |
|
129 |
* @internalComponent |
|
130 |
* @return a const pointer to Personality Configs |
|
131 |
*/ |
|
132 |
inline const RPointerArray<CPersonalityConfigurations>& CPersonality::PersonalityConfigs() const |
|
133 |
{ |
|
134 |
return iPersonalityConfigs; |
|
135 |
} |
|
136 |
||
137 |
||
138 |
/** |
|
139 |
* @internalComponent |
|
140 |
* @return a const to Classes |
|
141 |
*/ |
|
142 |
inline const RArray<CPersonalityConfigurations::TUsbClasses> & CPersonalityConfigurations::Classes() const |
|
143 |
{ |
|
144 |
return iClasses; |
|
145 |
} |
|
146 |
||
0
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
147 |
#endif // __PERSONALITY_INL__ |
c9bc50fca66e
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |