summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_serial.cpp
Side-by-side diff
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.cpp22
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
@@ -195,12 +195,34 @@ void IOSerial::closeRawIO(int fd) {
}
QBitArray IOSerial::supports()const {
QBitArray ar(3);
ar[0] = ar[2] = 0;
ar[1] = 1;
return ar;
}
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()));
+}