summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_irda.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/io_irda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_irda.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp
index b281b7d..ba0b0e5 100644
--- a/noncore/apps/opie-console/io_irda.cpp
+++ b/noncore/apps/opie-console/io_irda.cpp
@@ -1,54 +1,56 @@
1 1
2#include "io_irda.h" 2#include "io_irda.h"
3 3
4using namespace Opie::Core;
5using namespace Opie::Core;
4IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { 6IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) {
5 m_attach = 0; 7 m_attach = 0;
6} 8}
7 9
8 10
9IOIrda::~IOIrda() { 11IOIrda::~IOIrda() {
10 if ( m_attach ) { 12 if ( m_attach ) {
11 delete m_attach; 13 delete m_attach;
12 } 14 }
13} 15}
14 16
15 17
16void IOIrda::close() { 18void IOIrda::close() {
17 19
18 IOSerial::close(); 20 IOSerial::close();
19 // still need error handling 21 // still need error handling
20 delete m_attach; 22 delete m_attach;
21} 23}
22 24
23bool IOIrda::open() { 25bool IOIrda::open() {
24 bool ret; 26 bool ret;
25 27
26 // irdaattach here 28 // irdaattach here
27 m_attach = new OProcess(); 29 m_attach = new OProcess();
28 *m_attach << "irattach /dev/ttyS2 -s"; 30 *m_attach << "irattach /dev/ttyS2 -s";
29 31
30 connect( m_attach, SIGNAL( processExited(OProcess*) ), 32 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ),
31 this, SLOT( slotExited(OProcess*) ) ); 33 this, SLOT( slotExited(OProcess*) ) );
32 34
33 if ( m_attach->start() ) { 35 if ( m_attach->start() ) {
34 ret= IOSerial::open(); 36 ret= IOSerial::open();
35 } else { 37 } else {
36 // emit error!!! 38 // emit error!!!
37 qWarning("could not attach to device"); 39 qWarning("could not attach to device");
38 delete m_attach; 40 delete m_attach;
39 m_attach = 0l; 41 m_attach = 0l;
40 } 42 }
41 return ret; 43 return ret;
42} 44}
43 45
44void IOIrda::reload( const Profile &config ) { 46void IOIrda::reload( const Profile &config ) {
45 m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE); 47 m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE);
46 m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD); 48 m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD);
47 m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY); 49 m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY);
48 m_dbits = config.readNumEntry("DataBits", IRDA_DEFAULT_DBITS); 50 m_dbits = config.readNumEntry("DataBits", IRDA_DEFAULT_DBITS);
49 m_sbits = config.readNumEntry("StopBits", IRDA_DEFAULT_SBITS); 51 m_sbits = config.readNumEntry("StopBits", IRDA_DEFAULT_SBITS);
50 m_flow = config.readNumEntry("Flow", IRDA_DEFAULT_FLOW); 52 m_flow = config.readNumEntry("Flow", IRDA_DEFAULT_FLOW);
51} 53}
52 54
53 55
54QString IOIrda::identifier() const { 56QString IOIrda::identifier() const {