Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH v2 1/2] phonesim: Add methods to handle the 'immediate digit response' flag
@ 2012-08-28 13:24 Philippe Nunes
  2012-08-28 13:24 ` [PATCH v2 2/2] phonesim: Add GET_INPUT test case Philippe Nunes
  2012-08-28 14:34 ` [PATCH v2 1/2] phonesim: Add methods to handle the 'immediate digit response' flag Denis Kenzior
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Nunes @ 2012-08-28 13:24 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]

---
 src/qsimcommand.cpp |   30 ++++++++++++++++++++++++++++++
 src/qsimcommand.h   |    3 +++
 2 files changed, 33 insertions(+)

diff --git a/src/qsimcommand.cpp b/src/qsimcommand.cpp
index f5dbdf2..97e0b28 100644
--- a/src/qsimcommand.cpp
+++ b/src/qsimcommand.cpp
@@ -1312,6 +1312,36 @@ void QSimCommand::setWantYesNo( bool value )
 
 
 /*!
+    Returns true if \c GetInkey wants that the response is immediately sent
+    after key press.  The default value is false.
+
+    Applies to: \c GetInkey
+
+    \sa setWantImmediateResponse()
+*/
+bool QSimCommand::wantImmediateResponse() const
+{
+    if ( d->type == QSimCommand::GetInkey )
+        return d->qualifierBit( 0x08 );
+    else
+        return false;
+}
+
+/*!
+    Sets the flag that determines if \c GetInkey wants that
+    the response is immediately sent after key press.
+
+    Applies to: \c GetInkey
+
+    \sa wantImmediateResponse()
+*/
+void QSimCommand::setWantImmediateResponse( bool value )
+{
+    if ( d->type == QSimCommand::GetInkey )
+        dwrite()->setQualifierBit( 0x08, value );
+}
+
+/*!
     Returns the minimum text length for input.  The default value is 0.
 
     Applies to: \c GetInput.
diff --git a/src/qsimcommand.h b/src/qsimcommand.h
index 3b34be9..2c1b423 100644
--- a/src/qsimcommand.h
+++ b/src/qsimcommand.h
@@ -292,6 +292,9 @@ public:
     bool echo() const;
     void setEcho( bool value );
 
+    bool wantImmediateResponse() const;
+    void setWantImmediateResponse( bool value );
+
     QSimCommand::Disposition disposition() const;
     void setDisposition( QSimCommand::Disposition value );
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-28 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-28 13:24 [PATCH v2 1/2] phonesim: Add methods to handle the 'immediate digit response' flag Philippe Nunes
2012-08-28 13:24 ` [PATCH v2 2/2] phonesim: Add GET_INPUT test case Philippe Nunes
2012-08-28 14:35   ` Denis Kenzior
2012-08-28 14:34 ` [PATCH v2 1/2] phonesim: Add methods to handle the 'immediate digit response' flag Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox