Adding per-keyset editable data
[pierogi] / keysets / grundig.cpp
1 #include "grundig.h"
2 #include "protocols/rc5protocol.h"
3 #include "protocols/necxprotocol.h"
4 #include "protocols/necprotocol.h"
5
6 // This one is iffy, might be another brand:
7 GrundigSat1::GrundigSat1(
8   unsigned int index)
9   : PIRKeysetMetaData(
10       "Satellite Keyset 1",
11       Grundig_Make,
12       index)
13 {
14 }
15
16
17 void GrundigSat1::populateProtocol(
18   QObject *guiObject)
19 {
20   if (threadableProtocol)
21   {
22     // If the pointer is not null, the keyset must already be populated.
23     return;
24   }
25
26   threadableProtocol = new RC5Protocol(guiObject, index);
27
28   addKey("Mute", Mute_Key, 0x0286, 13);
29   addKey("Guide", Guide_Key, 0x028F, 13);
30   addKey("Up", Up_Key, 0x0290, 13);
31   addKey("Down", Down_Key, 0x0291, 13);
32   addKey("Serv", Unmapped_Key, 0x0292, 13);
33   addKey("Exit", Exit_Key, 0x0293, 13);
34   addKey("Left", Left_Key, 0x0295, 13);
35   addKey("Right", Right_Key, 0x0296, 13);
36   addKey("OK", Select_Key, 0x0297, 13);
37   addKey("Prefer", Unmapped_Key, 0x02A1, 13);
38   addKey("Perso", Unmapped_Key, 0x02AA, 13);
39   addKey("A", Unmapped_Key, 0x02AB, 13);
40   addKey("B", Unmapped_Key, 0x02AC, 13);
41   addKey("C", Unmapped_Key, 0x02AD, 13);
42   addKey("D", Unmapped_Key, 0x02AE, 13);
43   addKey("E", Unmapped_Key, 0x02AF, 13);
44
45   addKey("1", One_Key, 0x1281, 13);
46   addKey("2", Two_Key, 0x1282, 13);
47   addKey("3", Three_Key, 0x1283, 13);
48   addKey("4", Four_Key, 0x1284, 13);
49   addKey("5", Five_Key, 0x1285, 13);
50   addKey("6", Six_Key, 0x1286, 13);
51   addKey("7", Seven_Key, 0x1287, 13);
52   addKey("8", Eight_Key, 0x1288, 13);
53   addKey("9", Nine_Key, 0x1289, 13);
54   addKey("0", Zero_Key, 0x1280, 13);
55   addKey("Standby", Power_Key, 0x128C, 13);
56   addKey("Info", Info_Key, 0x128F, 13);
57   addKey("TV/Sat", Input_Key, 0x12A8, 13);
58   addKey("Plus", Unmapped_Key, 0x12AF, 13);
59 }
60
61
62 GrundigSat2::GrundigSat2(
63   unsigned int index)
64   : PIRKeysetMetaData(
65       "Satellite Keyset 2",
66       Grundig_Make,
67       index)
68 {
69   addControlledDevice(Grundig_Make, "STR 7100", Sat_Device);
70 }
71
72
73 void GrundigSat2::populateProtocol(
74   QObject *guiObject)
75 {
76   if (threadableProtocol)
77   {
78     // If the pointer is not null, the keyset must already be populated.
79     return;
80   }
81
82   threadableProtocol = new RC5Protocol(guiObject, index);
83
84   addKey("POWER", Power_Key, 0x017B, 13);
85   addKey("Audio", Audio_Key, 0x00D3, 13);
86   addKey(">|", StepForward_Key, 0x008B, 13);
87   addKey("|<", StepBack_Key, 0x00BB, 13);
88   addKey("1", One_Key, 0x00EB, 13);
89   addKey("2", Two_Key, 0x016B, 13);
90   addKey("3", Three_Key, 0x006B, 13);
91   addKey("4", Four_Key, 0x01AB, 13);
92   addKey("5", Five_Key, 0x00AB, 13);
93   addKey("6", Six_Key, 0x012B, 13);
94   addKey("7", Seven_Key, 0x002B, 13);
95   addKey("8", Eight_Key, 0x01CB, 13);
96   addKey("9", Nine_Key, 0x00CB, 13);
97   addKey("0", Zero_Key, 0x01EB, 13);
98   addKey("i", Info_Key, 0x0093, 13);  // "OSD"
99   addKey("MUTE", Mute_Key, 0x00FB, 13);
100   addKey("P+", ChannelUp_Key, 0x0153, 13);
101   addKey("P-", ChannelDown_Key, 0x0053, 13);
102   addKey("-", VolumeDown_Key, 0x00DB, 13);
103   addKey("+", VolumeUp_Key, 0x01DB, 13);
104   addKey("OK", Select_Key, 0x01FB, 13);
105   addKey("AUX", AuxInput_Key, 0x003B, 13); // "DiscMenu"
106   addKey("TXT", Teletext_Key, 0x01E3, 13);
107   addKey("RED", Red_Key, 0x0143, 13);
108   addKey("GREEN", Green_Key, 0x0103, 13);
109   addKey("YELLOW", Yellow_Key, 0x0043, 13);
110   addKey("BLUE", Blue_Key, 0x0113, 13);
111   addKey("COL-", ColorDown_Key, 0x009B, 13);
112   addKey("COL+", ColorUp_Key, 0x019B, 13);
113   addKey("BRIGHT-", BrightnessDown_Key, 0x005B, 13);
114   addKey("BRIGHT+", BrightnessUp_Key, 0x015B, 13);
115   addKey("TV-G", Unmapped_Key, 0x01BB, 13);
116 }
117
118
119 GrundigSat3::GrundigSat3(
120   unsigned int index)
121   : PIRKeysetMetaData(
122       "Satellite Keyset 3",
123       Grundig_Make,
124       index)
125 {
126 }
127
128
129 void GrundigSat3::populateProtocol(
130   QObject *guiObject)
131 {
132   if (threadableProtocol)
133   {
134     // Keyset already populated.
135     return;
136   }
137
138   threadableProtocol = new NECProtocol(guiObject, index, false, true);
139
140   setPreData(0x80, 8);
141
142   addKey("menu", Menu_Key, 0x12, 8);
143   addKey("Ch-", ChannelDown_Key, 0x16, 8);
144   addKey("3", Three_Key, 0x40, 8);
145   addKey("2", Two_Key, 0x41, 8);
146   addKey("1", One_Key, 0x42, 8);
147   addKey("6", Six_Key, 0x44, 8);
148   addKey("5", Five_Key, 0x45, 8);
149   addKey("4", Four_Key, 0x46, 8);
150   addKey("0", Zero_Key, 0x47, 8);
151   addKey("9", Nine_Key, 0x48, 8);
152   addKey("8", Eight_Key, 0x49, 8);
153   addKey("7", Seven_Key, 0x4A, 8);
154   addKey("mute", Mute_Key, 0x4C, 8);
155   addKey("up", Up_Key, 0x4E, 8);
156   addKey("sub", Captions_Key, 0x73, 8);
157   addKey("OK", Select_Key, 0x75, 8);
158   addKey("Yellow", Yellow_Key, 0x78, 8);
159   addKey("text", Teletext_Key, 0x7B, 8);
160   addKey("Vol-", VolumeDown_Key, 0x7D, 8);
161   addKey("exit", Exit_Key, 0x7E, 8);
162   addKey("AD", Unmapped_Key, 0x7F, 8);
163   addKey("power", Power_Key, 0xB2, 8);
164   addKey("TV/DTV", TunerInput_Key, 0xB7, 8);
165   addKey("Guide", Guide_Key, 0xB8, 8);
166   addKey("Info", Info_Key, 0xB9, 8);
167   addKey("Green", Green_Key, 0xBA, 8);
168   addKey("Red", Red_Key, 0xBB, 8);
169   addKey("down", Down_Key, 0xBE, 8);
170   addKey("right", Right_Key, 0xC4, 8);
171   addKey("left", Left_Key, 0xC8, 8);
172   addKey("Blue", Blue_Key, 0xCC, 8);
173   addKey("wide", AspectRatio_Key, 0xCF, 8);
174   addKey("back", PrevChannel_Key, 0xD2, 8);
175   addKey("Vol+", VolumeUp_Key, 0xD4, 8);
176   addKey("Ch List", Unmapped_Key, 0xD5, 8);
177   addKey("Ch+", ChannelUp_Key, 0xD6, 8);
178   addKey("Swap", Unmapped_Key, 0xD8, 8);
179 }
180
181
182 GrundigAmp1::GrundigAmp1(
183   unsigned int index)
184   : PIRKeysetMetaData(
185       "Amp Keyset 1",
186       Grundig_Make,
187       index)
188 {
189   addControlledDevice(Grundig_Make, "FineArts Amplifier V1", Audio_Device);
190 }
191
192
193 void GrundigAmp1::populateProtocol(
194   QObject *guiObject)
195 {
196   if (threadableProtocol)
197   {
198     // If the pointer is not null, the keyset must already be populated.
199     return;
200   }
201
202   threadableProtocol = new RC5Protocol(guiObject, index);
203
204   addKey("number_10", Zero_Key, 0x1C00, 13);
205   addKey("number_1", One_Key, 0x1C01, 13);
206   addKey("number_2", Two_Key, 0x1C02, 13);
207   addKey("number_3", Three_Key, 0x1C03, 13);
208   addKey("number_4", Four_Key, 0x1C04, 13);
209   addKey("number_5", Five_Key, 0x1C05, 13);
210   addKey("number_6", Six_Key, 0x1C06, 13);
211   addKey("number_7", Seven_Key, 0x1C07, 13);
212   addKey("number_8", Eight_Key, 0x1C08, 13);
213   addKey("number_9", Nine_Key, 0x1C09, 13);
214   addKey("mute", Mute_Key, 0x1C0D, 13);
215   addKey("volume_+", VolumeUp_Key, 0x1C10, 13);
216   addKey("volume_-", VolumeDown_Key, 0x1C11, 13);
217   addKey("standby", Power_Key, 0x1C3D, 13);
218
219   addKey("tuner_up", ChannelUp_Key, 0x1C60, 13);
220   addKey("tuner_down", ChannelDown_Key, 0x1C61, 13);
221   addKey("tuner", TunerInput_Key, 0x1C7F, 13);
222
223   addKey("tape_play_back", Unmapped_Key, 0x1CAF, 13);
224   addKey("tape_pause", Unmapped_Key, 0x1CB0, 13);
225   addKey("tape_fastrewind", Unmapped_Key, 0x1CB2, 13);
226   addKey("tape_fastforward", Unmapped_Key, 0x1CB4, 13);
227   addKey("tape_play_forward", Unmapped_Key, 0x1CB5, 13);
228   addKey("tape_stop", Unmapped_Key, 0x1CB6, 13);
229   addKey("tape_record", Unmapped_Key, 0x1CB7, 13);
230   addKey("tape", TapeInput_Key, 0x1CBF, 13);
231
232   addKey("cd_fastforward", FastForward_Key, 0x1D20, 13);
233   addKey("cd_fastrewind", Rewind_Key, 0x1D21, 13);
234   addKey("cd_pause", Pause_Key, 0x1D30, 13);
235   addKey("cd_play", Play_Key, 0x1D35, 13);
236   addKey("cd_stop", Stop_Key, 0x1D36, 13);
237   addKey("cd", CDInput_Key, 0x1D3F, 13);
238
239   addKey("phono", PhonoInput_Key, 0x1D7F, 13);
240   addKey("dsr_up", Unmapped_Key, 0x1DA0, 13);
241   addKey("dsr_down", Unmapped_Key, 0x1DA1, 13);
242   addKey("dsr_aux", AuxInput_Key, 0x1DBF, 13);
243
244   addKey("dcc_play_back", Unmapped_Key, 0x1DEF, 13);
245   addKey("dcc_pause", Unmapped_Key, 0x1DF0, 13);
246   addKey("dcc_fastrewind", Unmapped_Key, 0x1DF2, 13);
247   addKey("dcc_fastforward", Unmapped_Key, 0x1DF4, 13);
248   addKey("dcc_play_forward", Unmapped_Key, 0x1DF5, 13);
249   addKey("dcc_stop", Unmapped_Key, 0x1DF6, 13);
250   addKey("dcc_record", Unmapped_Key, 0x1DF7, 13);
251   addKey("dcc", Unmapped_Key, 0x1DFF, 13);
252 }
253
254
255 GrundigAudio1::GrundigAudio1(
256   unsigned int index)
257   : PIRKeysetMetaData(
258       "Audio(CD) Keyset 1",
259       Grundig_Make,
260       index)
261 {
262   addControlledDevice(Grundig_Make, "CD 8400", Audio_Device);
263 }
264
265
266 void GrundigAudio1::populateProtocol(
267   QObject *guiObject)
268 {
269   if (threadableProtocol)
270   {
271     // If the pointer is not null, the keyset must already be populated.
272     return;
273   }
274
275   threadableProtocol = new RC5Protocol(guiObject, index);
276
277   addKey("0", Zero_Key, 0x1D00, 13);
278   addKey("1", One_Key, 0x1D01, 13);
279   addKey("2", Two_Key, 0x1D02, 13);
280   addKey("3", Three_Key, 0x1D03, 13);
281   addKey("4", Four_Key, 0x1D04, 13);
282   addKey("5", Five_Key, 0x1D05, 13);
283   addKey("6", Six_Key, 0x1D06, 13);
284   addKey("7", Seven_Key, 0x1D07, 13);
285   addKey("8", Eight_Key, 0x1D08, 13);
286   addKey("9", Nine_Key, 0x1D09, 13);
287   addKey("10+", DoubleDigit_Key, 0x1D0A, 13); // hack
288   addKey("20+", PlusOneHundred_Key, 0x1D0B, 13); // also hack
289
290   addKey("repeat", Repeat_Key, 0x1D1D, 13);
291
292   addKey("track+", Next_Key, 0x1D20, 13);
293   addKey("track-", Previous_Key, 0x1D21, 13);
294   addKey("index+", Unmapped_Key, 0x1D22, 13);
295   addKey("index-", Unmapped_Key, 0x1D23, 13);
296   addKey("store", Memory_Key, 0x1D29, 13);
297   addKey("scan", Scan_Key, 0x1D2B, 13);
298
299   addKey("pause", Pause_Key, 0x1D30, 13);
300   addKey("skip-", Replay_Key, 0x1D32, 13);
301   addKey("skip+", Advance_Key, 0x1D34, 13);
302   addKey("play", Play_Key, 0x1D35, 13);
303   addKey("stop", Stop_Key, 0x1D36, 13);
304 }
305
306
307 GrundigAudio2::GrundigAudio2(
308   unsigned int index)
309   : PIRKeysetMetaData(
310       "Audio Keyset 2",
311       Grundig_Make,
312       index)
313 {
314   addControlledDevice(Grundig_Make, "CDM 700", Audio_Device);
315   addControlledDevice(Grundig_Make, "UMS-9V", Audio_Device);
316 }
317
318
319 void GrundigAudio2::populateProtocol(
320   QObject *guiObject)
321 {
322   if (threadableProtocol)
323   {
324     // If the pointer is not null, the keyset must already be populated.
325     return;
326   }
327
328   threadableProtocol = new NECXProtocol(guiObject, index, true);
329
330   setPreData(0xA2A2, 16);
331
332   addKey("1", One_Key, 0x01, 8);
333   addKey("5", Five_Key, 0x02, 8);
334   addKey("9", Nine_Key, 0x03, 8);
335   addKey("tuning_down", ChannelDown_Key, 0x04, 8);
336   addKey("display", Info_Key, 0x05, 8); // "MODE_remain
337   addKey("on/off", Power_Key, 0x06, 8);
338   addKey("tuner", TunerInput_Key, 0x07, 8);
339   addKey("2", Two_Key, 0x09, 8);
340   addKey("6", Six_Key, 0x0A, 8);
341   addKey("0", Zero_Key, 0x0B, 8);
342   addKey("tuning_up", ChannelUp_Key, 0x0C, 8);
343   addKey("random", Random_Key, 0x0D, 8);
344   addKey("band", FM_Key, 0x0E, 8);  // This is a hack
345   addKey("band", AM_Key, 0x0E, 8);  // This too
346   addKey("cd", CDInput_Key, 0x0F, 8);
347
348   addKey("3", Three_Key, 0x11, 8);
349   addKey("7", Seven_Key, 0x12, 8);
350   addKey("play/pause", Play_Key, 0x13, 8);
351   addKey("play/pause", Pause_Key, 0x13, 8);
352   addKey("time_program", Program_Key, 0x14, 8); // "MEMORY_clock"
353   addKey("intro", Unmapped_Key, 0x15, 8);
354   addKey("SLEEP", Sleep_Key, 0x17, 8);
355   addKey("4", Four_Key, 0x19, 8);
356   addKey("8", Eight_Key, 0x1A, 8);
357   addKey("stop", Stop_Key, 0x1B, 8);
358   addKey("repeat/scan", Repeat_Key, 0x1C, 8);
359   addKey("repeat/scan", Scan_Key, 0x1C, 8);
360   addKey("BASS", EnhancedBass_Key, 0x1D, 8);
361   addKey("tape", TapeInput_Key, 0x1E, 8);
362   addKey("TIMER", Timer_Key, 0x1F, 8);
363
364   addKey("volume_up", VolumeUp_Key, 0x20, 8);
365   addKey("volume_down", VolumeDown_Key, 0x60, 8);
366   addKey("mute", Mute_Key, 0xA0, 8);
367   addKey("+10", DoubleDigit_Key, 0xE0, 8);
368 }
369
370
371 GrundigVCR1::GrundigVCR1(
372   unsigned int index)
373   : PIRKeysetMetaData(
374       "VCR Keyset 1",
375       Grundig_Make,
376       index)
377 {
378   addControlledDevice(Grundig_Make, "GV 437", VCR_Device);
379 }
380
381
382 void GrundigVCR1::populateProtocol(
383   QObject *guiObject)
384 {
385   if (threadableProtocol)
386   {
387     // If the pointer is not null, the keyset must already be populated.
388     return;
389   }
390
391   threadableProtocol = new RC5Protocol(guiObject, index);
392
393   addKey("SYSTEM", Menu_Key, 0x014A, 13);
394   addKey("OK", Select_Key, 0x0157, 13);
395   addKey("next", Next_Key, 0x0170, 13);
396   addKey("previous", Previous_Key, 0x0171, 13);
397   addKey("MONITOR", Unmapped_Key, 0x017A, 13);
398   addKey("tuner", TunerInput_Key, 0x017D, 13);
399   addKey("cass", Eject_Key, 0x017E, 13); // might be wrong
400
401   addKey("0", Zero_Key, 0x1140, 13);
402   addKey("1", One_Key, 0x1141, 13);
403   addKey("2", Two_Key, 0x1142, 13);
404   addKey("3", Three_Key, 0x1143, 13);
405   addKey("4", Four_Key, 0x1144, 13);
406   addKey("5", Five_Key, 0x1145, 13);
407   addKey("6", Six_Key, 0x1146, 13);
408   addKey("7", Seven_Key, 0x1147, 13);
409   addKey("8", Eight_Key, 0x1148, 13);
410   addKey("9", Nine_Key, 0x1149, 13);
411   addKey("SELECT", Enter_Key, 0x114B, 13); // "selvps"
412   addKey("standby", Power_Key, 0x114C, 13); // "OFF"
413   addKey("tracking", AutoTracking_Key, 0x114E, 13);
414
415   addKey("TIMER", Timer_Key, 0x115D, 13);
416
417   // Just guessing at what + and - mean here:
418   addKey("+", ChannelUp_Key, 0x1160, 13);
419   addKey("-", ChannelDown_Key, 0x1161, 13);
420   addKey("REW", Rewind_Key, 0x1165, 13);
421   addKey("FF", FastForward_Key, 0x1166, 13);
422
423   addKey("CLEAR", Clear_Key, 0x1171, 13);
424   addKey("PLAY", Play_Key, 0x1175, 13);
425   addKey("pausestop", Pause_Key, 0x1176, 13); // "STOP"
426   addKey("pausestop", Stop_Key, 0x1176, 13); // "STOP"
427   addKey("RECORD", Record_Key, 0x1177, 13);
428   addKey("SP/LP", VHSSpeed_Key, 0x117A, 13);
429 }
430
431
432 GrundigVCR1a::GrundigVCR1a(
433   unsigned int index)
434   : GrundigVCR1(index)
435 {
436   setKeysetName("VCR Keyset 1a");
437 }
438
439
440 void GrundigVCR1a::populateProtocol(
441   QObject *guiObject)
442 {
443   if (threadableProtocol)
444   {
445     // If the pointer is not null, the keyset must already be populated.
446     return;
447   }
448
449   GrundigVCR1::populateProtocol(guiObject);
450
451   addKey("INDEX", IndexSearch_Key, 0x0170, 13);
452   addKey("PAUSE", Pause_Key, 0x1169, 13);
453 }
454
455
456 GrundigTV1::GrundigTV1(
457   unsigned int index)
458   : PIRKeysetMetaData(
459       "TV Keyset 1",
460       Grundig_Make,
461       index)
462 {
463   addControlledDevice(Grundig_Make, "ST 55-908", TV_Device);
464 }
465
466
467 void GrundigTV1::populateProtocol(
468   QObject *guiObject)
469 {
470   if (threadableProtocol)
471   {
472     // If the pointer is not null, the keyset must already be populated.
473     return;
474   }
475
476   threadableProtocol = new RC5Protocol(guiObject, index);
477
478   addKey("leer", Unmapped_Key, 0x0000, 13);
479   addKey("POWER", Power_Key, 0x017F, 13);
480   addKey("1", One_Key, 0x00EF, 13);
481   addKey("2", Two_Key, 0x016F, 13);
482   addKey("3", Three_Key, 0x006F, 13);
483   addKey("4", Four_Key, 0x01AF, 13);
484   addKey("5", Five_Key, 0x00AF, 13);
485   addKey("6", Six_Key, 0x012F, 13);
486   addKey("7", Seven_Key, 0x002F, 13);
487   addKey("8", Eight_Key, 0x1CF, 13);
488   addKey("9", Nine_Key, 0x00CF, 13);
489   addKey("0", Zero_Key, 0x01EF, 13);
490   addKey("AUX2", Unmapped_Key, 0x014F, 13);
491   addKey("BR+", BrightnessUp_Key, 0x015F, 13);
492   addKey("BR-", BrightnessDown_Key, 0x005F, 13);
493   addKey("COLOR+", ColorUp_Key, 0x019F, 13);
494   addKey("COLOR-", ColorDown_Key, 0x009F, 13);
495   addKey("AUX", AuxInput_Key, 0x003F, 13);
496   addKey("I", Info_Key, 0x0097, 13); // "Info"
497   addKey("TXT", Teletext_Key, 0x01E7, 13);
498   addKey("P+", ChannelUp_Key, 0x0157, 13);
499   addKey("P+", Up_Key, 0x0157, 13);
500   addKey("VOL-", VolumeDown_Key, 0x00DF, 13);
501   addKey("VOL-", Left_Key, 0x00DF, 13);
502   addKey("OK", Select_Key, 0x01FF, 13);
503   addKey("VOL+", VolumeUp_Key, 0x01DF, 13);
504   addKey("VOL+", Right_Key, 0x01DF, 13);
505   addKey("P-", ChannelDown_Key, 0x0057, 13);
506   addKey("P-", Down_Key, 0x0057, 13);
507   addKey("MUTE", Mute_Key, 0x00FF, 13);
508   addKey("BLUE", Blue_Key, 0x0117, 13);
509   addKey("YELLOW", Yellow_Key, 0x0047, 13);
510   addKey("GREEN", Green_Key, 0x0107, 13);
511   addKey("RED", Red_Key, 0x0147, 13);
512 }
513
514
515 GrundigTV2::GrundigTV2(
516   unsigned int index)
517   : PIRKeysetMetaData(
518       "TV Keyset 2",
519       Grundig_Make,
520       index)
521 {
522 }
523
524
525 void GrundigTV2::populateProtocol(
526   QObject *guiObject)
527 {
528   if (threadableProtocol)
529   {
530     // If the pointer is not null, the keyset must already be populated.
531     return;
532   }
533
534   threadableProtocol = new RC5Protocol(guiObject, index);
535
536   addKey("P+", ChannelUp_Key, 0x0010, 13);
537   addKey("P+", Up_Key, 0x0010, 13);
538   addKey("P-", ChannelDown_Key, 0x0011, 13);
539   addKey("P-", Down_Key, 0x0011, 13);
540   addKey("info", Info_Key, 0x0012, 13);
541   addKey("<-", VolumeDown_Key, 0x0015, 13);
542   addKey("<-", Left_Key, 0x0015, 13);
543   addKey("+>", VolumeUp_Key, 0x0016, 13);
544   addKey("+>", Right_Key, 0x0016, 13);
545   addKey("OK", Select_Key, 0x0017, 13);
546
547   addKey("NEXT", Next_Key, 0x0170, 13);
548   addKey("PREV", Previous_Key, 0x0171, 13);
549
550   addKey("0AV", Zero_Key, 0x1000, 13); // also AV?
551   addKey("1", One_Key, 0x1001, 13);
552   addKey("2", Two_Key, 0x1002, 13);
553   addKey("3", Three_Key, 0x1003, 13);
554   addKey("4", Four_Key, 0x1004, 13);
555   addKey("5", Five_Key, 0x1005, 13);
556   addKey("6", Six_Key, 0x1006, 13);
557   addKey("7", Seven_Key, 0x1007, 13);
558   addKey("8", Eight_Key, 0x1008, 13);
559   addKey("9", Nine_Key, 0x1009, 13);
560   addKey("power", Power_Key, 0x100C, 13);
561   addKey("mute", Mute_Key, 0x100D, 13);
562
563   addKey("br+", BrightnessUp_Key, 0x1012, 13);
564   addKey("br-", BrightnessDown_Key, 0x1013, 13);
565   addKey("col+", ColorUp_Key, 0x1014, 13);
566   addKey("col-", ColorDown_Key, 0x1015, 13);
567
568   addKey("PC/CL", Unmapped_Key, 0x1031, 13);
569
570   addKey("TXT", Teletext_Key, 0x115D, 13);
571   addKey("<<", Rewind_Key, 0x1165, 13);
572   addKey(">>", FastForward_Key, 0x1166, 13);
573   addKey("||", Pause_Key, 0x1169, 13);
574   addKey(">", Play_Key, 0x1175, 13);
575   addKey("stop", Stop_Key, 0x1176, 13);
576   addKey("REC", Record_Key, 0x1177, 13);
577 }
578
579
580 GrundigTV3::GrundigTV3(
581   unsigned int index)
582   : PIRKeysetMetaData(
583       "TV/VDR Keyset 3",
584       Grundig_Make,
585       index)
586 {
587 }
588
589
590 void GrundigTV3::populateProtocol(
591   QObject *guiObject)
592 {
593   if (threadableProtocol)
594   {
595     // If the pointer is not null, the keyset must already be populated.
596     return;
597   }
598
599   threadableProtocol = new RC5Protocol(guiObject, index);
600
601   addKey("USR4", Unmapped_Key, 0x0205, 13);
602   addKey("INFO", Info_Key, 0x0206, 13);
603   addKey("BACK", Exit_Key, 0x020F, 13);
604   addKey("UP", Up_Key, 0x0210, 13);
605   addKey("DOWN", Down_Key, 0x0211, 13);
606   addKey("LEFT", Left_Key, 0x0215, 13);
607   addKey("RIGHT", Right_Key, 0x0216, 13);
608   addKey("OK", Select_Key, 0x0217, 13);
609
610   addKey("RED", Red_Key, 0x022B, 13);
611   addKey("GREEN", Green_Key, 0x022C, 13);
612   addKey("YEL", Yellow_Key, 0x022D, 13);
613   addKey("BLU", Blue_Key, 0x022E, 13);
614   addKey("USR2", Unmapped_Key, 0x0235, 13);
615   addKey("USR1", Unmapped_Key, 0x023E, 13);
616
617   addKey("0", Zero_Key, 0x1200, 13);
618   addKey("1", One_Key, 0x1201, 13);
619   addKey("2", Two_Key, 0x1202, 13);
620   addKey("3", Three_Key, 0x1203, 13);
621   addKey("4", Four_Key, 0x1204, 13);
622   addKey("5", Five_Key, 0x1205, 13);
623   addKey("6", Six_Key, 0x1206, 13);
624   addKey("7", Seven_Key, 0x1207, 13);
625   addKey("8", Eight_Key, 0x1208, 13);
626   addKey("9", Nine_Key, 0x1209, 13);
627
628   addKey("MUTE", Mute_Key, 0x120D, 13);
629   addKey("REC", Record_Key, 0x120E, 13);
630   addKey("VOL+", VolumeUp_Key, 0x1210, 13);
631   addKey("VOL-", VolumeDown_Key, 0x1211, 13);
632   addKey("NEXT", Next_Key, 0x121E, 13);
633   addKey("PREV", Previous_Key, 0x121F, 13);
634   addKey("CHANNEL+", ChannelUp_Key, 0x1220, 13);
635   addKey("CHANNEL-", ChannelDown_Key, 0x1221, 13);
636   addKey("CEC", Unmapped_Key, 0x1222, 13);
637   addKey("USR3", Unmapped_Key, 0x1223, 13);
638   addKey("REW", Rewind_Key, 0x122C, 13);
639   addKey("FF", FastForward_Key, 0x122E, 13);
640
641   addKey("PAUSE", Pause_Key, 0x1230, 13);
642   addKey("PLAY", Play_Key, 0x1235, 13);
643   addKey("STOP", Stop_Key, 0x1236, 13);
644   addKey("MENU", Menu_Key, 0x123C, 13);
645 }
646
647
648 GrundigDVD1::GrundigDVD1(
649   unsigned int index)
650   : PIRKeysetMetaData(
651       "DVD Keyset 1",
652       Grundig_Make,
653       index)
654 {
655   addControlledDevice(Grundig_Make, "GDV 130", DVD_Device);
656 }
657
658
659 void GrundigDVD1::populateProtocol(
660   QObject *guiObject)
661 {
662   if (threadableProtocol)
663   {
664     // If the pointer is not null, the keyset must already be populated.
665     return;
666   }
667
668   threadableProtocol = new NECProtocol(guiObject, index, false, true);
669
670   setPreData(0x10, 8);
671
672   addKey("POWER", Power_Key, 0x00, 8);
673   addKey("FF_SF", FastForward_Key, 0x01, 8);
674   addKey("OPEN_CLOSE", Eject_Key, 0x02, 8);
675   addKey("ARROW_LEFT", Left_Key, 0x03, 8);
676   addKey("STEP", StepForward_Key, 0x04, 8);
677   addKey("PREV", Previous_Key, 0x05, 8);
678   addKey("DISPLAY", Info_Key, 0x06, 8);
679   addKey("NEXT", Next_Key, 0x07, 8);
680   addKey("1", One_Key, 0x08, 8);
681   addKey("2", Two_Key, 0x09, 8);
682   addKey("3", Three_Key, 0x0A, 8);
683   addKey("ARROW_UP", Up_Key, 0x0B, 8);
684   addKey("FR_SR", Rewind_Key, 0x0C, 8);
685   addKey("SETUP", Menu_Key, 0x0D, 8);
686   addKey("TITLE", DiscTitle_Key, 0x0E, 8);
687   addKey("MENU", DiscMenu_Key, 0x0F, 8);
688
689   addKey("4", Four_Key, 0x10, 8);
690   addKey("5", Five_Key, 0x11, 8);
691   addKey("6", Six_Key, 0x12, 8);
692   addKey("SELECT", Select_Key, 0x13, 8);
693   addKey("DIGEST", Unmapped_Key, 0x14, 8);
694   addKey("ANGLE", Angle_Key, 0x15, 8);
695   addKey("SUBTITLE", Captions_Key, 0x16, 8);
696   addKey("AUDIO", Audio_Key, 0x17, 8);
697   addKey("7", Seven_Key, 0x18, 8);
698   addKey("8", Eight_Key, 0x19, 8);
699   addKey("9", Nine_Key, 0x1A, 8);
700   addKey("ARROW_RIGHT", Right_Key, 0x1B, 8);
701   addKey("PROGRAM", Program_Key, 0x1C, 8);
702   addKey("VOLUME_UP", VolumeUp_Key, 0x1D, 8);
703   addKey("ZOOM", Zoom_Key, 0x1E, 8);
704   addKey("3D_SOUND", Surround_Key, 0x1F, 8);
705
706   addKey("CLEAR", Clear_Key, 0x40, 8);
707   addKey("0", Zero_Key, 0x41, 8);
708   addKey("PCB", Unmapped_Key, 0x42, 8);
709   addKey("ARROW_DOWN", Down_Key, 0x43, 8);
710   addKey("SHUFFLE", Random_Key, 0x44, 8);
711   addKey("VOLUME_DOWN", VolumeDown_Key, 0x45, 8);
712   addKey("REPEAT", Repeat_Key, 0x46, 8);
713   addKey("A-B", RepeatAB_Key, 0x47, 8);
714   addKey("STOP/RETURN", Stop_Key, 0x48, 8);
715   addKey("STOP/RETURN", Exit_Key, 0x48, 8);
716   addKey("PLAY/PAUSE", Play_Key, 0x49, 8);
717   addKey("PLAY/PAUSE", Pause_Key, 0x49, 8);
718   addKey("MARKER", Unmapped_Key, 0x4A, 8);
719 }