summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_irda.cpp
Unidiff
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.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,15 +1,17 @@
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
@@ -18,25 +20,25 @@ void IOIrda::close() {
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}