summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorsamr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109>2008-10-20 09:20:17 +0000
committersamr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109>2008-10-20 09:20:17 +0000
commit8cbbf11def53d4dbfafc2652a798d2ba5de25702 (patch)
treec411663beac6da405d78f88e09a90c101e0c56fc /qt
parent91ce492958db5a000a39a26c47aacee6b198308e (diff)
downloadnohands-8cbbf11def53d4dbfafc2652a798d2ba5de25702.tar.gz
Add device probing to the SoundIoManager interface and net.sf.nohands.SoundIo
Add support for completion notification of HF->AG commands. Make D-Bus commands complete asynchronously and return errors from the AG. Improve completeness of supported HF->AG commands. Add complete parsers for CHLD modes and CIND/CCWA phone numbers. Add incoming call notification to hfconsole. Fix a handful of serious bugs, and probably add just as many back in. git-svn-id: http://nohands.svn.sourceforge.net/svnroot/nohands/trunk@7 126591fb-c623-4b62-a76d-97a8e4f34109
Diffstat (limited to 'qt')
-rw-r--r--qt/standalone.cpp32
1 files changed, 22 insertions, 10 deletions
diff --git a/qt/standalone.cpp b/qt/standalone.cpp
index 3567974..5a52bff 100644
--- a/qt/standalone.cpp
+++ b/qt/standalone.cpp
@@ -347,14 +347,17 @@ public:
if (sessp->HasWaitingCall()) {
agp->m_setup_cli =
sessp->WaitingCallIdentity()
- ? QString(sessp->WaitingCallIdentity())
+ ? QString(sessp->
+ WaitingCallIdentity()->
+ number)
: QString("");
printf("WCLI: %s\n",agp->m_setup_cli.latin1());
}
}
if (ring) {
- const char *clip = sessp->WaitingCallIdentity();
+ const char *clip = (sessp->WaitingCallIdentity() ?
+ sessp->WaitingCallIdentity()->number : 0);
if (!clip)
clip = "Private Number";
printf("Ring!! %s\n", clip);
@@ -1392,13 +1395,21 @@ public:
SoundCardRingTone();
}
+ bool DelPend(HfpPendingCommand *pendp) {
+ if (!pendp)
+ return false;
+
+ delete pendp;
+ return true;
+ }
+
/*
* Bluetooth Command Handling for the user interface
*/
virtual void KeypadPress(char c) {
if ((m_active_dev != NULL) &&
m_active_dev->m_sess->HasEstablishedCall()) {
- m_active_dev->m_sess->CmdSendDtmf(c);
+ DelPend(m_active_dev->m_sess->CmdSendDtmf(c));
}
}
virtual void KeypadClick(char c) {
@@ -1413,13 +1424,14 @@ public:
(m_active_dev != NULL) &&
m_active_dev->m_sess->GetService()) {
printf("Dial: %s\n", phoneNum.latin1());
- m_active_dev->m_sess->CmdDial(phoneNum.latin1());
+ DelPend(m_active_dev->m_sess->
+ CmdDial(phoneNum.latin1()));
}
}
virtual void RedialClicked(void) {
if ((m_active_dev != NULL) &&
m_active_dev->m_sess->GetService()) {
- m_active_dev->m_sess->CmdRedial();
+ DelPend(m_active_dev->m_sess->CmdRedial());
}
}
virtual void HandsetClicked(void) {
@@ -1431,20 +1443,20 @@ public:
MaybeAttachVoice();
}
virtual void HoldClicked(AgDevice *devp) {
- devp->m_sess->CmdCallSwapHoldActive();
+ DelPend(devp->m_sess->CmdCallSwapHoldActive());
}
virtual void HangupClicked(AgDevice *devp) {
- devp->m_sess->CmdHangUp();
+ DelPend(devp->m_sess->CmdHangUp());
}
virtual void AcceptCallClicked(AgDevice *devp) {
if (devp->m_sess->HasEstablishedCall()) {
- devp->m_sess->CmdCallSwapDropActive();
+ DelPend(devp->m_sess->CmdCallSwapDropActive());
} else {
- devp->m_sess->CmdAnswer();
+ DelPend(devp->m_sess->CmdAnswer());
}
}
virtual void RejectCallClicked(AgDevice *devp) {
- devp->m_sess->CmdCallDropWaiting();
+ DelPend(devp->m_sess->CmdCallDropHeldUdub());
}
/*