better solution to add possibility to delete eSocketNotifiers,
[vuplus_dvbapp] / lib / driver / rc.h
index e9542ca..9708ea7 100644 (file)
@@ -41,7 +41,7 @@ public:
         * 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.
@@ -95,7 +95,7 @@ class eRCShortDriver: public eRCDriver
 {
 protected:
        int handle;
-       eSocketNotifier *sn;
+       ePtr<eSocketNotifier> sn;
        void keyPressed(int);
 public:
        eRCShortDriver(const char *filename);
@@ -106,7 +106,7 @@ class eRCInputEventDriver: public eRCDriver
 {
 protected:
        int handle;
-       eSocketNotifier *sn;
+       ePtr<eSocketNotifier> sn;
        void keyPressed(int);
 public:
        std::string getDeviceName();
@@ -126,10 +126,15 @@ public:
        }
        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)
@@ -215,10 +220,6 @@ public:
           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)
        {
@@ -232,6 +233,9 @@ public:
 
        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();