51
|
1 |
// Copyright (c) 2008-2010 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 |
// TPlayerFeatureBitmask.h
|
|
15 |
//
|
|
16 |
|
|
17 |
#ifndef PLAYERBITMASKS_H_
|
|
18 |
#define PLAYERBITMASKS_H_
|
|
19 |
|
|
20 |
/**
|
|
21 |
@file
|
|
22 |
@internalComponent
|
|
23 |
@released
|
|
24 |
*/
|
|
25 |
#include <e32base.h>
|
|
26 |
|
|
27 |
const TInt KFeatureBitmaskLength = 16;
|
|
28 |
|
|
29 |
enum TByteOffsets
|
|
30 |
{
|
|
31 |
ESelectByteOffset = 0,
|
|
32 |
EUpByteOffset = 0,
|
|
33 |
EDownByteOffset = 0,
|
|
34 |
ELeftByteOffset = 0,
|
|
35 |
ERightByteOffset = 0,
|
|
36 |
ERightUpByteOffset = 0,
|
|
37 |
ERightDownByteOffset = 0,
|
|
38 |
ELeftUpByteOffset = 0,
|
|
39 |
ELeftDownByteOffset = 1,
|
|
40 |
ERootMenuByteOffset = 1,
|
|
41 |
ESetupMenuByteOffset = 1,
|
|
42 |
EContentsMenuByteOffset = 1,
|
|
43 |
EFavoriteMenuByteOffset = 1,
|
|
44 |
EExitByteOffset = 1,
|
|
45 |
E0ByteOffset = 1,
|
|
46 |
E1ByteOffset = 1,
|
|
47 |
E2ByteOffset = 2,
|
|
48 |
E3ByteOffset = 2,
|
|
49 |
E4ByteOffset = 2,
|
|
50 |
E5ByteOffset = 2,
|
|
51 |
E6ByteOffset = 2,
|
|
52 |
E7ByteOffset = 2,
|
|
53 |
E8ByteOffset = 2,
|
|
54 |
E9ByteOffset = 2,
|
|
55 |
EDotByteOffset = 3,
|
|
56 |
EEnterByteOffset = 3,
|
|
57 |
EClearByteOffset = 3,
|
|
58 |
EChannelUpByteOffset = 3,
|
|
59 |
EChannelDownByteOffset = 3,
|
|
60 |
EPreviousChannelByteOffset = 3,
|
|
61 |
ESoundSelectByteOffset = 3,
|
|
62 |
EInputSelectByteOffset = 3,
|
|
63 |
EDisplayInformationByteOffset = 4,
|
|
64 |
EHelpByteOffset = 4,
|
|
65 |
EPageUpByteOffset = 4,
|
|
66 |
EPageDownByteOffset = 4,
|
|
67 |
EPowerByteOffset = 4,
|
|
68 |
EVolumeUpByteOffset = 4,
|
|
69 |
EVolumeDownByteOffset = 4,
|
|
70 |
EMuteByteOffset = 4,
|
|
71 |
EPlayByteOffset = 5,
|
|
72 |
EStopByteOffset = 5,
|
|
73 |
EPauseByteOffset = 5,
|
|
74 |
ERecordByteOffset = 5,
|
|
75 |
ERewindByteOffset = 5,
|
|
76 |
EFastForwardByteOffset = 5,
|
|
77 |
EEjectByteOffset = 5,
|
|
78 |
EForwardByteOffset = 5,
|
|
79 |
EBackwardByteOffset = 6,
|
|
80 |
EAngleByteOffset = 6,
|
|
81 |
ESubpictureByteOffset = 6,
|
|
82 |
EF1ByteOffset = 6,
|
|
83 |
EF2ByteOffset = 6,
|
|
84 |
EF3ByteOffset = 6,
|
|
85 |
EF4ByteOffset = 6,
|
|
86 |
EF5ByteOffset = 6,
|
|
87 |
EVendorUniqueByteOffset = 7,
|
|
88 |
EGroupNavigationByteOffset = 7,
|
|
89 |
EAdvancedControlPlayerByteOffset = 7,
|
|
90 |
EBrowsingByteOffset = 7,
|
|
91 |
ESearchByteOffset = 7,
|
|
92 |
EAddToNowPlayingByteOffset = 7,
|
|
93 |
EDatabaseAwareByteOffset = 7,
|
|
94 |
EBrowsableOnlyWhenAddressedByteOffset = 7,
|
|
95 |
ESearchableOnlyWhenAddressedByteOffset = 8,
|
|
96 |
ENowPlayingByteOffset = 8,
|
|
97 |
EUidPersistencyByteOffset = 8,
|
|
98 |
};
|
|
99 |
|
|
100 |
enum TBitOffset
|
|
101 |
{
|
|
102 |
ESelectBitOffset = 0,
|
|
103 |
EUpBitOffset = 1,
|
|
104 |
EDownBitOffset = 2,
|
|
105 |
ELeftBitOffset = 3,
|
|
106 |
ERightBitOffset = 4,
|
|
107 |
ERightUpBitOffset = 5,
|
|
108 |
ERightDownBitOffset = 6,
|
|
109 |
ELeftUpBitOffset = 7,
|
|
110 |
ELeftDownBitOffset = 0,
|
|
111 |
ERootMenuBitOffset = 1,
|
|
112 |
ESetupMenuBitOffset = 2,
|
|
113 |
EContentsMenuBitOffset = 3,
|
|
114 |
EFavoriteMenuBitOffset = 4,
|
|
115 |
EExitBitOffset = 5,
|
|
116 |
E0BitOffset = 6,
|
|
117 |
E1BitOffset = 7,
|
|
118 |
E2BitOffset = 0,
|
|
119 |
E3BitOffset = 1,
|
|
120 |
E4BitOffset = 2,
|
|
121 |
E5BitOffset = 3,
|
|
122 |
E6BitOffset = 4,
|
|
123 |
E7BitOffset = 5,
|
|
124 |
E8BitOffset = 6,
|
|
125 |
E9BitOffset = 7,
|
|
126 |
EDotBitOffset = 0,
|
|
127 |
EEnterBitOffset = 1,
|
|
128 |
EClearBitOffset = 2,
|
|
129 |
EChannelUpBitOffset = 3,
|
|
130 |
EChannelDownBitOffset = 4,
|
|
131 |
EPreviousChannelBitOffset = 5,
|
|
132 |
ESoundSelectBitOffset = 6,
|
|
133 |
EInputSelectBitOffset = 7,
|
|
134 |
EDisplayInformationBitOffset = 0,
|
|
135 |
EHelpBitOffset = 1,
|
|
136 |
EPageUpBitOffset = 2,
|
|
137 |
EPageDownBitOffset = 3,
|
|
138 |
EPowerBitOffset = 4,
|
|
139 |
EVolumeUpBitOffset = 5,
|
|
140 |
EVolumeDownBitOffset = 6,
|
|
141 |
EMuteBitOffset = 7,
|
|
142 |
EPlayBitOffset = 0,
|
|
143 |
EStopBitOffset = 1,
|
|
144 |
EPauseBitOffset = 2,
|
|
145 |
ERecordBitOffset = 3,
|
|
146 |
ERewindBitOffset = 4,
|
|
147 |
EFastForwardBitOffset = 5,
|
|
148 |
EEjectBitOffset = 6,
|
|
149 |
EForwardBitOffset = 7,
|
|
150 |
EBackwardBitOffset = 0,
|
|
151 |
EAngleBitOffset = 1,
|
|
152 |
ESubpictureBitOffset = 2,
|
|
153 |
EF1BitOffset = 3,
|
|
154 |
EF2BitOffset = 4,
|
|
155 |
EF3BitOffset = 5,
|
|
156 |
EF4BitOffset = 6,
|
|
157 |
EF5BitOffset = 7,
|
|
158 |
EVendorUniqueBitOffset = 0,
|
|
159 |
EGroupNavigationBitOffset = 1,
|
|
160 |
EAdvancedControlPlayerBitOffset = 2,
|
|
161 |
EBrowsingBitOffset = 3,
|
|
162 |
ESearchBitOffset = 4,
|
|
163 |
EAddToNowPlayingBitOffset = 5,
|
|
164 |
EDatabaseAwareBitOffset = 6,
|
|
165 |
EBrowsableOnlyWhenAddressedBitOffset = 7,
|
|
166 |
ESearchableOnlyWhenAddressedBitOffset = 0,
|
|
167 |
ENowPlayingBitOffset = 1,
|
|
168 |
EUidPersistencyBitOffset = 2,
|
|
169 |
};
|
|
170 |
|
|
171 |
class TPlayerFeatureBitmask
|
|
172 |
{
|
|
173 |
public:
|
|
174 |
TPlayerFeatureBitmask();
|
|
175 |
TPlayerFeatureBitmask(const TPlayerFeatureBitmask& aFeatureBitmask);
|
|
176 |
|
|
177 |
inline const TDesC8& FeatureBitmask() const;
|
|
178 |
|
|
179 |
void SetCoreApiFeatures(const RArray<TUint>& aOperation);
|
|
180 |
void SetAbsoluteVolumeApiFeatures(const RArray<TUint>& aOperation);
|
|
181 |
void SetGroupNavigationApiFeatures(const RArray<TUint>& aOperation);
|
|
182 |
void SetNowPlayingApiFeatures(const RArray<TUint>& aOperation);
|
|
183 |
void SetMediaBrowseApiFeatures(const RArray<TUint>& aOperation);
|
|
184 |
|
|
185 |
private:
|
|
186 |
void SetCoreApiFeatures();
|
|
187 |
|
|
188 |
private:
|
|
189 |
TBuf8<KFeatureBitmaskLength> iFeatureBitmask;
|
|
190 |
};
|
|
191 |
|
|
192 |
const TDesC8& TPlayerFeatureBitmask::FeatureBitmask() const
|
|
193 |
{
|
|
194 |
return iFeatureBitmask;
|
|
195 |
}
|
|
196 |
#endif /*PLAYERBITMASKS_H_*/
|