|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #ifndef DEVUI_CONST_H_ |
|
18 #define DEVUI_CONST_H_ |
|
19 |
|
20 #include <btdevice.h> |
|
21 // Order must match the one in resources (R_BT_DEFAULT_DEVICE_NAMES) |
|
22 // |
|
23 enum TBTDefaultDevNameIndex |
|
24 { |
|
25 EBTDeviceNameIndexComputer = 0, |
|
26 EBTDeviceNameIndexPhone, |
|
27 EBTDeviceNameIndexAudio, |
|
28 EBTDeviceNameIndexKeyboard, |
|
29 EBTDeviceNameIndexMouse, |
|
30 EBTDeviceNameIndexPrinter, |
|
31 EBTDeviceNameIndexCarKit, |
|
32 EBTDeviceNameIndexDefault |
|
33 }; |
|
34 |
|
35 // Enum for items in search filter |
|
36 enum TBTSearchFilterItem |
|
37 { |
|
38 EBTSearchForAll = 0, |
|
39 EBTSearchForAudio, |
|
40 EBTSearchForPhone, |
|
41 EBTSearchForComputer, |
|
42 EBTSearchForInput |
|
43 }; |
|
44 |
|
45 // Order must match the one in resources (R_BTNOTIF_ICONS) |
|
46 // |
|
47 enum TDeviceIconIndex |
|
48 { |
|
49 EDeviceIconComputer = 0, |
|
50 EDeviceIconPhone, |
|
51 EDeviceIconAudio, |
|
52 EDeviceIconDefault, |
|
53 EDeviceIconBlank, |
|
54 EDeviceIconKeyboard, |
|
55 EDeviceIconMouse, |
|
56 EDeviceIconPrinter, |
|
57 EDeviceIconCarkit, |
|
58 EDeviceIconPaired, |
|
59 EDeviceIconBlocked, |
|
60 EDeviceIconRssiLow, |
|
61 EDeviceIconRssiMed, |
|
62 EDeviceIconRssiGood, |
|
63 }; |
|
64 |
|
65 struct TDeviceIconFormat |
|
66 { |
|
67 TDeviceIconIndex iIdx; |
|
68 const TText* iFormat; |
|
69 }; |
|
70 |
|
71 // Order must match the one in TDeviceIconIndex |
|
72 // |
|
73 const TDeviceIconFormat KDeviceIconFormatTable[] = |
|
74 { |
|
75 {EDeviceIconComputer, _S("0\t")}, //computer |
|
76 {EDeviceIconPhone, _S("1\t")}, // phone |
|
77 {EDeviceIconAudio, _S("2\t")}, // audio |
|
78 {EDeviceIconDefault, _S("3\t")}, // default |
|
79 {EDeviceIconBlank, _S("4\t")}, // blank |
|
80 {EDeviceIconKeyboard, _S("5\t")}, // keyboard |
|
81 {EDeviceIconMouse, _S("6\t")}, // mouse |
|
82 {EDeviceIconPrinter, _S("7\t")}, // printer |
|
83 {EDeviceIconCarkit, _S("8\t")}, // carkit |
|
84 {EDeviceIconPaired, _S("\t9")}, // paired |
|
85 {EDeviceIconBlocked, _S("\t10")}, // blocked |
|
86 {EDeviceIconRssiLow, _S("\t11")}, // RssiLow |
|
87 {EDeviceIconRssiMed, _S("\t12")}, // RssiMed |
|
88 {EDeviceIconRssiGood, _S("\t13")} // RssiGood |
|
89 }; |
|
90 |
|
91 // Total number of different device icons |
|
92 const TInt KDeviceIconCount = |
|
93 sizeof(KDeviceIconFormatTable) / sizeof(TDeviceIconFormat); |
|
94 |
|
95 /* |
|
96 * The classification of a device's icon and default name |
|
97 * corresponding to its major and minor device classes. |
|
98 */ |
|
99 struct TDeviceRowLayout |
|
100 { |
|
101 TInt iMajorDevClass; |
|
102 TInt iMinorDevClass; |
|
103 TDeviceIconIndex iIconIndex; |
|
104 TBTDefaultDevNameIndex iDefaultNameIndex; |
|
105 }; |
|
106 |
|
107 /* |
|
108 * Device classification mapping table. |
|
109 * |
|
110 * Notice 1: Considering runtime searching efficiency, if certain major or minor |
|
111 * device classes shall use the default icon and name, it is not recommended |
|
112 * to present in this table. |
|
113 * |
|
114 * Notice 2: Regulated by searching algorithm, when devices carrying the same |
|
115 * major device class may have different icons and names for different minor |
|
116 * device classes, the unclassified minor device class must present at last |
|
117 * among these belonging to the same major device class. |
|
118 */ |
|
119 const TDeviceRowLayout KDeviceRowLayoutTable[] = |
|
120 { |
|
121 {EMajorDeviceComputer, 0, EDeviceIconComputer, EBTDeviceNameIndexComputer }, |
|
122 {EMajorDevicePhone, 0, EDeviceIconPhone, EBTDeviceNameIndexPhone }, |
|
123 {EMajorDeviceAudioDevice, EMinorDeviceAVCarAudio, EDeviceIconCarkit, EBTDeviceNameIndexCarKit }, |
|
124 {EMajorDeviceAudioDevice, 0, EDeviceIconAudio, EBTDeviceNameIndexAudio }, |
|
125 {EMajorDeviceImaging, EMinorDeviceImagingPrinter, EDeviceIconPrinter, EBTDeviceNameIndexPrinter }, |
|
126 {EMajorDevicePeripheral, EMinorDevicePeripheralKeyboard, EDeviceIconKeyboard, EBTDeviceNameIndexKeyboard }, |
|
127 {EMajorDevicePeripheral, EMinorDevicePeripheralPointer, EDeviceIconMouse, EBTDeviceNameIndexMouse }, |
|
128 }; |
|
129 |
|
130 const TInt KDeviceRowLayoutTableSize = (sizeof(KDeviceRowLayoutTable) / sizeof(TDeviceRowLayout)); |
|
131 |
|
132 #endif /*DEVUI_CONST_H_*/ |