Merge branch 'bug_538_ignore_global_actions_in_standby'
[enigma2.git] / lib / driver / rc.h
index e9542ca8facdea18cb5fa2ed580894eafd5d207e..529094682a27472f31a22efc771648f77dd6ee28 100644 (file)
@@ -41,7 +41,7 @@ public:
         * For Example, it might be 16bit codes with one bit make/break or special codes
         * for repeat.
         */
         * 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.
        /**
         * \brief Get user readable description.
         * \result The description.
@@ -53,6 +53,7 @@ public:
         * \param key The key to get the description for.
         * \result User readable description of given key.
         */
         * \param key The key to get the description for.
         * \result User readable description of given key.
         */
+       virtual void setExclusive(bool b) { };
 };
 
 /**
 };
 
 /**
@@ -89,13 +90,14 @@ public:
        ~eRCDriver();
        
        void enable(int en) { enabled=en; }
        ~eRCDriver();
        
        void enable(int en) { enabled=en; }
+       virtual void setExclusive(bool) { }
 };
 
 class eRCShortDriver: public eRCDriver
 {
 protected:
        int handle;
 };
 
 class eRCShortDriver: public eRCDriver
 {
 protected:
        int handle;
-       eSocketNotifier *sn;
+       ePtr<eSocketNotifier> sn;
        void keyPressed(int);
 public:
        eRCShortDriver(const char *filename);
        void keyPressed(int);
 public:
        eRCShortDriver(const char *filename);
@@ -106,12 +108,13 @@ class eRCInputEventDriver: public eRCDriver
 {
 protected:
        int handle;
 {
 protected:
        int handle;
-       eSocketNotifier *sn;
+       ePtr<eSocketNotifier> sn;
        void keyPressed(int);
 public:
        std::string getDeviceName();
        eRCInputEventDriver(const char *filename);
        ~eRCInputEventDriver();
        void keyPressed(int);
 public:
        std::string getDeviceName();
        eRCInputEventDriver(const char *filename);
        ~eRCInputEventDriver();
+       void setExclusive(bool b); // in exclusive mode data is not carried to console device
 };
 
 class eRCKey
 };
 
 class eRCKey
@@ -126,10 +129,15 @@ public:
        }
        enum
        {
        }
        enum
        {
+                       /* there are not really flags.. */
+               flagMake=0,
                flagBreak=1,
                flagBreak=1,
-               flagRepeat=2
+               flagRepeat=2,
+               flagLong=3,
+                       /* but this is. */
+               flagAscii=4,
        };
        };
-       
+
        bool operator<(const eRCKey &r) const
        {
                if (r.producer == producer)
        bool operator<(const eRCKey &r) const
        {
                if (r.producer == producer)
@@ -168,7 +176,6 @@ public:
 class eRCInput: public Object
 {
        int locked;     
 class eRCInput: public Object
 {
        int locked;     
-       int handle;
        static eRCInput *instance;
        int keyboardMode;
 #ifdef SWIG
        static eRCInput *instance;
        int keyboardMode;
 #ifdef SWIG
@@ -194,8 +201,6 @@ public:
        void close();
        bool open();
 
        void close();
        bool open();
 
-       void setFile(int handle);
-
        /* This is only relevant for "keyboard"-styled input devices,
           i.e. not plain remote controls. It's up to the input device
           driver to decide wheter an input device is a keyboard or
        /* This is only relevant for "keyboard"-styled input devices,
           i.e. not plain remote controls. It's up to the input device
           driver to decide wheter an input device is a keyboard or
@@ -215,10 +220,6 @@ public:
           lock the console and pass this as the console fd for making the
           tc* stuff working.
        */
           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 keyPressed(const eRCKey &key)
        {
@@ -232,8 +233,11 @@ public:
 
        eRCConfig config;
 #endif
 
        eRCConfig config;
 #endif
+       enum { kmNone, kmAscii, kmAll };
+       void setKeyboardMode(int mode) { keyboardMode = mode; }
+       int  getKeyboardMode() { return keyboardMode; }
        static eRCInput *getInstance() { return instance; }
        static eRCInput *getInstance() { return instance; }
-       int lock();
+       void lock();
        void unlock();
        int islocked() { return locked; }
 };
        void unlock();
        int islocked() { return locked; }
 };