#include "protocols/lircprotocol.h"
JVCSat1::JVCSat1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Sat (Dish) Keyset 1",
JVC_Make,
index)
{
+}
+
+
+void JVCSat1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
JVCSat2::JVCSat2(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Sat (Dish) Keyset 2",
JVC_Make,
index)
{
+}
+
+
+void JVCSat2::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
LIRCProtocol *lp = new LIRCProtocol(
guiObject,
index,
JVCVCR1::JVCVCR1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"VCR Keyset 1",
JVC_Make,
index)
{
+}
+
+
+void JVCVCR1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new JVCProtocol(guiObject, index);
// setPreData(0xC2, 8);
JVCVCR1a::JVCVCR1a(
- QObject *guiObject,
unsigned int index)
- : JVCVCR1(guiObject, index)
+ : JVCVCR1(index)
{
setKeysetName("VCR Keyset 1a");
+}
+
+
+void JVCVCR1a::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ JVCVCR1::populateProtocol(guiObject);
addKey("red", Red_Key, 0x07, 8);
addKey("green", Green_Key, 0x51, 8);
// Setup keysets for use in B-mode:
JVCVCRBmode1::JVCVCRBmode1(
- QObject *guiObject,
unsigned int index)
- : JVCVCR1(guiObject, index)
+ : JVCVCR1(index)
{
setKeysetName("VCR (B Mode) keyset 1");
+}
+
+
+void JVCVCRBmode1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ JVCVCR1::populateProtocol(guiObject);
setPreData(0x53, 8);
}
JVCVCRBmode1a::JVCVCRBmode1a(
- QObject *guiObject,
unsigned int index)
- : JVCVCR1a(guiObject, index)
+ : JVCVCR1a(index)
{
setKeysetName("VCR (B Mode) keyset 1a");
+}
+
+
+void JVCVCRBmode1a::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ JVCVCR1a::populateProtocol(guiObject);
setPreData(0x53, 8);
}
JVCTV1::JVCTV1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"TV Keyset 1",
JVC_Make,
index)
{
+}
+
+
+void JVCTV1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new JVCProtocol(guiObject, index);
setPreData(0x03, 8);
JVCTV1a::JVCTV1a(
- QObject *guiObject,
unsigned int index)
- : JVCTV1(guiObject, index)
+ : JVCTV1(index)
{
setKeysetName("TV Keyset 1a");
+}
+
+
+void JVCTV1a::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ JVCTV1::populateProtocol(guiObject);
addKey("+10", DoubleDigit_Key, 0x71, 8);
}
JVCTV1b::JVCTV1b(
- QObject *guiObject,
unsigned int index)
- : JVCTV1(guiObject, index)
+ : JVCTV1(index)
{
setKeysetName("TV Keyset 1b");
+}
+
+
+void JVCTV1b::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ JVCTV1::populateProtocol(guiObject);
addKey("sleep_timer", Sleep_Key, 0x03, 8);
}
JVCTV1c::JVCTV1c(
- QObject *guiObject,
unsigned int index)
- : JVCTV1(guiObject, index)
+ : JVCTV1(index)
{
setKeysetName("TV Keyset 1c");
+}
+
+
+void JVCTV1c::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ JVCTV1::populateProtocol(guiObject);
addKey("STOP", Stop_Key, 0x00, 8);
addKey("REC", Record_Key, 0x04, 8);
// TVs where "volume" and "channel" keys are used to navigate menus:
JVCTV1d::JVCTV1d(
- QObject *guiObject,
unsigned int index)
- : JVCTV1(guiObject, index)
+ : JVCTV1(index)
{
setKeysetName("TV Keyset 1d");
+}
+
+
+void JVCTV1d::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ JVCTV1::populateProtocol(guiObject);
addKey("down", Down_Key, 0x18, 8);
addKey("up", Up_Key, 0x19, 8);
JVCDAT1::JVCDAT1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"DAT Keyset 1",
JVC_Make,
index)
{
+}
+
+
+void JVCDAT1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new JVCProtocol(guiObject, index);
// setPreData(0xC9, 8);
JVCCarDeck1::JVCCarDeck1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Car Deck Keyset 1",
JVC_Make,
index)
{
+}
+
+
+void JVCCarDeck1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new JVCProtocol(guiObject, index);
// setPreData(0xF1, 8);
// together, they might as well all be a single command anyway...
JVCAudio1::JVCAudio1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Audio Keyset 1",
JVC_Make,
index)
{
+ addControlledDevice(JVC_Make, "RX-5062", Audio_Device);
+}
+
+
+void JVCAudio1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new JVCProtocol(guiObject, index);
addKey("SLEEP", Sleep_Key, 0x03A3, 16);
addKey("MD-AUX", AuxInput_Key, 0x3EA3, 16); // "TAPE-AUX"
addKey("TAPE", TapeInput_Key, 0x3FA3, 16);
addKey("FM-MODE", FMMode_Key, 0x5AA3, 16);
- addKey("TUNER-BAND", TunerBand_Key, 0x5BA3, 16);
+ addKey("TUNER-BAND", TunerInput_Key, 0x5BA3, 16);
addKey("AHB-PRO", Unmapped_Key, 0x75A3, 16);
addKey("AUTO-PRESET", Unmapped_Key, 0x77A3, 16);
JVCAudio1a::JVCAudio1a(
- QObject *guiObject,
unsigned int index)
- : JVCAudio1(guiObject, index)
+ : JVCAudio1(index)
{
setKeysetName("Audio Keyset 1a");
+}
+
+
+void JVCAudio1a::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ JVCAudio1::populateProtocol(guiObject);
addKey("CD-PLAY-PAUSE", Play_Key, 0x3DA3, 16);
addKey("MD-PLAY-PAUSE", Unmapped_Key, 0x30AF, 16);
JVCAudio1b::JVCAudio1b(
- QObject *guiObject,
unsigned int index)
- : JVCAudio1(guiObject, index)
+ : JVCAudio1(index)
{
setKeysetName("Audio Keyset 1b");
+}
+
+
+void JVCAudio1b::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
+ JVCAudio1::populateProtocol(guiObject);
addKey("VCR", VCRInput_Key, 0x2443, 16);
JVCAudio2::JVCAudio2(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"Audio Keyset 2",
JVC_Make,
index)
{
+}
+
+
+void JVCAudio2::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new JVCProtocol(guiObject, index);
// setPreData(0xF9, 8);
addKey("vol+", VolumeUp_Key, 0x01, 8);
addKey("vol-", VolumeDown_Key, 0x02, 8);
addKey("ACTIVE_HYPER_BASS", EnhancedBass_Key, 0x04, 8); // "bass"
- addKey("band", TunerBand_Key, 0x0B, 8); // "TUNER_BAND"
+ addKey("band", TunerInput_Key, 0x0B, 8); // "TUNER_BAND"
addKey("aux", AuxInput_Key, 0x0D, 8);
addKey("enter", Enter_Key, 0x11, 8);
JVCDVD1::JVCDVD1(
- QObject *guiObject,
unsigned int index)
: PIRKeysetMetaData(
"DVD Keyset 1",
JVC_Make,
index)
{
+ addControlledDevice(JVC_Make, "JVC XV-N5SL", DVD_Device);
+}
+
+
+void JVCDVD1::populateProtocol(
+ QObject *guiObject)
+{
+ if (threadableProtocol)
+ {
+ // If the pointer is not null, the keyset must already be populated.
+ return;
+ }
+
threadableProtocol = new JVCProtocol(guiObject, index);
// setPreData(0xF7, 8);