summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib/startdunconnection.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/lib/startdunconnection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/startdunconnection.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/net/opietooth/lib/startdunconnection.cpp b/noncore/net/opietooth/lib/startdunconnection.cpp
index c3850eb..90ef04a 100644
--- a/noncore/net/opietooth/lib/startdunconnection.cpp
+++ b/noncore/net/opietooth/lib/startdunconnection.cpp
@@ -1,18 +1,20 @@
1 1
2#include "startdunconnection.h" 2#include "startdunconnection.h"
3 3
4using namespace OpieTooth; 4using namespace OpieTooth;
5 5
6 6
7using namespace Opie::Core;
8using namespace Opie::Core;
7StartDunConnection::StartDunConnection() { 9StartDunConnection::StartDunConnection() {
8 m_dunConnect = 0l; 10 m_dunConnect = 0l;
9 setConnectionType(); 11 setConnectionType();
10} 12}
11 13
12StartDunConnection::~StartDunConnection() { 14StartDunConnection::~StartDunConnection() {
13 delete m_dunConnect; 15 delete m_dunConnect;
14} 16}
15 17
16StartDunConnection::StartDunConnection( QString mac ) { 18StartDunConnection::StartDunConnection( QString mac ) {
17 m_dunConnect = 0l; 19 m_dunConnect = 0l;
18 m_mac = mac; 20 m_mac = mac;
@@ -30,27 +32,27 @@ QString StartDunConnection::name() {
30void StartDunConnection::setConnectionType() { 32void StartDunConnection::setConnectionType() {
31 m_connectionType = Pan; 33 m_connectionType = Pan;
32} 34}
33 35
34StartConnection::ConnectionType StartDunConnection::type() { 36StartConnection::ConnectionType StartDunConnection::type() {
35 return m_connectionType; 37 return m_connectionType;
36} 38}
37 39
38void StartDunConnection::start() { 40void StartDunConnection::start() {
39 m_dunConnect = new OProcess(); 41 m_dunConnect = new OProcess();
40 *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac; 42 *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac;
41 43
42 connect( m_dunConnect, SIGNAL( processExited(OProcess*) ) , 44 connect( m_dunConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) ,
43 this, SLOT( slotExited(OProcess*) ) ); 45 this, SLOT( slotExited(OProcess*) ) );
44 connect( m_dunConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), 46 connect( m_dunConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ),
45 this, SLOT( slotStdOut(OProcess*,char*,int) ) ); 47 this, SLOT( slotStdOut(OProcess*,char*,int) ) );
46 if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { 48 if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) {
47 qWarning( "could not start" ); 49 qWarning( "could not start" );
48 delete m_dunConnect; 50 delete m_dunConnect;
49 } 51 }
50} 52}
51 53
52 54
53void StartDunConnection::slotExited( OProcess* proc ) { 55void StartDunConnection::slotExited( OProcess* proc ) {
54 delete m_dunConnect; 56 delete m_dunConnect;
55} 57}
56 58