|
1 /* |
|
2 * Copyright (c) 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: Declares main application class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __BTHIDDEVICE_H__ |
|
20 #define __BTHIDDEVICE_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <bttypes.h> |
|
24 #include <btdevice.h> |
|
25 |
|
26 class CHidDescriptorList; |
|
27 |
|
28 /*! |
|
29 A bluetooth hid device.details |
|
30 */ |
|
31 |
|
32 class CBTHidDevice : public CBase |
|
33 { |
|
34 public: |
|
35 /*! |
|
36 Create a CBTHidDevice object using two phase construction, |
|
37 and return a pointer to the created object |
|
38 @result Pointer to created CBTHidDevice object |
|
39 */ |
|
40 static CBTHidDevice* NewL(); |
|
41 |
|
42 /*! |
|
43 Create a CBTHidDevice object using two phase construction, |
|
44 and return a pointer to the created object, leaving a pointer to the |
|
45 object on the cleanup stack. |
|
46 @result Pointer to created CBTHidDevice object. |
|
47 */ |
|
48 static CBTHidDevice* NewLC(); |
|
49 |
|
50 /*! |
|
51 Destroy the object and release all memory objects. |
|
52 */ |
|
53 ~CBTHidDevice(); |
|
54 |
|
55 /*! |
|
56 Determine the number of bytes this object will take up when |
|
57 externalised to disk |
|
58 @return The size required to externalise. |
|
59 */ |
|
60 TInt DiskSize() const; |
|
61 |
|
62 /*! |
|
63 Externalize data from a stream. |
|
64 @param aStream stream object. |
|
65 */ |
|
66 void ExternalizeL(RWriteStream& aStream) const; |
|
67 |
|
68 /*! |
|
69 Internalize data to a stream. |
|
70 @param aStream stream object . |
|
71 */ |
|
72 void InternalizeL(RReadStream& aStream); |
|
73 |
|
74 private: |
|
75 /*! |
|
76 Constructs this object. |
|
77 */ |
|
78 CBTHidDevice(); |
|
79 |
|
80 /*! |
|
81 Performs second phase construction of this object |
|
82 */ |
|
83 void ConstructL(); |
|
84 |
|
85 public: |
|
86 /*! Bluetooth Address */ |
|
87 TBTDevAddr iAddress; |
|
88 |
|
89 /*! Bluetooth Name */ |
|
90 TBTDeviceName iDeviceName; |
|
91 |
|
92 /*! Bluetooth Class of Device (Cod) */ |
|
93 TBTDeviceClass iDeviceClass; |
|
94 |
|
95 /*! Use security on connection */ |
|
96 TBool iUseSecurity; |
|
97 |
|
98 // HID Service Attributes |
|
99 |
|
100 /*! Vendor assigned device release number */ |
|
101 TUint iDeviceReleaseNumber; |
|
102 |
|
103 /*! Device SubClass */ |
|
104 TUint iDeviceSubClass; |
|
105 |
|
106 /*! Device Country Code */ |
|
107 TUint iCountryCode; |
|
108 |
|
109 /*! Indicated if the device supports the virtual cable feature */ |
|
110 TBool iVirtuallyCabled; |
|
111 |
|
112 /*! Device initiates reconnection process */ |
|
113 TBool iReconnectInit; |
|
114 |
|
115 /*! The device BT HID Descriptor List */ |
|
116 CHidDescriptorList* iDescList; |
|
117 |
|
118 /*! Device remains connectable */ |
|
119 TBool iNormallyConnectable; |
|
120 |
|
121 /*! Device Profile Version */ |
|
122 TUint iProfileVersion; |
|
123 |
|
124 //Bluetooth PNP Device Identification |
|
125 |
|
126 /*! Vendor ID */ |
|
127 TUint iVendorID; |
|
128 |
|
129 /*! Product ID */ |
|
130 TUint iProductID; |
|
131 |
|
132 }; |
|
133 |
|
134 #endif // __BTHIDDEVICE_H__ |