diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2004-10-01 13:21:35 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2004-10-01 13:21:35 +0000 |
| commit | ddc3964ed95d01e72229dc9af968a327cd84e56c (patch) | |
| tree | 93e6694c639db3d188f5b2868f6b2b2951d21d60 /lib/driver | |
| parent | 1aeefd997cc362c3b37c1587c5f08891b35c3a75 (diff) | |
| download | enigma2-ddc3964ed95d01e72229dc9af968a327cd84e56c.tar.gz enigma2-ddc3964ed95d01e72229dc9af968a327cd84e56c.zip | |
- add python, missing gui
- remove console (needs to be rewritten anyway)
- eString -> std::string
Diffstat (limited to 'lib/driver')
| -rw-r--r-- | lib/driver/rc.cpp | 18 | ||||
| -rw-r--r-- | lib/driver/rc.h | 22 | ||||
| -rw-r--r-- | lib/driver/rcinput.cpp | 2 |
3 files changed, 22 insertions, 20 deletions
diff --git a/lib/driver/rc.cpp b/lib/driver/rc.cpp index 790c5f6c..39206512 100644 --- a/lib/driver/rc.cpp +++ b/lib/driver/rc.cpp @@ -40,7 +40,7 @@ int eRCDevice::getKeyCompatibleCode(const eRCKey &) const return -1; } -eRCDevice::eRCDevice(eString id, eRCDriver *driver): driver(driver), id(id) +eRCDevice::eRCDevice(std::string id, eRCDriver *driver): driver(driver), id(id) { input=driver->getInput(); driver->addCodeListener(this); @@ -127,7 +127,7 @@ eRCInputEventDriver::eRCInputEventDriver(const char *filename): eRCDriver(eRCInp } } -eString eRCInputEventDriver::getDeviceName() +std::string eRCInputEventDriver::getDeviceName() { char name[128]=""; if (handle >= 0) @@ -214,30 +214,30 @@ void eRCInput::setFile(int newh) handle=newh; } -void eRCInput::addDevice(const eString &id, eRCDevice *dev) +void eRCInput::addDevice(const std::string &id, eRCDevice *dev) { - devices.insert(std::pair<eString,eRCDevice*>(id, dev)); + devices.insert(std::pair<std::string,eRCDevice*>(id, dev)); } -void eRCInput::removeDevice(const eString &id) +void eRCInput::removeDevice(const std::string &id) { devices.erase(id); } -eRCDevice *eRCInput::getDevice(const eString &id) +eRCDevice *eRCInput::getDevice(const std::string &id) { - std::map<eString,eRCDevice*>::iterator i=devices.find(id); + std::map<std::string,eRCDevice*>::iterator i=devices.find(id); if (i == devices.end()) { eDebug("failed, possible choices are:"); - for (std::map<eString,eRCDevice*>::iterator i=devices.begin(); i != devices.end(); ++i) + for (std::map<std::string,eRCDevice*>::iterator i=devices.begin(); i != devices.end(); ++i) eDebug("%s", i->first.c_str()); return 0; } return i->second; } -std::map<eString,eRCDevice*,eRCInput::lstr> &eRCInput::getDevices() +std::map<std::string,eRCDevice*,eRCInput::lstr> &eRCInput::getDevices() { return devices; } diff --git a/lib/driver/rc.h b/lib/driver/rc.h index 557be5ea..8d932f8e 100644 --- a/lib/driver/rc.h +++ b/lib/driver/rc.h @@ -6,7 +6,7 @@ #include <lib/base/ebase.h> #include <libsig_comp.h> -#include <lib/base/estring.h> +#include <string> class eRCInput; class eRCDriver; @@ -22,7 +22,7 @@ class eRCDevice: public Object protected: eRCInput *input; eRCDriver *driver; - eString id; + std::string id; public: /** * \brief Constructs a new remote control. @@ -30,7 +30,7 @@ public: * \param id The identifier of the RC, for use in settings. * \param input The \ref eRCDriver where this remote gets its codes from. */ - eRCDevice(eString id, eRCDriver *input); + eRCDevice(std::string id, eRCDriver *input); ~eRCDevice(); /** * \brief Handles a device specific code. @@ -45,7 +45,7 @@ public: * \result The description. */ virtual const char *getDescription() const=0; - const eString getIdentifier() const { return id; } + const std::string getIdentifier() const { return id; } /** * \brief Get a description for a specific key. * \param key The key to get the description for. @@ -116,7 +116,7 @@ protected: eSocketNotifier *sn; void keyPressed(int); public: - eString getDeviceName(); + std::string getDeviceName(); eRCInputEventDriver(const char *filename); ~eRCInputEventDriver(); }; @@ -179,13 +179,13 @@ class eRCInput: public Object public: struct lstr { - bool operator()(const eString &a, const eString &b) const + bool operator()(const std::string &a, const std::string &b) const { return a<b; } }; protected: - std::map<eString,eRCDevice*,lstr> devices; + std::map<std::string,eRCDevice*,lstr> devices; public: Signal1<void, const eRCKey&> keyEvent; enum @@ -213,10 +213,10 @@ public: /*emit*/ keyEvent(key); } - void addDevice(const eString &id, eRCDevice *dev); - void removeDevice(const eString &id); - eRCDevice *getDevice(const eString &id); - std::map<eString,eRCDevice*,lstr> &getDevices(); + void addDevice(const std::string &id, eRCDevice *dev); + void removeDevice(const std::string &id); + eRCDevice *getDevice(const std::string &id); + std::map<std::string,eRCDevice*,lstr> &getDevices(); static eRCInput *getInstance() { return instance; } diff --git a/lib/driver/rcinput.cpp b/lib/driver/rcinput.cpp index 041330a1..94ce3ebe 100644 --- a/lib/driver/rcinput.cpp +++ b/lib/driver/rcinput.cpp @@ -1,5 +1,7 @@ #include <lib/driver/rcinput.h> +#include <lib/base/eerror.h> + #include <sys/ioctl.h> #include <linux/input.h> #include <sys/stat.h> |
