Adding per-keyset editable data
[pierogi] / keysets / panasonic.cpp
index f1ac9b1..21647cc 100644 (file)
@@ -1,16 +1,28 @@
 #include "panasonic.h"
 #include "protocols/necprotocol.h"
 #include "protocols/kaseikyoprotocol.h"
+#include "protocols/panasonicoldprotocol.h"
 
 
 PanasonicCarAudio::PanasonicCarAudio(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "Car Audio Keyset",
       Panasonic_Make,
       index)
 {
+}
+
+
+void PanasonicCarAudio::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new NECProtocol(guiObject, index, true, false);
 
 //  setPreData(0x8156, 16);
@@ -28,13 +40,24 @@ PanasonicCarAudio::PanasonicCarAudio(
 
 
 PanasonicSat1::PanasonicSat1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "Satellite Keyset 1",
       Panasonic_Make,
       index)
 {
+}
+
+
+void PanasonicSat1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new KaseikyoProtocol(guiObject, index);
 
 //  setPreData(0x40040140, 32);
@@ -81,11 +104,23 @@ PanasonicSat1::PanasonicSat1(
 
 
 PanasonicSat1a::PanasonicSat1a(
-  QObject *guiObject,
   unsigned int index)
-  : PanasonicSat1(guiObject, index)
+  : PanasonicSat1(index)
 {
   setKeysetName("Satellite Keyset 1a");
+}
+
+
+void PanasonicSat1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  PanasonicSat1::populateProtocol(guiObject);
 
   addKaseikyoKey("EXIT", Exit_Key, 0x028, 0xCF);
   addKaseikyoKey("CH+", ChannelUp_Key, 0x028, 0xB2);
@@ -94,13 +129,25 @@ PanasonicSat1a::PanasonicSat1a(
 
 
 PanasonicTV1::PanasonicTV1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "TV Keyset 1",
       Panasonic_Make,
       index)
 {
+  addControlledDevice(Panasonic_Make, "TX-32PD50", TV_Device);
+}
+
+
+void PanasonicTV1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new KaseikyoProtocol(guiObject, index);
 
 //  setPreData(0x400401, 24);
@@ -213,11 +260,24 @@ PanasonicTV1::PanasonicTV1(
 
 
 PanasonicTV1a::PanasonicTV1a(
-  QObject *guiObject,
   unsigned int index)
-  : PanasonicTV1(guiObject, index)
+  : PanasonicTV1(index)
 {
   setKeysetName("TV Keyset 1a");
+}
+
+
+void PanasonicTV1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  PanasonicTV1::populateProtocol(guiObject);
+
   // Overwrite some of the keys:
   addKaseikyoKey("OK", Select_Key, 0x008, 0x49);
   addKaseikyoKey("MENU", Menu_Key, 0x008, 0x06);
@@ -225,15 +285,28 @@ PanasonicTV1a::PanasonicTV1a(
 
 
 PanasonicTV1b::PanasonicTV1b(
-  QObject *guiObject,
   unsigned int index)
-  : PanasonicTV1(guiObject, index)
+  : PanasonicTV1(index)
 {
   setKeysetName("TV Keyset 1b");
 
   addControlledDevice(Panasonic_Make, "Viera TX-32LZD80", TV_Device);
   addControlledDevice(Panasonic_Make, "Viera 42PZ700U", TV_Device);
   addControlledDevice(Panasonic_Make, "Viera 42PZ8ES", TV_Device);
+  addControlledDevice(Panasonic_Make, "Quintrix TX-25MK1C", TV_Device);
+}
+
+
+void PanasonicTV1b::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  PanasonicTV1::populateProtocol(guiObject);
 
   addKaseikyoKey("Info", Info_Key, 0x008, 0x39); // "OSD"
   addKaseikyoKey("OK", Select_Key, 0x008, 0x49);
@@ -245,14 +318,106 @@ PanasonicTV1b::PanasonicTV1b(
 }
 
 
+PanasonicTV2::PanasonicTV2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "TV Keyset 2",
+      Panasonic_Make,
+      index)
+{
+}
+
+
+void PanasonicTV2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new PanasonicOldProtocol(guiObject, index);
+
+  addPanOldKey("Mute", Mute_Key, 0x00, 0x00);
+  addPanOldKey("R-Tune", Unmapped_Key, 0x00, 0x0A);
+  addPanOldKey("Sleep", Sleep_Key, 0x00, 0x0B);
+  addPanOldKey("TV/Video", Input_Key, 0x00, 0x0D);
+  addPanOldKey("Recall", PrevChannel_Key, 0x00, 0x0F);
+
+  addPanOldKey("ONE", One_Key, 0x00, 0x10);
+  addPanOldKey("TWO", Two_Key, 0x00, 0x11);
+  addPanOldKey("THREE", Three_Key, 0x00, 0x12);
+  addPanOldKey("FOUR", Four_Key, 0x00, 0x13);
+  addPanOldKey("FIVE", Five_Key, 0x00, 0x14);
+  addPanOldKey("SIX", Six_Key, 0x00, 0x15);
+  addPanOldKey("SEVEN", Seven_Key, 0x00, 0x16);
+  addPanOldKey("EIGHT", Eight_Key, 0x00, 0x17);
+  addPanOldKey("NINE", Nine_Key, 0x00, 0x18);
+  addPanOldKey("ZERO", Zero_Key, 0x00, 0x19);
+
+  addPanOldKey("POWER", Power_Key, 0x00, 0x20);
+  addPanOldKey("CHANNEL_UP", ChannelUp_Key, 0x00, 0x22); // "NEXT"
+  addPanOldKey("CHANNEL_DOWN", ChannelDown_Key, 0x00, 0x23); // "PREV"
+  addPanOldKey("VOLUME_UP", VolumeUp_Key, 0x00, 0x24);
+  addPanOldKey("VOLUME_DOWN", VolumeDown_Key, 0x00, 0x25);
+}
+
+
+PanasonicTV2a::PanasonicTV2a(
+  unsigned int index)
+  : PanasonicTV2(index)
+{
+  setKeysetName("TV Keyset 2a");
+}
+
+
+void PanasonicTV2a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  PanasonicTV2::populateProtocol(guiObject);
+
+  addPanOldKey("BAL_LEFT", BalanceLeft_Key, 0x00, 0x24);
+  addPanOldKey("BAL_RIGHT", BalanceRight_Key, 0x00, 0x25);
+  addPanOldKey("VOL_UP", VolumeUp_Key, 0x00, 0x01);
+  addPanOldKey("VOL_DOWN", VolumeDown_Key, 0x00, 0x0D);
+  addPanOldKey("BWD", Rewind_Key, 0x00, 0x3B);
+  addPanOldKey("FWD", FastForward_Key, 0x00, 0x3C);
+  addPanOldKey("STOP", Stop_Key, 0x00, 0x1B);
+  addPanOldKey("PAUSE", Pause_Key, 0x00, 0x2A);
+  addPanOldKey("PLAYLIST_CLEAR", Unmapped_Key, 0x00, 0x1A);
+  addPanOldKey("PLAYLIST_ADD", Unmapped_Key, 0x00, 0x36);
+  addPanOldKey("PLAY", Play_Key, 0x00, 0x3A);
+  addPanOldKey("MUTE", Mute_Key, 0x00, 0x0B);
+  addPanOldKey("QUIT", Unmapped_Key, 0x00, 0x20);
+}
+
+
 PanasonicVCR1::PanasonicVCR1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "VCR Keyset 1",
       Panasonic_Make,
       index)
 {
+}
+
+
+void PanasonicVCR1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new KaseikyoProtocol(guiObject, index);
 
 //  setPreData(0x400409, 24);
