* [PATCH] phonesim: Simulate a Send DTMF command in sim app.
@ 2010-09-08 17:54 Andrzej Zaborowski
2010-09-09 14:29 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Andrzej Zaborowski @ 2010-09-08 17:54 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]
---
src/qsimcommand.cpp | 6 ++++--
src/simapplication.cpp | 23 +++++++++++++++++++++++
src/simapplication.h | 1 +
3 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/src/qsimcommand.cpp b/src/qsimcommand.cpp
index 770925f..9a9a169 100644
--- a/src/qsimcommand.cpp
+++ b/src/qsimcommand.cpp
@@ -815,7 +815,8 @@ void QSimCommand::setHasHelp( bool value )
Applies to: \c DisplayText, \c GetInkey, \c GetInput, \c SendSS, \c SendSMS,
\c SendUSSD, \c PlayTone, \c ServiceSearch, \c GetServiceInformation,
- \c RetrieveMultimediaMessage, \c SubmitMultimediaMessage.
+ \c RetrieveMultimediaMessage, \c SubmitMultimediaMessage, \c RunATCommand,
+ \c SendDTMF, \c LaunchBrowser, \c SetupIdleModeText, \c SetupCall.
\sa setText()
*/
@@ -830,7 +831,8 @@ QString QSimCommand::text() const
Applies to: \c DisplayText, \c GetInkey, \c GetInput, \c SendSS, \c SendSMS,
\c SendUSSD, \c PlayTone, \c ServiceSearch, \c GetServiceInformation,
- \c RetrieveMultimediaMessage, \c SubmitMultimediaMessage.
+ \c RetrieveMultimediaMessage, \c SubmitMultimediaMessage, \c RunATCommand,
+ \c SendDTMF, \c LaunchBrowser, \c SetupIdleModeText, \c SetupCall.
\sa text()
*/
diff --git a/src/simapplication.cpp b/src/simapplication.cpp
index fe6e183..6ca03d9 100644
--- a/src/simapplication.cpp
+++ b/src/simapplication.cpp
@@ -279,6 +279,7 @@ const QString DemoSimApplication::getName()
#define MainMenu_IconsSE 7
#define MainMenu_Finance 8
#define MainMenu_Browser 9
+#define MainMenu_DTMF 10
#define SportsMenu_Chess 1
#define SportsMenu_Painting 2
@@ -333,6 +334,10 @@ void DemoSimApplication::mainMenu()
item.setLabel( "Web Browser" );
items += item;
+ item.setIdentifier( MainMenu_DTMF );
+ item.setLabel( "DialTones" );
+ items += item;
+
cmd.setMenuItems( items );
command( cmd, 0, 0 );
@@ -421,6 +426,12 @@ void DemoSimApplication::mainMenuSelection( int id )
}
break;
+ case MainMenu_DTMF:
+ {
+ sendDTMF();
+ }
+ break;
+
default:
{
// Don't know what this item is, so just re-display the main menu.
@@ -751,6 +762,18 @@ void DemoSimApplication::toneMenu( const QSimTerminalResponse& resp )
}
}
+void DemoSimApplication::sendDTMF()
+{
+ QSimCommand cmd;
+
+ cmd.setType( QSimCommand::SendDTMF );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setNumber( "1p234ppp5" );
+ cmd.setText( "Sending DTMFs to network" );
+
+ command( cmd, this, SLOT(endSession()) );
+}
+
void DemoSimApplication::sendIconMenu()
{
QSimCommand cmd;
diff --git a/src/simapplication.h b/src/simapplication.h
index 75abd0b..adaf2c2 100644
--- a/src/simapplication.h
+++ b/src/simapplication.h
@@ -92,6 +92,7 @@ protected slots:
void displayTextResponse( const QSimTerminalResponse& resp );
void sendBrowserMenu();
void browserMenu( const QSimTerminalResponse& resp );
+ void sendDTMF();
private:
int sticksLeft;
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] phonesim: Simulate a Send DTMF command in sim app.
2010-09-08 17:54 [PATCH] phonesim: Simulate a Send DTMF command in sim app Andrzej Zaborowski
@ 2010-09-09 14:29 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2010-09-09 14:29 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 316 bytes --]
Hi Andrew,
On 09/08/2010 12:54 PM, Andrzej Zaborowski wrote:
> ---
> src/qsimcommand.cpp | 6 ++++--
> src/simapplication.cpp | 23 +++++++++++++++++++++++
> src/simapplication.h | 1 +
> 3 files changed, 28 insertions(+), 2 deletions(-)
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-09 14:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 17:54 [PATCH] phonesim: Simulate a Send DTMF command in sim app Andrzej Zaborowski
2010-09-09 14:29 ` 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.