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