Search for Power Button Panel
[pierogi] / pirkeysetmetadata.h
index c70b040..401174a 100644 (file)
@@ -3,10 +3,12 @@
 
 #include "pirkeynames.h"
 #include "pirmakenames.h"
-#include "pirdevicetypenames.h"
+//#include "pirdevicetypenames.h"
+
+#include "pirdeviceinfo.h"
 
 #include <map>
-#include <list>
+//#include <list>
 
 class QThread;
 class QObject;
@@ -16,24 +18,6 @@ class PIRProtocol;
 
 typedef std::map<PIRKeyName, const char *> KeyCollection;
 
-class DeviceInfo
-{
-public:
-  DeviceInfo(
-    PIRMakeName ma,
-    const char *mo,
-    PIRDeviceTypeName t)
-  : make(ma),
-    model(mo),
-    type(t)
-  {}
-
-  PIRMakeName make;
-  const char *model;
-  PIRDeviceTypeName type;
-};
-
-typedef std::list<DeviceInfo> PIRDeviceCollection;
 
 class PIRKeysetMetaData
 {
@@ -55,12 +39,13 @@ public:
   virtual void populateProtocol(
     QObject *guiObject) = 0;
 
+  void clearProtocol();
+
   void moveToThread(
     QThread *thread);
 
-  void populateDevices(
-    unsigned int id,
-    PIRSelectDeviceForm *sdf) const;
+  static void populateDevices(
+    PIRSelectDeviceForm *sdf);
 
 protected:
   void addControlledDevice(
@@ -110,6 +95,12 @@ protected:
     unsigned int addressData,
     unsigned int commandData);
 
+  void addPanOldKey(
+    const char *name,
+    PIRKeyName key,
+    unsigned int addressData,
+    unsigned int commandData);
+
   void addPioneerKey(
     const char *name,
     PIRKeyName key,
@@ -138,6 +129,12 @@ protected:
     unsigned int firstCommand,
     unsigned int secondCommand);
 
+  void addXMPKey(
+    const char *name,
+    PIRKeyName key,
+    unsigned int firstCommand,
+    unsigned int secondCommand);
+
   void setPreData(
     unsigned long data,
     unsigned int bits);
@@ -151,15 +148,14 @@ protected:
 
   KeyCollection keys;
 
-  PIRDeviceCollection controlledDevices;
-
   PIRProtocol *threadableProtocol;
   unsigned int index;
 
 private:
   const char *keysetName;
   PIRMakeName make;
-  PIRDeviceTypeCollection deviceTypes;
+  static PIRDeviceCollection controlledDevices;
+//  PIRDeviceTypeCollection deviceTypes;
 };