class eRCDriver;
class eRCKey;
+#ifndef SWIG
+
/**
* \brief A remote control.
*
* For Example, it might be 16bit codes with one bit make/break or special codes
* for repeat.
*/
- virtual void handleCode(int code)=0;
+ virtual void handleCode(long code)=0;
/**
* \brief Get user readable description.
* \result The description.
{
protected:
int handle;
- eSocketNotifier *sn;
+ ePtr<eSocketNotifier> sn;
void keyPressed(int);
public:
eRCShortDriver(const char *filename);
{
protected:
int handle;
- eSocketNotifier *sn;
+ ePtr<eSocketNotifier> sn;
void keyPressed(int);
public:
std::string getDeviceName();
}
enum
{
+ /* there are not really flags.. */
+ flagMake=0,
flagBreak=1,
- flagRepeat=2
+ flagRepeat=2,
+ flagLong=3,
+ /* but this is. */
+ flagAscii=4,
};
-
+
bool operator<(const eRCKey &r) const
{
if (r.producer == producer)
rrate; // repeat rate (in ms)
};
+#endif
+
class eRCInput: public Object
{
int locked;
int handle;
static eRCInput *instance;
int keyboardMode;
-
+#ifdef SWIG
+ eRCInput();
+ ~eRCInput();
+public:
+#else
public:
struct lstr
{
Signal1<void, const eRCKey&> keyEvent;
eRCInput();
~eRCInput();
-
- int lock();
- void unlock();
- int islocked() { return locked; }
+
void close();
bool open();
lock the console and pass this as the console fd for making the
tc* stuff working.
*/
-
- enum { kmNone, kmAscii, kmAll };
- void setKeyboardMode(int mode) { keyboardMode = mode; }
- int getKeyboardMode() { return keyboardMode; }
void keyPressed(const eRCKey &key)
{
void removeDevice(const std::string &id);
eRCDevice *getDevice(const std::string &id);
std::map<std::string,eRCDevice*,lstr> &getDevices();
-
- static eRCInput *getInstance() { return instance; }
-
+
eRCConfig config;
+#endif
+ enum { kmNone, kmAscii, kmAll };
+ void setKeyboardMode(int mode) { keyboardMode = mode; }
+ int getKeyboardMode() { return keyboardMode; }
+ static eRCInput *getInstance() { return instance; }
+ int lock();
+ void unlock();
+ int islocked() { return locked; }
};
#endif