|
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 // playerinformation.h This file contains structures shared by the AVRCP API with the AVRCP bearer. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 @released |
|
22 */ |
|
23 |
|
24 #ifndef REMCONPLAYERINFORMATION_H |
|
25 #define REMCONPLAYERINFORMATION_H |
|
26 |
|
27 #include "playerinformationtarget.h" |
|
28 #include "avrcpipc.h" |
|
29 #include <avcframe.h> |
|
30 |
|
31 /** |
|
32 * The UID identifying the RemCon PlayerInformation interface. |
|
33 */ |
|
34 const TInt KRemConPlayerInformationUid = 0x10285B21; |
|
35 |
|
36 // The Bluetooth SIG registered VendorId, see table 4.7 |
|
37 const AVC::TAVCVendorId KBluetoothSIGVendorId = 0x001958; |
|
38 |
|
39 // This is the maximum length of a request that can be received |
|
40 // GetElementAttributes (PDU 0x20) has the largest possible request |
|
41 // which is identifier (8 bytes) + numAttr (1 byte) + attributes |
|
42 // (255 * 4 bytes) the total of which is 1029 bytes. |
|
43 const TInt KMaxLengthPlayerInformationMsg = 1029; |
|
44 |
|
45 |
|
46 // Used by PDU 0x11 and PDU 0x12 |
|
47 class RRemConPlayerListOfAttributes : public RAvrcpIPC |
|
48 { |
|
49 public: |
|
50 TInt iNumberAttributes; |
|
51 RArray<TInt> iAttributes; |
|
52 |
|
53 public: |
|
54 IMPORT_C void ReadL(const TDesC8& aData); |
|
55 IMPORT_C void WriteL(TDes8& aOutData); |
|
56 IMPORT_C void Close(); |
|
57 }; |
|
58 |
|
59 // Used by PDU 0x13 (response) and PDU 0x14 (request) |
|
60 class RRemConPlayerAttributeIdsAndValues : public RAvrcpIPC |
|
61 { |
|
62 public: |
|
63 TInt iNumberAttributes; |
|
64 RArray<TInt> iAttributeId; |
|
65 RArray<TInt> iAttributeValue; |
|
66 |
|
67 public: |
|
68 IMPORT_C void ReadL(const TDesC8& aData); |
|
69 IMPORT_C void WriteL(TDes8& aOutData); |
|
70 IMPORT_C void Close(); |
|
71 }; |
|
72 |
|
73 class RSettingWithCharset |
|
74 { |
|
75 public: |
|
76 IMPORT_C void Close(); |
|
77 |
|
78 public: |
|
79 TInt iAttributeId; |
|
80 TUint16 iCharset; |
|
81 TInt iStringLen; |
|
82 HBufC8* iString; |
|
83 }; |
|
84 |
|
85 // Used by PDU 0x15 and PDU 0x16 |
|
86 class RRemConGetPlayerApplicationTextResponse : public RAvrcpIPC |
|
87 { |
|
88 public: |
|
89 TInt iNumberAttributes; |
|
90 RArray<RSettingWithCharset> iAttributes; |
|
91 |
|
92 public: |
|
93 IMPORT_C void ReadL(const TDesC8& aData); |
|
94 IMPORT_C void WriteL(TDes8& aOutData); |
|
95 IMPORT_C void Close(); |
|
96 IMPORT_C TInt Size(); |
|
97 }; |
|
98 |
|
99 // Used by PDU 0x10 |
|
100 class RRemConGetCapabilitiesResponse : public RAvrcpIPC |
|
101 { |
|
102 public: |
|
103 TUint16 iCapabilityId; |
|
104 TUint16 iCapabilityCount; |
|
105 RArray<TUint32> iCapabilities; |
|
106 |
|
107 public: |
|
108 IMPORT_C void ReadL(const TDesC8& aData); |
|
109 IMPORT_C void WriteL(TDes8& aOutData); |
|
110 IMPORT_C void Close(); |
|
111 }; |
|
112 |
|
113 // Used by PDU 0x30 |
|
114 class RRemConPlayerInformationGetPlayStatusResponse : public RAvrcpIPC |
|
115 { |
|
116 public: |
|
117 TUint iPlayPos; |
|
118 TUint iTrackLength; |
|
119 MPlayerEventsObserver::TPlaybackStatus iStatus; |
|
120 |
|
121 public: |
|
122 IMPORT_C void ReadL(const TDesC8& aData); |
|
123 IMPORT_C void WriteL(TDes8&); |
|
124 }; |
|
125 |
|
126 // Used by PDU 0xff |
|
127 class RRemConPlayerInformationGetPlayStatusUpdateRequest : public RAvrcpIPC |
|
128 { |
|
129 public: |
|
130 MPlayerEventsObserver::TPlaybackStatus iStatus; |
|
131 |
|
132 public: |
|
133 IMPORT_C void ReadL(const TDesC8& aData); |
|
134 IMPORT_C void WriteL(TDes8&); |
|
135 }; |
|
136 |
|
137 // Used by PDU 0xff |
|
138 class RRemConPlayerInformationGetPlayStatusUpdateResponse : public RAvrcpIPC |
|
139 { |
|
140 public: |
|
141 MPlayerEventsObserver::TPlaybackStatus iStatus; |
|
142 |
|
143 public: |
|
144 IMPORT_C void ReadL(const TDesC8& aData); |
|
145 IMPORT_C void WriteL(TDes8&); |
|
146 }; |
|
147 |
|
148 class RRemConPlayerInformation8BitResponse : public RAvrcpIPC |
|
149 { |
|
150 public: |
|
151 IMPORT_C void ReadL(const TDesC8& aData); |
|
152 IMPORT_C void WriteL(TDes8&); |
|
153 TUint8 iValue; |
|
154 }; |
|
155 |
|
156 class RRemConPlayerInformation32BitResponse : public RAvrcpIPC |
|
157 { |
|
158 public: |
|
159 IMPORT_C void ReadL(const TDesC8& aData); |
|
160 IMPORT_C void WriteL(TDes8&); |
|
161 TInt iValue; |
|
162 }; |
|
163 |
|
164 class RRemConPlayerInformation64BitResponse : public RAvrcpIPC |
|
165 { |
|
166 public: |
|
167 IMPORT_C void ReadL(const TDesC8& aData); |
|
168 IMPORT_C void WriteL(TDes8&); |
|
169 TUint64 iValue; |
|
170 }; |
|
171 |
|
172 #endif // REMCONPLAYERINFORMATION_H |