Diffstat (limited to 'noncore/apps/opie-console/io_serial.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/io_serial.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp index e6d1688..0540d9e 100644 --- a/noncore/apps/opie-console/io_serial.cpp +++ b/noncore/apps/opie-console/io_serial.cpp @@ -204,3 +204,25 @@ QBitArray IOSerial::supports()const { bool IOSerial::isConnected() { return m_connected; } + +/* + * this is used to give the + * class below IOSerial + * the possibility of + * exclusive usage + */ +void IOSerial::internDetach() { + if (m_read ) + disconnect(m_read, SIGNAL(activated(int)), this, SLOT(dataArrived())); + if (m_error ) + disconnect(m_error, SIGNAL(activated(int)), this, SLOT(errorOccured())); +} +/* + * give power back + */ +void IOSerial::internAttach() { + if (m_read ) + connect(m_read, SIGNAL(activated(int)), this, SLOT(dataArrived())); + if (m_error ) + connect(m_error, SIGNAL(activated(int)), this, SLOT(errorOccured())); +} |