#ifndef PIRKEYSETMETADATA_H
#define PIRKEYSETMETADATA_H
-#include <map>
-#include <list>
-//#include <string>
-
#include "pirkeynames.h"
#include "pirmakenames.h"
-#include "pirdevicetypenames.h"
-#include "pirkeysetwidgetitem.h"
-#include "protocols/pirprotocol.h"
+//#include "pirdevicetypenames.h"
-typedef std::map<PIRKeyName, const char *> KeyCollection;
+#include "pirdeviceinfo.h"
-class DeviceInfo
-{
-public:
- DeviceInfo(
- PIRMakeName ma,
- const char *mo,
- PIRDeviceTypeName t)
- : make(ma),
- model(mo),
- type(t)
- {}
+#include <map>
+//#include <list>
- PIRMakeName make;
- const char *model;
- PIRDeviceTypeName type;
-};
+class QThread;
+class QObject;
+
+class PIRSelectDeviceForm;
+class PIRProtocol;
+
+typedef std::map<PIRKeyName, const char *> KeyCollection;
-typedef std::list<DeviceInfo> DeviceCollection;
class PIRKeysetMetaData
{
const char *getKeysetName() const;
- void moveProtocolToThread(
- QThread &thread);
+ virtual void populateProtocol(
+ QObject *guiObject) = 0;
- void populateDeviceTypes(
- PIRKeysetWidgetItem *kwi) const;
+ void clearProtocol();
+
+ void moveToThread(
+ QThread *thread);
+
+ static void populateDevices(
+ PIRSelectDeviceForm *sdf);
protected:
void addControlledDevice(
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,
unsigned int addressTwo,
unsigned int commandTwo);
+/*
+ void addRCAKey(
+ const char *name,
+ PIRKeyName key,
+ unsigned int addressData,
+ unsigned int commandData);
+*/
+
+ void addKaseikyoKey(
+ const char *name,
+ PIRKeyName key,
+ unsigned int addressData,
+ unsigned int commandData);
+
+ void addDishKey(
+ const char *name,
+ PIRKeyName key,
+ 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);
unsigned long data,
unsigned int bits);
- KeyCollection keys;
+ void setKeysetName(
+ const char *name);
- DeviceCollection controlledDevices;
+ KeyCollection keys;
PIRProtocol *threadableProtocol;
-
- void setKeysetName(
- const char *name);
+ unsigned int index;
private:
const char *keysetName;
PIRMakeName make;
- PIRDeviceTypeCollection deviceTypes;
-
- unsigned int id;
+ static PIRDeviceCollection controlledDevices;
+// PIRDeviceTypeCollection deviceTypes;
};