First Extras-Testing Candidate Release
[pierogi] / protocols / mceprotocol.h
1 #ifndef MCEPROTOCOL_H
2 #define MCEPROTOCOL_H
3
4 #include "pirprotocol.h"
5
6 class PIRRX51Hardware;
7
8 //
9 // The MCE protocol is derived from (but does not exactly match) RC6 mode 6A.
10 //
11
12 class MCEProtocol: public PIRProtocol
13 {
14 public:
15   MCEProtocol(
16     QObject *guiObject,
17     unsigned int index,
18     unsigned int oemData);
19
20 public slots:
21   void startSendingCommand(
22     unsigned int threadableID,
23     PIRKeyName command);
24
25 private:
26   int pushBits(
27     const CommandSequence &bits,
28     PIRRX51Hardware &device);
29
30   int pushZero(
31     PIRRX51Hardware &device);
32
33   int pushOne(
34     PIRRX51Hardware &device);
35
36   unsigned int biphaseUnit;
37
38   CommandSequence oemBits;
39
40   unsigned int buffer;
41   int keypressCount;
42
43   bool bufferContainsSpace;
44   bool bufferContainsPulse;
45 };
46
47 #endif // MCEPROTOCOL_H