First attempt to implement RC6 Protocol
[pierogi] / pirkeysetmanager.h
1 #ifndef PIRKEYSETMANAGER_H
2 #define PIRKEYSETMANAGER_H
3
4 #include "pirkeysetmetadata.h"
5 //#include "protocol.h"
6 #include "pirkeynames.h"
7 //#include "selectionwindow.h"
8 #include "pirselectkeysetform.h"
9 #include "pirkeysetwidgetitem.h"
10
11 //#include <QtCore/QCoreApplication>
12 #include <QThread>
13 //#include <QStringList>
14
15 #include <map>
16
17 typedef std::map<int, PIRKeysetMetaData *> PIRKeysetCollection;
18
19 class PIRKeysetManager
20 {
21 public:
22   PIRKeysetManager(
23     QObject *guiObject);
24
25   ~PIRKeysetManager();
26
27   void populateGuiWidget(
28     PIRSelectKeysetForm *widget);
29
30   bool keysetExists(
31     unsigned int keysetID);
32
33   bool hasKey(
34     unsigned int keysetID,
35     PIRKeyName name);
36
37   PIRMakeName getMake(
38     unsigned int keysetID);
39
40   QString getDisplayName(
41     unsigned int keysetID);
42
43   void populateDeviceTypes(
44     PIRKeysetWidgetItem *kwi,
45     unsigned int keysetID);
46
47 private:
48   // This needs to be improved:
49   void populateKeyset(
50     PIRKeysetMetaData *keyset);
51
52   PIRKeysetCollection keysetsInfo;
53
54   // The counter will be used to generate unique ids for each keyset:
55   unsigned int counter;
56
57   QThread commandThread;
58 };
59
60 #endif // PIRKEYSETMANAGER_H