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.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp index c102427..a06b0c4 100644 --- a/noncore/apps/opie-console/io_bt.cpp +++ b/noncore/apps/opie-console/io_bt.cpp | |||
@@ -1,13 +1,9 @@ | |||
1 | 1 | ||
2 | #include "io_bt.h" | 2 | #include "io_bt.h" |
3 | 3 | ||
4 | /* OPIE */ | ||
5 | #include <opie2/odebug.h> | ||
6 | using namespace Opie::Core; | ||
7 | |||
8 | IOBt::IOBt( const Profile &config ) : IOSerial( config ) { | 4 | IOBt::IOBt( const Profile &config ) : IOSerial( config ) { |
9 | m_attach = 0; | 5 | m_attach = 0; |
10 | } | 6 | } |
11 | 7 | ||
12 | 8 | ||
13 | IOBt::~IOBt() { | 9 | IOBt::~IOBt() { |
@@ -32,24 +28,23 @@ bool IOBt::open() { | |||
32 | 28 | ||
33 | // only set up bt stuff if mac address was set, otherwise use the device set | 29 | // only set up bt stuff if mac address was set, otherwise use the device set |
34 | if ( !m_mac.isEmpty() ) { | 30 | if ( !m_mac.isEmpty() ) { |
35 | 31 | ||
36 | // now it should also be checked, if there is a connection to the device with that mac allready | 32 | // now it should also be checked, if there is a connection to the device with that mac allready |
37 | // hciattach here | 33 | // hciattach here |
38 | m_attach = new OProcess(); | 34 | m_attach = new Opie::Core::OProcess(); |
39 | *m_attach << "hciattach /dev/ttyS2 any 57600"; | 35 | *m_attach << "hciattach /dev/ttyS2 any 57600"; |
40 | 36 | ||
41 | // then start hcid, then rcfomm handling (m_mac) | 37 | // then start hcid, then rcfomm handling (m_mac) |
42 | 38 | ||
43 | connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), | 39 | connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), |
44 | this, SLOT( slotExited(Opie::Core::OProcess*) ) ); | 40 | this, SLOT( slotExited(Opie::Core::OProcess*) ) ); |
45 | 41 | ||
46 | if ( m_attach->start() ) { | 42 | if ( m_attach->start() ) { |
47 | ret = IOSerial::open(); | 43 | ret = IOSerial::open(); |
48 | } else { | 44 | } else { |
49 | owarn << "could not attach to device" << oendl; | ||
50 | delete m_attach; | 45 | delete m_attach; |
51 | m_attach = 0; | 46 | m_attach = 0; |
52 | } | 47 | } |
53 | } else { | 48 | } else { |
54 | // directly to the normal serial | 49 | // directly to the normal serial |
55 | // TODO: look first if the connection really exists. ( is set up ) | 50 | // TODO: look first if the connection really exists. ( is set up ) |
@@ -75,22 +70,10 @@ QString IOBt::identifier() const { | |||
75 | } | 70 | } |
76 | 71 | ||
77 | QString IOBt::name() const { | 72 | QString IOBt::name() const { |
78 | return "BLuetooth IO Layer"; | 73 | return "BLuetooth IO Layer"; |
79 | } | 74 | } |
80 | 75 | ||
81 | void IOBt::slotExited( OProcess* proc ){ | 76 | void IOBt::slotExited( Opie::Core::OProcess* proc ){ |
82 | close(); | 77 | close(); |
83 | delete proc; | 78 | delete proc; |
84 | } | 79 | } |
85 | |||
86 | QBitArray IOBt::supports() const { | ||
87 | return QBitArray( 3 ); | ||
88 | } | ||
89 | |||
90 | bool IOBt::isConnected() { | ||
91 | return false; | ||
92 | } | ||
93 | |||
94 | void IOBt::send(const QByteArray &data) { | ||
95 | odebug << "Please overload me..." << oendl; | ||
96 | } | ||