summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib/startpanconnection.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/lib/startpanconnection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/startpanconnection.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp
index 6e0ab7e..a42b407 100644
--- a/noncore/net/opietooth/lib/startpanconnection.cpp
+++ b/noncore/net/opietooth/lib/startpanconnection.cpp
@@ -19,64 +19,64 @@ StartPanConnection::StartPanConnection( QString mac ) {
19 setConnectionType(); 19 setConnectionType();
20} 20}
21 21
22void StartPanConnection::setName( QString name ) { 22void StartPanConnection::setName( QString name ) {
23 m_name = name; 23 m_name = name;
24} 24}
25 25
26QString StartPanConnection::name() { 26QString StartPanConnection::name() {
27 return m_name; 27 return m_name;
28} 28}
29 29
30void StartPanConnection::setConnectionType() { 30void StartPanConnection::setConnectionType() {
31 m_connectionType = Pan; 31 m_connectionType = Pan;
32} 32}
33 33
34StartConnection::ConnectionType StartPanConnection::type() { 34StartConnection::ConnectionType StartPanConnection::type() {
35 return m_connectionType; 35 return m_connectionType;
36} 36}
37 37
38void StartPanConnection::start() { 38void StartPanConnection::start() {
39 m_panConnect = new OProcess(); 39 m_panConnect = new OProcess();
40 qDebug( "IM START " + m_mac ); 40 qDebug( "IM START " + m_mac );
41 *m_panConnect << "pand" << "--connect" << m_mac; 41 *m_panConnect << "pand" << "--connect" << m_mac;
42 42
43 connect( m_panConnect, SIGNAL( processExited( OProcess* ) ) , 43 connect( m_panConnect, SIGNAL( processExited(OProcess*) ) ,
44 this, SLOT( slotExited( OProcess* ) ) ); 44 this, SLOT( slotExited(OProcess*) ) );
45 connect( m_panConnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ), 45 connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ),
46 this, SLOT( slotStdOut( OProcess*, char*, int ) ) ); 46 this, SLOT( slotStdOut(OProcess*,char*,int) ) );
47 if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { 47 if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) {
48 qWarning( "could not start" ); 48 qWarning( "could not start" );
49 delete m_panConnect; 49 delete m_panConnect;
50 } 50 }
51} 51}
52 52
53 53
54void StartPanConnection::slotExited( OProcess* proc ) { 54void StartPanConnection::slotExited( OProcess* proc ) {
55 delete m_panConnect; 55 delete m_panConnect;
56 m_panConnect = 0l; 56 m_panConnect = 0l;
57} 57}
58 58
59void StartPanConnection::slotStdOut(OProcess* proc, char* chars, int len) 59void StartPanConnection::slotStdOut(OProcess* proc, char* chars, int len)
60{} 60{}
61 61
62 62
63void StartPanConnection::stop() { 63void StartPanConnection::stop() {
64 if ( m_panConnect ) { 64 if ( m_panConnect ) {
65 delete m_panConnect; 65 delete m_panConnect;
66 m_panConnect = 0l; 66 m_panConnect = 0l;
67 } 67 }
68 m_panConnect = new OProcess(); 68 m_panConnect = new OProcess();
69 qDebug("IM STOP " + m_mac); 69 qDebug("IM STOP " + m_mac);
70 70
71 *m_panConnect << "pand" << "--kill" << m_mac; 71 *m_panConnect << "pand" << "--kill" << m_mac;
72 72
73 connect( m_panConnect, SIGNAL( processExited( OProcess* ) ) , 73 connect( m_panConnect, SIGNAL( processExited(OProcess*) ) ,
74 this, SLOT( slotExited( OProcess* ) ) ); 74 this, SLOT( slotExited(OProcess*) ) );
75 connect( m_panConnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ), 75 connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ),
76 this, SLOT( slotStdOut( OProcess*, char*, int ) ) ); 76 this, SLOT( slotStdOut(OProcess*,char*,int) ) );
77 if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { 77 if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) {
78 qWarning( "could not stop" ); 78 qWarning( "could not stop" );
79 delete m_panConnect; 79 delete m_panConnect;
80 } 80 }
81} 81}
82 82