@@ -283,10 +448,10 @@ PanasonicVCR1::PanasonicVCR1(
   addKaseikyoKey("INFO", Info_Key, 0x009, 0x39);
   addKaseikyoKey("-/--", DoubleDigit_Key, 0x009, 0x3B);
   addKaseikyoKey("POWER", Power_Key, 0x009, 0x3D);
-  addKaseikyoKey("INDEX", Unmapped_Key, 0x009, 0x40);
+  addKaseikyoKey("INDEX", IndexSearch_Key, 0x009, 0x40);
   addKaseikyoKey("time_search", Unmapped_Key, 0x009, 0x44);
-  addKaseikyoKey("INDEXL", Unmapped_Key, 0x009, 0x49);
-  addKaseikyoKey("INDEXR", Unmapped_Key, 0x009, 0x4A);
+  addKaseikyoKey("INDEXL", Previous_Key, 0x009, 0x49);
+  addKaseikyoKey("INDEXR", Next_Key, 0x009, 0x4A);
   addKaseikyoKey("mem_rep", Unmapped_Key, 0x009, 0x53);
   addKaseikyoKey("COUNTER_RESET", Unmapped_Key, 0x009, 0x54);
   addKaseikyoKey("TAPE_REMAIN", Unmapped_Key, 0x009, 0x55);
@@ -297,7 +462,7 @@ PanasonicVCR1::PanasonicVCR1(
   addKaseikyoKey("TRACKING_AUTO", AutoTracking_Key, 0x009, 0xB0);
   addKaseikyoKey("TRACKING_PLUS", TrackingPlus_Key, 0x009, 0xB1);
   addKaseikyoKey("TRACKING_MINUS", TrackingMinus_Key, 0x009, 0xB2);
-  addKaseikyoKey("TIMERREC", Timer_Key, 0x009, 0xB4);
+  addKaseikyoKey("TIMERREC", RecordTimed_Key, 0x009, 0xB4);
   addKaseikyoKey("AV", Unmapped_Key, 0x009, 0xC0);
   addKaseikyoKey("DIRECT_TV_REC", Unmapped_Key, 0x009, 0xC2);
   addKaseikyoKey("mesecam", Unmapped_Key, 0x009, 0xC9);
@@ -316,7 +481,7 @@ PanasonicVCR1::PanasonicVCR1(
   addKaseikyoKey("rotatedown", Unmapped_Key, 0x019, 0x03);
   addKaseikyoKey("set", Unmapped_Key, 0x019, 0x04);
   addKaseikyoKey("clear", Unmapped_Key, 0x019, 0x05);
-  addKaseikyoKey("VPS/PDC", Unmapped_Key, 0x019, 0x06);
+  addKaseikyoKey("VPS/PDC", RecordPDC_Key, 0x019, 0x06);
   addKaseikyoKey("OffTimer", Sleep_Key, 0x019, 0x08);
   addKaseikyoKey("CANCEL", Clear_Key, 0x019, 0x09);
   addKaseikyoKey("SPEED", VHSSpeed_Key, 0x019, 0x0A);
@@ -324,7 +489,7 @@ PanasonicVCR1::PanasonicVCR1(
   addKaseikyoKey("RADIO_TUNE", Unmapped_Key, 0x019, 0x38);
   addKaseikyoKey("MENU", Menu_Key, 0x019, 0x56);
   addKaseikyoKey("OK", Select_Key, 0x019, 0x58);
-  addKaseikyoKey("SHOWVIEW", Unmapped_Key, 0x019, 0x5D);
+  addKaseikyoKey("SHOWVIEW", Unmapped_Key, 0x019, 0x5D); // vhsplus+, etc.
   addKaseikyoKey("DISPLAY", Unmapped_Key, 0x019, 0x5F);
   addKaseikyoKey("EXIT", Exit_Key, 0x019, 0x66);
   addKaseikyoKey("CHECK+", Unmapped_Key, 0x019, 0x90);
@@ -350,24 +515,48 @@ PanasonicVCR1::PanasonicVCR1(
 
 
 PanasonicVCR1a::PanasonicVCR1a(
-  QObject *guiObject,
   unsigned int index)
-  : PanasonicVCR1(guiObject, index)
+  : PanasonicVCR1(index)
 {
   setKeysetName("VCR Keyset 1a");
+}
+
+
+void PanasonicVCR1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  PanasonicVCR1::populateProtocol(guiObject);
 
   addKaseikyoKey("OSD", Info_Key, 0x009, 0x57);
   addKaseikyoKey("AV", Input_Key, 0x009, 0xC0);
-  addKaseikyoKey("DISPLAY", Info_Key, 0x019, 0x5F);
+  addKaseikyoKey("DISPLAY", Unmapped_Key, 0x019, 0x5F);
 }
 
 
 PanasonicVCR1b::PanasonicVCR1b(
-  QObject *guiObject,
   unsigned int index)
-  : PanasonicVCR1(guiObject, index)
+  : PanasonicVCR1(index)
 {
   setKeysetName("VCR Keyset 1b");
+}
+
+
+void PanasonicVCR1b::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  PanasonicVCR1::populateProtocol(guiObject);
 
   addKaseikyoKey("repeat", Repeat_Key, 0x009, 0xF9);
   addKaseikyoKey("prog", Program_Key, 0x009, 0xFF);
@@ -376,11 +565,23 @@ PanasonicVCR1b::PanasonicVCR1b(
 
 
 PanasonicVCR1c::PanasonicVCR1c(
-  QObject *guiObject,
   unsigned int index)
-  : PanasonicVCR1(guiObject, index)
+  : PanasonicVCR1(index)
 {
   setKeysetName("VCR Keyset 1c");
+}
+
+
+void PanasonicVCR1c::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  PanasonicVCR1::populateProtocol(guiObject);
 
   addKaseikyoKey("rotate", Up_Key, 0x019, 0x02);
   addKaseikyoKey("rotatedown", Down_Key, 0x019, 0x03);
@@ -389,14 +590,92 @@ PanasonicVCR1c::PanasonicVCR1c(
 }
 
 
+PanasonicVCR2::PanasonicVCR2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "VCR Keyset 2",
+      Panasonic_Make,
+      index)
+{
+}
+
+
+void PanasonicVCR2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new PanasonicOldProtocol(guiObject, index);
+
+  addPanOldKey("STOP", Stop_Key, 0x02, 0x00);
+  addPanOldKey("REW", Rewind_Key, 0x02, 0x02);
+  addPanOldKey("FF", FastForward_Key, 0x02, 0x03);
+  addPanOldKey("PAUSE", Pause_Key, 0x02, 0x06);
+  addPanOldKey("REC", Record_Key, 0x02, 0x08);
+  addPanOldKey("PLAY", Play_Key, 0x02, 0x0A);
+  addPanOldKey("REV_PLAY", Unmapped_Key, 0x02, 0x0B);
+  addPanOldKey("F.ADV", StepForward_Key, 0x02, 0x0C);
+  addPanOldKey("x2", PlayX2_Key, 0x02, 0x0E);
+  addPanOldKey("SLOW", Slow_Key, 0x02, 0x0F);
+  addPanOldKey("1", One_Key, 0x02, 0x10);
+  addPanOldKey("2", Two_Key, 0x02, 0x11);
+  addPanOldKey("3", Three_Key, 0x02, 0x12);
+  addPanOldKey("4", Four_Key, 0x02, 0x13);
+  addPanOldKey("5", Five_Key, 0x02, 0x14);
+  addPanOldKey("6", Six_Key, 0x02, 0x15);
+  addPanOldKey("7", Seven_Key, 0x02, 0x16);
+  addPanOldKey("8", Eight_Key, 0x02, 0x17);
+  addPanOldKey("9", Nine_Key, 0x02, 0x18);
+  addPanOldKey("0", Zero_Key, 0x02, 0x19);
+  addPanOldKey("POWER", Power_Key, 0x02, 0x20); // "vtr"
+  addPanOldKey("VOL+", VolumeUp_Key, 0x02, 0x22);
+  addPanOldKey("VOL-", VolumeDown_Key, 0x02, 0x23);
+  addPanOldKey("-/--", DoubleDigit_Key, 0x02, 0x24);
+  addPanOldKey("VTR/TV", Input_Key, 0x02, 0x2A);
+  addPanOldKey("slow+", SlowPlus_Key, 0x02, 0x2E);
+  addPanOldKey("slow-", SlowMinus_Key, 0x02, 0x2F);
+  addPanOldKey("MEMORY_SEARCH", Memory_Key, 0x02, 0x32);
+  addPanOldKey("RESET_INDEX", Reset_Key, 0x02, 0x33);
+  addPanOldKey("INTRO_SCAN", Unmapped_Key, 0x02, 0x34);
+  addPanOldKey("timer_rec", RecordTimed_Key, 0x02, 0x36);
+  addPanOldKey("AUDIO-SELECT", Audio_Key, 0x02, 0x3D);
+
+  addPanOldKey("VPS", RecordPDC_Key, 0x03, 0x06);
+  addPanOldKey("prog", Program_Key, 0x03, 0x2C);
+  addPanOldKey("next", Next_Key, 0x03, 0x3A);
+
+  addPanOldKey("FSTORE", Unmapped_Key, 0x19, 0x10);
+  addPanOldKey("STROBE", Unmapped_Key, 0x19, 0x11);
+  addPanOldKey("CLEAR", Unmapped_Key, 0x19, 0x12);
+  addPanOldKey("GEFFECT", Unmapped_Key, 0x19, 0x17);
+  addPanOldKey("MINUS", ChannelDown_Key, 0x19, 0x19); //?
+  addPanOldKey("PLUS", ChannelUp_Key, 0x19, 0x24); //?
+}
+
+
 PanasonicDVD1::PanasonicDVD1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "DVD Keyset 1",
       Panasonic_Make,
       index)
 {
+}
+
+
+void PanasonicDVD1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new KaseikyoProtocol(guiObject, index);
 
 //  setPreData(0x40040D00, 32);
@@ -479,11 +758,23 @@ PanasonicDVD1::PanasonicDVD1(
 
 
 PanasonicDVD1a::PanasonicDVD1a(
-  QObject *guiObject,
   unsigned int index)
-  : PanasonicDVD1(guiObject, index)
+  : PanasonicDVD1(index)
 {
   setKeysetName("DVD Keyset 1a");
+}
+
+
+void PanasonicDVD1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  PanasonicDVD1::populateProtocol(guiObject);
 
   addKaseikyoKey("channel2up", ChannelUp_Key, 0x00B, 0x34);
   addKaseikyoKey("channel2down", ChannelDown_Key, 0x00B, 0x35);
@@ -492,7 +783,6 @@ PanasonicDVD1a::PanasonicDVD1a(
 
 
 PanasonicAudio1::PanasonicAudio1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "Audio Keyset 1",
@@ -501,6 +791,17 @@ PanasonicAudio1::PanasonicAudio1(
 {
   addControlledDevice(Panasonic_Make, "RX-DS25", Audio_Device);
   addControlledDevice(Panasonic_Make, "RX-e300", Audio_Device);
+}
+
+
+void PanasonicAudio1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
 
   threadableProtocol = new KaseikyoProtocol(guiObject, index);
 
@@ -547,7 +848,7 @@ PanasonicAudio1::PanasonicAudio1(
   addKaseikyoKey("vol+", VolumeUp_Key, 0xC2A, 0xB0);
   addKaseikyoKey("vol-", VolumeDown_Key, 0xC2A, 0xB1);
   addKaseikyoKey("cd", CDInput_Key, 0xC2A, 0xB6);
-  addKaseikyoKey("tuner-band", TunerBand_Key, 0xC2A, 0xB8);
+  addKaseikyoKey("tuner-band", TunerInput_Key, 0xC2A, 0xB8);
   addKaseikyoKey("sleep", Sleep_Key, 0xC2A, 0xBC);
   addKaseikyoKey("power", Power_Key, 0xC2A, 0xBF);
 
@@ -571,3 +872,187 @@ PanasonicAudio1::PanasonicAudio1(
   addKaseikyoKey("panelclose", Unmapped_Key, 0xC2A, 0xF5); // "TOP_PANEL_CLOSE"
 }
 
+
+PanasonicAudio2::PanasonicAudio2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 2",
+      Panasonic_Make,
+      index)
+{
+}
+
+
+void PanasonicAudio2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new KaseikyoProtocol(guiObject, index);
+
+  setPreData(0x2002, 16);
+
+  addKaseikyoKey("Volume_Up", VolumeUp_Key, 0x00A, 0x20);
+  addKaseikyoKey("Volume_Down", VolumeDown_Key, 0x00A, 0x21);
+  addKaseikyoKey("Mute", Mute_Key, 0x00A, 0x32);
+  addKaseikyoKey("INPUT:AUX", AuxInput_Key, 0x00A, 0x9A);
+  addKaseikyoKey("Super_Woofer", Unmapped_Key, 0x00A, 0xC2);
+
+  addKaseikyoKey("tuner", TunerInput_Key, 0x04A, 0xA4);
+
+  addKaseikyoKey("tape", TapeInput_Key, 0x08A, 0x96);
+  addKaseikyoKey("INPUT: TAPE Play", Unmapped_Key, 0x08A, 0x9E);
+
+  addKaseikyoKey("repeat", Repeat_Key, 0x0AA, 0x47);
+  addKaseikyoKey("random", Random_Key, 0x0AA, 0x4D);
+  addKaseikyoKey("program", Program_Key, 0x0AA, 0x8A);
+  addKaseikyoKey("cd", CDInput_Key, 0x00A, 0x94);
+  addKaseikyoKey("aux", AuxInput_Key, 0x00A, 0x9A);
+  addKaseikyoKey("cancel", Clear_Key, 0x0AA, 0xA3);
+  addKaseikyoKey("Disc", NextDisc_Key, 0x0AA, 0xA4);
+
+  addKaseikyoKey("Eq", Unmapped_Key, 0x10A, 0x83); // "Preset EQ"
+
+  addKaseikyoKey("S.Sound EQ", Unmapped_Key, 0x12A, 0xC5);
+
+  addKaseikyoKey("Stop", Stop_Key, 0x1CA, 0x00);
+  addKaseikyoKey("Play_Reverse", Unmapped_Key, 0x1CA, 0x06);
+  addKaseikyoKey("Play/Pause", Play_Key, 0x1CA, 0x0A);
+  addKaseikyoKey("Play/Pause", Pause_Key, 0x1CA, 0x0A);
+  addKaseikyoKey("1", One_Key, 0x1CA, 0x10);
+  addKaseikyoKey("2", Two_Key, 0x1CA, 0x11);
+  addKaseikyoKey("3", Three_Key, 0x1CA, 0x12);
+  addKaseikyoKey("4", Four_Key, 0x1CA, 0x13);
+  addKaseikyoKey("5", Five_Key, 0x1CA, 0x14);
+  addKaseikyoKey("6", Six_Key, 0x1CA, 0x15);
+  addKaseikyoKey("7", Seven_Key, 0x1CA, 0x16);
+  addKaseikyoKey("8", Eight_Key, 0x1CA, 0x17);
+  addKaseikyoKey("9", Nine_Key, 0x1CA, 0x18);
+  addKaseikyoKey("0", Zero_Key, 0x1CA, 0x19);
+  addKaseikyoKey("Power", Power_Key, 0x1CA, 0x3D);
+  addKaseikyoKey("discrete on", PowerOn_Key, 0x1CA, 0x3E);
+  addKaseikyoKey("discrete off", PowerOff_Key, 0x1CA, 0x3F);
+  addKaseikyoKey("Back", Previous_Key, 0x1CA, 0x49);
+  addKaseikyoKey("Forward", Next_Key, 0x1CA, 0x4A);
+  addKaseikyoKey("Display", Info_Key, 0x1CA, 0x55);
+  addKaseikyoKey(">10", DoubleDigit_Key, 0x1CA, 0x84);
+  addKaseikyoKey("clock/timer", Timer_Key, 0x1CA, 0x95);
+  addKaseikyoKey("Sleep", Sleep_Key, 0x1CA, 0x96);
+  addKaseikyoKey("Dimmer", Unmapped_Key, 0x1CA, 0x97);
+  addKaseikyoKey("play/record timer", Unmapped_Key, 0x1CA, 0x9B);
+  addKaseikyoKey("play mode", Mode_Key, 0x1CA, 0xBB);
+}
+
+
+PanasonicAudio2a::PanasonicAudio2a(
+  unsigned int index)
+  : PanasonicAudio2(index)
+{
+  setKeysetName("Audio Keyset 2a");
+}
+
+
+void PanasonicAudio2a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  PanasonicAudio2::populateProtocol(guiObject);
+
+  addKaseikyoKey("INPUT: CD play/pause", CDInput_Key, 0x0AA, 0x0A);
+  addKaseikyoKey("INPUT: CD play/pause", Play_Key, 0x0AA, 0x0A);
+  addKaseikyoKey("INPUT: CD play/pause", Pause_Key, 0x0AA, 0x0A);
+}
+
+
+PanasonicAudio3::PanasonicAudio3(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Audio Keyset 3",
+      Panasonic_Make,
+      index)
+{
+}
+
+
+void PanasonicAudio3::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new PanasonicOldProtocol(guiObject, index);
+
+  addPanOldKey("audio_power", Power_Key, 0x09, 0x20);
+  addPanOldKey("audio_phono", PhonoInput_Key, 0x09, 0x0C);
+  addPanOldKey("vol-", VolumeDown_Key, 0x09, 0x25);
+  addPanOldKey("vol+", VolumeUp_Key, 0x09, 0x24);
+  addPanOldKey("audio_video", Input_Key, 0x09, 0x2E);
+  addPanOldKey("audio_tape", TapeInput_Key, 0x09, 0x0A);
+  addPanOldKey("tuner-", ChannelDown_Key, 0x09, 0x23);
+  addPanOldKey("tuner+", ChannelUp_Key, 0x09, 0x22);
+  addPanOldKey("cd_skip-", Previous_Key, 0x0C, 0x02);
+  addPanOldKey("cd_skip+", Next_Key, 0x0C, 0x03);
+  addPanOldKey("cd_stop", Stop_Key, 0x0C, 0x00);
+  addPanOldKey("cd_play", Play_Key, 0x0C, 0x0A);
+  addPanOldKey("vcr_power", Unmapped_Key, 0x02, 0x20);
+  addPanOldKey("vcr_stop", Unmapped_Key, 0x02, 0x00);
+  addPanOldKey("vcr_ch-", Unmapped_Key, 0x02, 0x23);
+  addPanOldKey("vcr_ch+", Unmapped_Key, 0x02, 0x22);
+  addPanOldKey("tv_vcr", Unmapped_Key, 0x02, 0x2A);
+  addPanOldKey("vcr_pause", Unmapped_Key, 0x02, 0x06);
+  addPanOldKey("vcr_rec", Unmapped_Key, 0x02, 0x08);
+  addPanOldKey("tv_power", Unmapped_Key, 0x00, 0x20);
+  addPanOldKey("vcr_play", Unmapped_Key, 0x02, 0x0A);
+  addPanOldKey("vcr_rew", Unmapped_Key, 0x02, 0x02);
+  addPanOldKey("vcr_ff", Unmapped_Key, 0x02, 0x03);
+  addPanOldKey("tv_video", Unmapped_Key, 0x00, 0x0D);
+  addPanOldKey("tv_ant", Unmapped_Key, 0x00, 0x2A);
+  addPanOldKey("tv_ch-", Unmapped_Key, 0x00, 0x23);
+  addPanOldKey("tv_ch+", Unmapped_Key, 0x00, 0x22);
+}
+
+
+PanasonicAC1::PanasonicAC1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Air Conditioner 1",
+      Panasonic_Make,
+      index)
+{
+}
+
+
+void PanasonicAC1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  threadableProtocol = new NECProtocol(guiObject, index, true, true);
+
+  setPreData(0x6681, 16);
+
+  addKey("Operation", Power_Key, 0x81, 8);
+  addKey("Economy", EnergySave_Key, 0x82, 8);
+  addKey("Air Swing", Oscillate_Key, 0x83, 8);
+  addKey("Temp Up", TempUp_Key, 0x85, 8);
+  addKey("Temp Down", TempDown_Key, 0x8A, 8);
+  addKey("Fan Speed", FanFaster_Key, 0x99, 8);
+  addKey("Mode", Mode_Key, 0x9B, 8);
+  addKey("Timer", Timer_Key, 0x9F, 8);
+}