* [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* [PATCH v2 2/2] phonesim: Add GET_INPUT test case
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 ` 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
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Nunes @ 2012-08-28 13:24 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2190 bytes --]
This test case is used to check the immediate digit response flag.
---
src/conformancesimapplication.cpp | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/conformancesimapplication.cpp b/src/conformancesimapplication.cpp
index baf3538..a2bd3af 100644
--- a/src/conformancesimapplication.cpp
+++ b/src/conformancesimapplication.cpp
@@ -81,11 +81,12 @@ const QString ConformanceSimApplication::getName()
#define GetInkeyMenu_Cyrillic_Display_2 4
#define GetInkeyMenu_Cyrillic_Entry 5
#define GetInkeyMenu_YesNo_Response 6
-#define GetInkeyMenu_Icon 7
-#define GetInkeyMenu_Help 8
-#define GetInkeyMenu_Variable_Timeout 9
-#define GetInkeyMenu_Text_Attribute 10
-#define GetInkeyMenu_Main 11
+#define GetInkeyMenu_ImmediateResponse 7
+#define GetInkeyMenu_Icon 8
+#define GetInkeyMenu_Help 9
+#define GetInkeyMenu_Variable_Timeout 10
+#define GetInkeyMenu_Text_Attribute 11
+#define GetInkeyMenu_Main 12
#define GetInputMenu_Normal 1
#define GetInputMenu_No_Response 2
@@ -677,6 +678,10 @@ void ConformanceSimApplication::sendGetInkeyMenu()
item.setLabel( "Yes/No response for the input" );
items += item;
+ item.setIdentifier( GetInkeyMenu_ImmediateResponse );
+ item.setLabel( "Immediate response for the digit input" );
+ items += item;
+
item.setIdentifier( GetInkeyMenu_Icon );
item.setLabel( "Display of icon" );
items += item;
@@ -887,6 +892,16 @@ void ConformanceSimApplication::GetInkeyMenu( const QSimTerminalResponse& resp )
}
break;
+ case GetInkeyMenu_ImmediateResponse:
+ {
+ cmd.setType( QSimCommand::GetInkey );
+ cmd.setDestinationDevice( QSimCommand::ME );
+ cmd.setWantImmediateResponse( true );
+ cmd.setText( "Enter 1" );
+ command( cmd, this, SLOT(sendGetInkeyMenu()) );
+ }
+ break;
+
case GetInkeyMenu_Icon:
{
sendGetInkeyIconMenu();
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2 1/2] phonesim: Add methods to handle the 'immediate digit response' flag
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:34 ` Denis Kenzior
1 sibling, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2012-08-28 14:34 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Hi Philippe,
On 08/28/2012 08:24 AM, Philippe Nunes wrote:
> ---
> src/qsimcommand.cpp | 30 ++++++++++++++++++++++++++++++
> src/qsimcommand.h | 3 +++
> 2 files changed, 33 insertions(+)
>
Patch has been applied, however I had to re-write the overly long commit
header. Please limit all commit headers to 72 characters or less.
Regards,
-Denis
^ permalink raw reply [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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.