#include "protocols/lircprotocol.h"
PioneerTV1::PioneerTV1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"TV Keyset 1",
Pioneer_Make,
index)
{
+}
+
+
+void PioneerTV1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new PioneerProtocol(guiObject, index);
addNECKey("0", Zero_Key, 0xAA, 0x00);
PioneerTV2::PioneerTV2(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"TV (STB) Keyset 2",
Pioneer_Make,
index)
{
+}
+
+
+void PioneerTV2::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new PioneerProtocol(guiObject, index);
// I'm not sure this keyset even needs the "0xAA" keys at all...
PioneerTV3::PioneerTV3(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"TV (STB) Keyset 3",
Pioneer_Make,
index)
{
+}
+
+
+void PioneerTV3::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new PioneerProtocol(guiObject, index);
addNECKey("KEY_VOLUMEUP", VolumeUp_Key, 0xAA, 0x0A);
PioneerAudio1::PioneerAudio1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Audio Keyset 1",
addControlledDevice(Pioneer_Make, "Hi-Fi DU-L7", Audio_Device);
addControlledDevice(Pioneer_Make, "CU-XR015", Audio_Device);
addControlledDevice(Pioneer_Make, "A880", Audio_Device);
+}
+
+
+void PioneerAudio1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
threadableProtocol = new PioneerProtocol(guiObject, index);
addNECKey("12/CLR", Clear_Key, 0xA6, 0x41);
addNECKey("cd", CDInput_Key, 0xA6, 0x44); // "CD_PLAY"
addNECKey("scan", Scan_Key, 0xA6, 0x48);
- addNECKey("FM/AM", TunerBand_Key, 0xA6, 0x49); // "BAND"
+ addNECKey("FM/AM", TunerInput_Key, 0xA6, 0x49); // "BAND"
addNECKey("aux", AuxInput_Key, 0xA6, 0x4C);
addNECKey("TAPE1_PLAY", Unmapped_Key, 0xA6, 0x5A);
addNECKey("KARAOKE", Unmapped_Key, 0xA6, 0x69);
PioneerAudio1a::PioneerAudio1a(
- QObject *guiObject,
unsigned int index)
- : PioneerAudio1(guiObject, index)
+ : PioneerAudio1(index)
{
setKeysetName("Audio Keyset 1a");
+}
+
+
+void PioneerAudio1a::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ PioneerAudio1::populateProtocol(guiObject);
addNECKey("cd", CDInput_Key, 0xA6, 0x0E);
addNECKey("tape", TapeInput_Key, 0xA6, 0x0F);
PioneerAudio2::PioneerAudio2(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Audio Keyset 2",
Pioneer_Make,
index)
{
+}
+
+
+void PioneerAudio2::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new PioneerProtocol(guiObject, index);
addNECKey("VOL+", VolumeUp_Key, 0xA5, 0x0A);
PioneerAudio3::PioneerAudio3(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Audio Keyset 3",
addControlledDevice(Pioneer_Make, "A-207R", Audio_Device);
addControlledDevice(Pioneer_Make, "SX-302", Audio_Device);
addControlledDevice(Pioneer_Make, "VSX-9300", Audio_Device);
+}
+
+
+void PioneerAudio3::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
threadableProtocol = new PioneerProtocol(guiObject, index);
addNECKey("am", Unmapped_Key, 0xA4, 0x0E);
addNECKey("tuner_station+", NextPreset_Key, 0xA4, 0x10);
addNECKey("tuner_station-", PrevPreset_Key, 0xA4, 0x11);
- addNECKey("tuner_band", TunerBand_Key, 0xA4, 0x13);
+ addNECKey("tuner_band", AM_Key, 0xA4, 0x13); // This is a hack
+ addNECKey("tuner_band", FM_Key, 0xA4, 0x13); // This too
addNECKey("tuner_power", Unmapped_Key, 0xA4, 0x1C);
addNECKey("mpx", Unmapped_Key, 0xA4, 0x1E); // Toggle mono FM
addNECKey("tunerclass", Unmapped_Key, 0xA4, 0x40); // class A, B, C
PioneerAudio4::PioneerAudio4(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Audio Keyset 4",
Pioneer_Make,
index)
{
+}
+
+
+void PioneerAudio4::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new PioneerProtocol(guiObject, index);
addNECKey("tapesel", Unmapped_Key, 0xA1, 0x4C);
PioneerAudio5::PioneerAudio5(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Audio Keyset 5",
index)
{
addControlledDevice(Pioneer_Make, "XR-P240C", Audio_Device);
+}
+
+
+void PioneerAudio5::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
LIRCProtocol *lp = new LIRCProtocol(
guiObject,
addKey("POWER", Power_Key, 0x9867, 16);
addKey("MONO", FMMode_Key, 0x48B7, 16);
addKey("MEM_SCAN", Unmapped_Key, 0x8877, 16);
- addKey("TUNER_BAND", TunerBand_Key, 0x18E7, 16);
+ addKey("TUNER_BAND", AM_Key, 0x18E7, 16); // This is a hack
+ addKey("TUNER_BAND", FM_Key, 0x18E7, 16); // This too
addKey("1", One_Key, 0x00FF, 16);
addKey("2", Two_Key, 0x807F, 16);
addKey("3", Three_Key, 0x40BF, 16);
PioneerCD1::PioneerCD1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"CD Keyset 1",
addControlledDevice(Pioneer_Make, "PD-M107", Audio_Device);
addControlledDevice(Pioneer_Make, "PD-S503", Audio_Device);
addControlledDevice(Pioneer_Make, "PD-F1007", Audio_Device);
+}
+
+
+void PioneerCD1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
threadableProtocol = new PioneerProtocol(guiObject, index);
PioneerLaserDisc1::PioneerLaserDisc1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"LD Keyset 1",
index)
{
addControlledDevice(Pioneer_Make, "CLD-D925", Other_Device);
+}
+
+
+void PioneerLaserDisc1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
threadableProtocol = new PioneerProtocol(guiObject, index);
PioneerDVD1::PioneerDVD1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"DVD Keyset 1",
{
addControlledDevice(Pioneer_Make, "VXX2702", DVD_Device);
addControlledDevice(Pioneer_Make, "VXX2801", DVD_Device);
+}
+
+
+void PioneerDVD1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
threadableProtocol = new PioneerProtocol(guiObject, index);
addPioneerKey("DOWN", Down_Key, 0xA3, 0x99, 0xAF, 0xF3);
addPioneerKey("RETURN", Exit_Key, 0xA3, 0x99, 0xAF, 0xF4);
}
+
+
+PioneerCarStereo1::PioneerCarStereo1(
+ unsigned int index)
+ : PIRKeysetMetaData(
+ "Car Stereo Keyset 1",
+ Pioneer_Make,
+ index)
+{
+}
+
+
+void PioneerCarStereo1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // Keyset already populated.
+ return;
+ }
+
+ threadableProtocol = new PioneerProtocol(guiObject, index);
+
+ addNECKey("VOL+", VolumeUp_Key, 0xAD, 0x0A);
+ addNECKey("VOL-", VolumeDown_Key, 0xAD, 0x0B);
+ addNECKey("ATT", Mute_Key, 0xAD, 0x0C);
+ addNECKey("Audio", SoundMode_Key, 0xAD, 0x0D);
+ addNECKey("Band/Escape", FM_Key, 0xAD, 0x12);
+ addNECKey("Band/Escape", Exit_Key, 0xAD, 0x12);
+ addNECKey("Source", Input_Key, 0xAD, 0x1A);
+ addNECKey("Radio", TunerInput_Key, 0xAD, 0x1C);
+ addNECKey("CD/iPod", CDInput_Key, 0xAD, 0x1E);
+ addNECKey("Arrow Up", Up_Key, 0xAD, 0x40);
+ addNECKey("Arrow Down", Down_Key, 0xAD, 0x41);
+ addNECKey("Arrow Left", Left_Key, 0xAD, 0x42);
+ addNECKey("Arrow Right", Right_Key, 0xAD, 0x43);
+ addNECKey("Pause", Pause_Key, 0xAD, 0x58);
+
+ addPioneerKey("Entertainment", Unmapped_Key, 0xAD, 0x19, 0xAF, 0x2B);
+ addPioneerKey("List/Enter", Menu_Key, 0xAD, 0x19, 0xAF, 0x2C);
+ addPioneerKey("List/Enter", Select_Key, 0xAD, 0x19, 0xAF, 0x2C);
+ addPioneerKey("Function", Unmapped_Key, 0xAD, 0x19, 0xAF, 0x67);
+ addPioneerKey("PGM", Unmapped_Key, 0xAD, 0x19, 0xAF, 0x68);
+ addPioneerKey("Disp (Scroll)", Info_Key, 0xAD, 0x19, 0xAF, 0x6D);
+ addPioneerKey("Clear", Clear_Key, 0xAD, 0x19, 0xAF, 0xE0);
+ addPioneerKey("Direct", Unmapped_Key, 0xAD, 0x19, 0xAF, 0xE1);
+ addPioneerKey("0", Zero_Key, 0xAD, 0x19, 0xAF, 0xF0);
+ addPioneerKey("1", One_Key, 0xAD, 0x19, 0xAF, 0xF1);
+ addPioneerKey("2", Two_Key, 0xAD, 0x19, 0xAF, 0xF2);
+ addPioneerKey("3", Three_Key, 0xAD, 0x19, 0xAF, 0xF3);
+ addPioneerKey("4", Four_Key, 0xAD, 0x19, 0xAF, 0xF4);
+ addPioneerKey("5", Five_Key, 0xAD, 0x19, 0xAF, 0xF5);
+ addPioneerKey("6", Six_Key, 0xAD, 0x19, 0xAF, 0xF6);
+ addPioneerKey("7", Seven_Key, 0xAD, 0x19, 0xAF, 0xF7);
+ addPioneerKey("8", Eight_Key, 0xAD, 0x19, 0xAF, 0xF8);
+ addPioneerKey("9", Nine_Key, 0xAD, 0x19, 0xAF, 0xF9);
+}