Diffstat (limited to 'noncore/apps/opie-console/io_irda.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/io_irda.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp index 9d27c85..a0f72ae 100644 --- a/noncore/apps/opie-console/io_irda.cpp +++ b/noncore/apps/opie-console/io_irda.cpp | |||
@@ -14,48 +14,49 @@ IOIrda::~IOIrda() { | |||
14 | 14 | ||
15 | void IOIrda::close() { | 15 | void IOIrda::close() { |
16 | 16 | ||
17 | IOSerial::close(); | 17 | IOSerial::close(); |
18 | // still need error handling | 18 | // still need error handling |
19 | delete m_attach; | 19 | delete m_attach; |
20 | } | 20 | } |
21 | 21 | ||
22 | bool IOIrda::open() { | 22 | bool IOIrda::open() { |
23 | bool ret; | 23 | bool ret; |
24 | 24 | ||
25 | // irdaattach here | 25 | // irdaattach here |
26 | m_attach = new Opie::Core::OProcess(); | 26 | m_attach = new Opie::Core::OProcess(); |
27 | *m_attach << "irattach /dev/ttyS2 -s"; | 27 | *m_attach << "irattach /dev/ttyS2 -s"; |
28 | 28 | ||
29 | connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), | 29 | connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), |
30 | this, SLOT( slotExited(Opie::Core::OProcess*) ) ); | 30 | this, SLOT( slotExited(Opie::Core::OProcess*) ) ); |
31 | 31 | ||
32 | if ( m_attach->start() ) { | 32 | if ( m_attach->start() ) { |
33 | ret= IOSerial::open(); | 33 | ret= IOSerial::open(); |
34 | } else { | 34 | } else { |
35 | // emit error!!! | 35 | // emit error!!! |
36 | delete m_attach; | 36 | delete m_attach; |
37 | m_attach = 0l; | 37 | m_attach = 0l; |
38 | ret = false; | ||
38 | } | 39 | } |
39 | return ret; | 40 | return ret; |
40 | } | 41 | } |
41 | 42 | ||
42 | void IOIrda::reload( const Profile &config ) { | 43 | void IOIrda::reload( const Profile &config ) { |
43 | m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE); | 44 | m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE); |
44 | m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD); | 45 | m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD); |
45 | m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY); | 46 | m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY); |
46 | m_dbits = config.readNumEntry("DataBits", IRDA_DEFAULT_DBITS); | 47 | m_dbits = config.readNumEntry("DataBits", IRDA_DEFAULT_DBITS); |
47 | m_sbits = config.readNumEntry("StopBits", IRDA_DEFAULT_SBITS); | 48 | m_sbits = config.readNumEntry("StopBits", IRDA_DEFAULT_SBITS); |
48 | m_flow = config.readNumEntry("Flow", IRDA_DEFAULT_FLOW); | 49 | m_flow = config.readNumEntry("Flow", IRDA_DEFAULT_FLOW); |
49 | } | 50 | } |
50 | 51 | ||
51 | 52 | ||
52 | QString IOIrda::identifier() const { | 53 | QString IOIrda::identifier() const { |
53 | return "irda"; | 54 | return "irda"; |
54 | } | 55 | } |
55 | 56 | ||
56 | QString IOIrda::name() const { | 57 | QString IOIrda::name() const { |
57 | return "Irda IO Layer"; | 58 | return "Irda IO Layer"; |
58 | } | 59 | } |
59 | 60 | ||
60 | void IOIrda::slotExited(Opie::Core::OProcess* proc ){ | 61 | void IOIrda::slotExited(Opie::Core::OProcess* proc ){ |
61 | close(); | 62 | close(); |