Open Source Telephony
 help / color / mirror / Atom feed
From: Philippe Nunes <philippe.nunes@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH v2 1/2] phonesim: Add methods to handle the 'immediate digit response' flag
Date: Tue, 28 Aug 2012 15:24:57 +0200	[thread overview]
Message-ID: <1346160298-11307-1-git-send-email-philippe.nunes@linux.intel.com> (raw)

[-- 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


             reply	other threads:[~2012-08-28 13:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 13:24 Philippe Nunes [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346160298-11307-1-git-send-email-philippe.nunes@linux.intel.com \
    --to=philippe.nunes@linux.intel.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox