summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_bt.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/io_bt.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_bt.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp
index 1a8c979..35a328f 100644
--- a/noncore/apps/opie-console/io_bt.cpp
+++ b/noncore/apps/opie-console/io_bt.cpp
@@ -1,15 +1,17 @@
1 1
2#include "io_bt.h" 2#include "io_bt.h"
3 3
4using namespace Opie::Core;
5using namespace Opie::Core;
4IOBt::IOBt( const Profile &config ) : IOSerial( config ) { 6IOBt::IOBt( const Profile &config ) : IOSerial( config ) {
5 m_attach = 0; 7 m_attach = 0;
6} 8}
7 9
8 10
9IOBt::~IOBt() { 11IOBt::~IOBt() {
10 if ( m_attach ) { 12 if ( m_attach ) {
11 delete m_attach; 13 delete m_attach;
12 } 14 }
13} 15}
14 16
15 17
@@ -27,25 +29,25 @@ bool IOBt::open() {
27 bool ret = false; 29 bool ret = false;
28 30
29 // only set up bt stuff if mac address was set, otherwise use the device set 31 // only set up bt stuff if mac address was set, otherwise use the device set
30 if ( !m_mac.isEmpty() ) { 32 if ( !m_mac.isEmpty() ) {
31 33
32 // now it should also be checked, if there is a connection to the device with that mac allready 34 // now it should also be checked, if there is a connection to the device with that mac allready
33 // hciattach here 35 // hciattach here
34 m_attach = new OProcess(); 36 m_attach = new OProcess();
35 *m_attach << "hciattach /dev/ttyS2 any 57600"; 37 *m_attach << "hciattach /dev/ttyS2 any 57600";
36 38
37 // then start hcid, then rcfomm handling (m_mac) 39 // then start hcid, then rcfomm handling (m_mac)
38 40
39 connect( m_attach, SIGNAL( processExited(OProcess*) ), 41 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ),
40 this, SLOT( slotExited(OProcess*) ) ); 42 this, SLOT( slotExited(OProcess*) ) );
41 43
42 if ( m_attach->start() ) { 44 if ( m_attach->start() ) {
43 ret = IOSerial::open(); 45 ret = IOSerial::open();
44 } else { 46 } else {
45 qWarning("could not attach to device"); 47 qWarning("could not attach to device");
46 delete m_attach; 48 delete m_attach;
47 m_attach = 0; 49 m_attach = 0;
48 } 50 }
49 } else { 51 } else {
50 // directly to the normal serial 52 // directly to the normal serial
51 // TODO: look first if the connection really exists. ( is set up ) 53 // TODO: look first if the connection really exists. ( is set up )