author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/apps/opie-console/dialer.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/apps/opie-console/dialer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/dialer.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp index 67ad10e..7010594 100644 --- a/noncore/apps/opie-console/dialer.cpp +++ b/noncore/apps/opie-console/dialer.cpp @@ -1,4 +1,10 @@ #include "dialer.h" +#include "io_modem.h" + +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; +/* QT */ #include <qlayout.h> #include <qprogressbar.h> @@ -9,4 +15,5 @@ #include <qmessagebox.h> +/* STD */ #include <unistd.h> #include <string.h> @@ -14,6 +21,4 @@ #include <errno.h> -#include "io_modem.h" - // State machine: | When an error occurs, we don't have to // | reset everything. @@ -105,5 +110,5 @@ void Dialer::slotCancel() void Dialer::reset() { - qWarning("reset"); + owarn << "reset" << oendl; switchState(state_cancel); } @@ -137,9 +142,9 @@ void Dialer::dial(const QString& number) void Dialer::trydial(const QString& number) { - qWarning("TryDial:%s", number.latin1() ); + owarn << "TryDial:" << number.latin1() << "" << oendl; if(state != state_cancel) switchState(state_preinit); if(cleanshutdown) { - qWarning("HangupString " + m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING)); + owarn << "HangupString " << m_profile.readEntry("HangupString") << oendl; send(m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ) + "\r"); } @@ -148,5 +153,5 @@ void Dialer::trydial(const QString& number) { switchState(state_init); -// qWarning("Init String " + m_profile.readEntry("InitString") ); +// owarn << "Init String " + m_profile.readEntry("InitString") << oendl; send(m_profile.readEntry("InitString",MODEM_DEFAULT_INIT_STRING ) + "\r"); QString response2 = receive(); @@ -159,5 +164,5 @@ void Dialer::trydial(const QString& number) switchState(state_options); - qWarning("ATM3l3"); + owarn << "ATM3l3" << oendl; send("ATM3L3\r"); QString response3 = receive(); @@ -179,5 +184,5 @@ void Dialer::trydial(const QString& number) if(state != state_cancel) { - qWarning("progress"); + owarn << "progress" << oendl; switchState(state_dialing); @@ -215,5 +220,5 @@ void Dialer::send(const QString& msg) QString termination; - qWarning("Sending: %s", m.latin1()); + owarn << "Sending: " << m.latin1() << "" << oendl; /* termination = "\r"; @@ -248,9 +253,9 @@ QString Dialer::receive() buffer[i] = buffer[i] & 0x7F; buffer[ret] = 0; - qWarning("Got: %s", buffer); + owarn << "Got: " << buffer << "" << oendl; buf.append(QString(buffer)); if(buf.contains("OK") || buf.contains("ERROR") || buf.contains("CONNECT") || (buf.contains("BUSY"))) { - //qWarning("Receiving: '%s'", buf.latin1()); + //owarn << "Receiving: '" << buf.latin1() << "'" << oendl; cleanshutdown = 1; return buf; |