All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] phonesim: Extend conformance menu with Setup Call items
@ 2012-09-05 17:21 Philippe Nunes
  2012-09-05 17:21 ` [PATCH 2/3] phonesim: Add text for PlayTone and Send SS Philippe Nunes
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Philippe Nunes @ 2012-09-05 17:21 UTC (permalink / raw)
  To: ofono

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

---
 src/conformancesimapplication.cpp |  247 +++++++++++++++++++++++++++++++++++++
 src/simapplication.h              |    2 +
 2 files changed, 249 insertions(+)

diff --git a/src/conformancesimapplication.cpp b/src/conformancesimapplication.cpp
index a2bd3af..11265a5 100644
--- a/src/conformancesimapplication.cpp
+++ b/src/conformancesimapplication.cpp
@@ -41,6 +41,7 @@ const QString ConformanceSimApplication::getName()
 #define ConformanceMenu_GetInkey    2
 #define ConformanceMenu_GetInput    3
 #define ConformanceMenu_MoreTime    4
+#define ConformanceMenu_SetupCall   5
 
 #define NormalMenu_1_1    1
 #define NormalMenu_1_2    2
@@ -101,6 +102,20 @@ const QString ConformanceSimApplication::getName()
 #define GetInputMenu_Text_Attribute     11
 #define GetInputMenu_Main               12
 
+#define SetupCall_Confirmed                1
+#define SetupCall_Long_AID                 2
+#define SetupCall_Subaddress_Not_Supported 3
+#define SetupCall_Rejected                 4
+#define SetupCall_Putting_On_Hold          5
+#define SetupCall_Disconnect_Others        6
+#define SetupCall_If_Not_Busy              7
+#define SetupCall_On_Hold_Not_allowed      8
+#define SetupCall_Max_Dialing_Number       9
+#define SetupCall_Two_AID                 10
+#define SetupCall_Basic_icon              11
+#define SetupCall_Self_basic_icon         12
+#define SetupCall_Basic_icon_during_call  13
+
 void ConformanceSimApplication::mainMenu()
 {
     QSimCommand cmd;
@@ -126,6 +141,10 @@ void ConformanceSimApplication::mainMenu()
     item.setLabel( "More Time" );
     items += item;
 
+    item.setIdentifier( ConformanceMenu_SetupCall );
+    item.setLabel( "Setup Call" );
+    items += item;
+
     cmd.setMenuItems( items );
 
     command( cmd, 0, 0 );
@@ -162,6 +181,12 @@ void ConformanceSimApplication::mainMenuSelection( int id )
         }
         break;
 
+        case ConformanceMenu_SetupCall:
+        {
+            sendSetupCallMenu();
+        }
+        break;
+
         default:
         {
             // Don't know what this item is, so just re-display the main menu.
@@ -1746,3 +1771,225 @@ void ConformanceSimApplication::GetInputIconMenu( const QSimTerminalResponse& re
         break;
     }
 }
+
+void ConformanceSimApplication::sendSetupCallMenu()
+{
+    QSimCommand cmd;
+    QSimMenuItem item;
+    QList<QSimMenuItem> items;
+
+    cmd.setType( QSimCommand::SelectItem );
+    cmd.setTitle( "Setup Call (Icon support)" );
+
+    item.setIdentifier( SetupCall_Confirmed );
+    item.setLabel( "Call confirmed and connected" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Long_AID );
+    item.setLabel( "Long first alpha identifier" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Subaddress_Not_Supported );
+    item.setLabel( "Called party subaddress not supported" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Rejected );
+    item.setLabel( "Call rejected by the user" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Putting_On_Hold );
+    item.setLabel( "Putting all other calls on hold" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Disconnect_Others );
+    item.setLabel( "Disconnecting all other calls" );
+    items += item;
+
+    item.setIdentifier( SetupCall_If_Not_Busy );
+    item.setLabel( "Only if not currently busy on another call" );
+    items += item;
+
+    item.setIdentifier( SetupCall_On_Hold_Not_allowed );
+    item.setLabel( "Call hold is not allowed" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Max_Dialing_Number );
+    item.setLabel( "Max dialling number string, no alpha" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Two_AID );
+    item.setLabel( "Two alpha identifiers" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Basic_icon );
+    item.setLabel( "Basic icon" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Self_basic_icon );
+    item.setLabel( "Self-explanatory basic icon" );
+    items += item;
+
+    item.setIdentifier( SetupCall_Basic_icon_during_call );
+    item.setLabel( "Icon during setup call" );
+    items += item;
+
+    cmd.setMenuItems( items );
+
+    command( cmd, this, SLOT(SetupCallMenu(QSimTerminalResponse)) );
+}
+
+void ConformanceSimApplication::SetupCallMenu( const QSimTerminalResponse& resp )
+{
+    QSimCommand cmd;
+
+    if ( resp.result() != QSimTerminalResponse::Success ) {
+        /* Unknown response - just go back to the main menu. */
+        endSession();
+
+        return;
+    }
+
+    /* Item selected. */
+    switch ( resp.menuItem() ) {
+        case SetupCall_Confirmed:
+        case SetupCall_If_Not_Busy:
+        case SetupCall_Rejected:
+        {
+            cmd.setType( QSimCommand::SetupCall );
+            cmd.setDestinationDevice( QSimCommand::Network );
+            cmd.setText( "Not busy" );
+            cmd.setNumber( "+012340123456p1p2" );
+            cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+            command( cmd, this, SLOT(sendSetupCallMenu()) );
+        }
+        break;
+
+        case SetupCall_Long_AID:
+        {
+            cmd.setType( QSimCommand::SetupCall );
+            cmd.setDestinationDevice( QSimCommand::Network );
+            cmd.setText( "Three types are defined: - set up a call, but only "
+                      "if not currently busy on another call; - set up a call"
+                      ", putting all other calls (if any) on hold; - set up a"
+                      " call, disconnecting all other calls (if any) first."
+                      " For each of these types," );
+            cmd.setNumber( "+01" );
+            cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+            command( cmd, this, SLOT(sendSetupCallMenu()) );
+        }
+        break;
+
+        case SetupCall_Subaddress_Not_Supported:
+        {
+            cmd.setType( QSimCommand::SetupCall );
+            cmd.setDestinationDevice( QSimCommand::Network );
+            cmd.setText( "Called party" );
+            cmd.setNumber( "+012340123456p1p2" );
+            cmd.setSubAddress ("9595959595");
+            cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+            command( cmd, this, SLOT(sendSetupCallMenu()) );
+        }
+        break;
+
+        case SetupCall_Putting_On_Hold:
+        {
+            cmd.setType( QSimCommand::SetupCall );
+            cmd.setDestinationDevice( QSimCommand::Network );
+            cmd.setText( "On hold" );
+            cmd.setNumber( "+012340123456p1p2" );
+            cmd.setDisposition( QSimCommand::PutOnHold );
+            command( cmd, this, SLOT(sendSetupCallMenu()) );
+        }
+        break;
+
+        case SetupCall_On_Hold_Not_allowed:
+        {
+            cmd.setType( QSimCommand::SetupCall );
+            cmd.setDestinationDevice( QSimCommand::Network );
+            cmd.setText( "On hold" );
+            cmd.setNumber( "+0123401234" );
+            cmd.setDisposition( QSimCommand::PutOnHold );
+            command( cmd, this, SLOT(sendSetupCallMenu()) );
+        }
+        break;
+
+        case SetupCall_Disconnect_Others:
+        {
+            cmd.setType( QSimCommand::SetupCall );
+            cmd.setDestinationDevice( QSimCommand::Network );
+            cmd.setText( "Disconnect" );
+            cmd.setNumber( "+012340123456p1p2" );
+            cmd.setDisposition( QSimCommand::Disconnect );
+            command( cmd, this, SLOT(sendSetupCallMenu()) );
+        }
+        break;
+
+        case SetupCall_Max_Dialing_Number:
+          {
+              cmd.setType( QSimCommand::SetupCall );
+              cmd.setDestinationDevice( QSimCommand::Network );
+              cmd.setNumber( "+01234567890123456789012345678901" );
+              cmd.setDisposition( QSimCommand::Disconnect );
+              command( cmd, this, SLOT(sendSetupCallMenu()) );
+          }
+          break;
+
+        case SetupCall_Two_AID:
+         {
+             cmd.setType( QSimCommand::SetupCall );
+             cmd.setDestinationDevice( QSimCommand::Network );
+             cmd.setText( "CONFIRMATION" );
+             cmd.setOtherText( "CALL" );
+             cmd.setNumber( "+012340123456p1p2" );
+             cmd.setDisposition( QSimCommand::Disconnect );
+             command( cmd, this, SLOT(sendSetupCallMenu()) );
+         }
+         break;
+
+        case SetupCall_Basic_icon:
+        {
+            cmd.setType( QSimCommand::SetupCall );
+            cmd.setDestinationDevice( QSimCommand::Network );
+            cmd.setText( "Set up call Icon 3.1.1" );
+            cmd.setNumber( "+012340123456p1p2" );
+            cmd.setIconId( 1 );
+            cmd.setIconSelfExplanatory( false );
+            cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+            command( cmd, this, SLOT(sendSetupCallMenu()) );
+        }
+        break;
+
+        case SetupCall_Self_basic_icon:
+         {
+             cmd.setType( QSimCommand::SetupCall );
+             cmd.setDestinationDevice( QSimCommand::Network );
+             cmd.setText( "Set up call Icon 3.2.1" );
+             cmd.setNumber( "+012340123456p1p2" );
+             cmd.setIconId( 1 );
+             cmd.setIconSelfExplanatory( true );
+             cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+             command( cmd, this, SLOT(sendSetupCallMenu()) );
+         }
+         break;
+
+        case SetupCall_Basic_icon_during_call:
+         {
+             cmd.setType( QSimCommand::SetupCall );
+             cmd.setDestinationDevice( QSimCommand::Network );
+             cmd.setText( "Set up call Icon 3.4.1" );
+             cmd.setNumber( "+012340123456p1p2" );
+             cmd.setIconId( 1 );
+             cmd.setIconSelfExplanatory( true );
+             cmd.setOtherText( "Set up call Icon 3.4.2" );
+             cmd.setOtherIconId( 1 );
+             cmd.setOtherIconSelfExplanatory( true );
+             cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+             command( cmd, this, SLOT(sendSetupCallMenu()) );
+         }
+         break;
+
+        default:
+            endSession();
+        break;
+    }
+}
diff --git a/src/simapplication.h b/src/simapplication.h
index 54ef103..f5b54b5 100644
--- a/src/simapplication.h
+++ b/src/simapplication.h
@@ -174,6 +174,8 @@ protected slots:
     void sendGetInputNormalMenu();
     void sendGetInputIconMenu();
     void GetInputIconMenu( const QSimTerminalResponse& resp );
+    void sendSetupCallMenu();
+    void SetupCallMenu( const QSimTerminalResponse& resp );
 };
 
 #endif
-- 
1.7.9.5


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

* [PATCH 2/3] phonesim: Add text for PlayTone and Send SS
  2012-09-05 17:21 [PATCH 1/3] phonesim: Extend conformance menu with Setup Call items Philippe Nunes
@ 2012-09-05 17:21 ` Philippe Nunes
  2012-09-05 20:13   ` Denis Kenzior
  2012-09-05 17:21 ` [PATCH 3/3] phonesim: Reject specific outgoing call for SAT test purpose Philippe Nunes
  2012-09-05 20:12 ` [PATCH 1/3] phonesim: Extend conformance menu with Setup Call items Denis Kenzior
  2 siblings, 1 reply; 6+ messages in thread
From: Philippe Nunes @ 2012-09-05 17:21 UTC (permalink / raw)
  To: ofono

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

---
 src/simapplication.cpp |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/simapplication.cpp b/src/simapplication.cpp
index bede410..d79e8ca 100644
--- a/src/simapplication.cpp
+++ b/src/simapplication.cpp
@@ -956,6 +956,7 @@ void DemoSimApplication::toneMenu( const QSimTerminalResponse& resp )
     if ( resp.result() == QSimTerminalResponse::Success ) {
         // Item selected.
         cmd.setType( QSimCommand::PlayTone );
+        cmd.setText( "Play a standard supervisory tone" );
         cmd.setDestinationDevice( QSimCommand::Earpiece );
         cmd.setTone( (QSimCommand::Tone)( resp.menuItem() ) );
         if ( cmd.tone() == QSimCommand::ToneDial )
@@ -1406,6 +1407,7 @@ void DemoSimApplication::CFMenu( const QSimTerminalResponse& resp )
                 cmd.setType( QSimCommand::SendSS );
                 cmd.setDestinationDevice( QSimCommand::Network );
                 cmd.setNumber( "**62*+155543*11#" );
+                cmd.setText( "Sending SS Registration" );
                 command( cmd, this, SLOT(sendCFMenu()) );
             }
             break;
@@ -1415,6 +1417,7 @@ void DemoSimApplication::CFMenu( const QSimTerminalResponse& resp )
                 cmd.setType( QSimCommand::SendSS );
                 cmd.setDestinationDevice( QSimCommand::Network );
                 cmd.setNumber( "*62#" );
+                cmd.setText( "Sending SS Activation" );
                 command( cmd, this, SLOT(sendCFMenu()) );
             }
             break;
@@ -1424,6 +1427,7 @@ void DemoSimApplication::CFMenu( const QSimTerminalResponse& resp )
                 cmd.setType( QSimCommand::SendSS );
                 cmd.setDestinationDevice( QSimCommand::Network );
                 cmd.setNumber( "*#62**11#" );
+                cmd.setText( "Sending SS Interrogation class voice" );
                 command( cmd, this, SLOT(sendCFMenu()) );
             }
             break;
@@ -1433,6 +1437,7 @@ void DemoSimApplication::CFMenu( const QSimTerminalResponse& resp )
                 cmd.setType( QSimCommand::SendSS );
                 cmd.setDestinationDevice( QSimCommand::Network );
                 cmd.setNumber( "#62#" );
+                cmd.setText( "Sending SS Deactivation" );
                 command( cmd, this, SLOT(sendCFMenu()) );
             }
             break;
@@ -1442,6 +1447,7 @@ void DemoSimApplication::CFMenu( const QSimTerminalResponse& resp )
                 cmd.setType( QSimCommand::SendSS );
                 cmd.setDestinationDevice( QSimCommand::Network );
                 cmd.setNumber( "##62#" );
+                cmd.setText( "Sending SS Erasure" );
                 command( cmd, this, SLOT(sendCFMenu()) );
             }
             break;
-- 
1.7.9.5


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

* [PATCH 3/3] phonesim: Reject specific outgoing call for SAT test purpose
  2012-09-05 17:21 [PATCH 1/3] phonesim: Extend conformance menu with Setup Call items Philippe Nunes
  2012-09-05 17:21 ` [PATCH 2/3] phonesim: Add text for PlayTone and Send SS Philippe Nunes
@ 2012-09-05 17:21 ` Philippe Nunes
  2012-09-05 20:14   ` Denis Kenzior
  2012-09-05 20:12 ` [PATCH 1/3] phonesim: Extend conformance menu with Setup Call items Denis Kenzior
  2 siblings, 1 reply; 6+ messages in thread
From: Philippe Nunes @ 2012-09-05 17:21 UTC (permalink / raw)
  To: ofono

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

---
 src/callmanager.cpp |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/callmanager.cpp b/src/callmanager.cpp
index 4567548..1995c6d 100644
--- a/src/callmanager.cpp
+++ b/src/callmanager.cpp
@@ -79,6 +79,13 @@ bool CallManager::command( const QString& cmd )
             return true;
         }
 
+        // For SAT test purpose, reject the dialing number 0123401234 if there
+        // is a connected call.
+        if ( hasCall( CallState_Active ) && number == "+0123401234" ) {
+            send( "NO CARRIER" );
+            return true;
+         }
+
         // If there is a connected call, place it on hold.
         changeGroup( CallState_Active, CallState_Held );
 
-- 
1.7.9.5


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

* Re: [PATCH 1/3] phonesim: Extend conformance menu with Setup Call items
  2012-09-05 17:21 [PATCH 1/3] phonesim: Extend conformance menu with Setup Call items Philippe Nunes
  2012-09-05 17:21 ` [PATCH 2/3] phonesim: Add text for PlayTone and Send SS Philippe Nunes
  2012-09-05 17:21 ` [PATCH 3/3] phonesim: Reject specific outgoing call for SAT test purpose Philippe Nunes
@ 2012-09-05 20:12 ` Denis Kenzior
  2 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2012-09-05 20:12 UTC (permalink / raw)
  To: ofono

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

Hi Philippe,

On 09/05/2012 12:21 PM, Philippe Nunes wrote:
> ---
>   src/conformancesimapplication.cpp |  247 +++++++++++++++++++++++++++++++++++++
>   src/simapplication.h              |    2 +
>   2 files changed, 249 insertions(+)

<snip>

>
> +        case SetupCall_Max_Dialing_Number:
> +          {
> +              cmd.setType( QSimCommand::SetupCall );
> +              cmd.setDestinationDevice( QSimCommand::Network );
> +              cmd.setNumber( "+01234567890123456789012345678901" );
> +              cmd.setDisposition( QSimCommand::Disconnect );
> +              command( cmd, this, SLOT(sendSetupCallMenu()) );
> +          }
> +          break;

Can we actually fix the inconsistent indentation here?

> +
> +        case SetupCall_Two_AID:
> +         {
> +             cmd.setType( QSimCommand::SetupCall );
> +             cmd.setDestinationDevice( QSimCommand::Network );
> +             cmd.setText( "CONFIRMATION" );
> +             cmd.setOtherText( "CALL" );
> +             cmd.setNumber( "+012340123456p1p2" );
> +             cmd.setDisposition( QSimCommand::Disconnect );
> +             command( cmd, this, SLOT(sendSetupCallMenu()) );
> +         }
> +         break;

And here?

> +
> +        case SetupCall_Basic_icon:
> +        {
> +            cmd.setType( QSimCommand::SetupCall );
> +            cmd.setDestinationDevice( QSimCommand::Network );
> +            cmd.setText( "Set up call Icon 3.1.1" );
> +            cmd.setNumber( "+012340123456p1p2" );
> +            cmd.setIconId( 1 );
> +            cmd.setIconSelfExplanatory( false );
> +            cmd.setDisposition( QSimCommand::IfNoOtherCalls );
> +            command( cmd, this, SLOT(sendSetupCallMenu()) );
> +        }
> +        break;
> +
> +        case SetupCall_Self_basic_icon:
> +         {
> +             cmd.setType( QSimCommand::SetupCall );
> +             cmd.setDestinationDevice( QSimCommand::Network );
> +             cmd.setText( "Set up call Icon 3.2.1" );
> +             cmd.setNumber( "+012340123456p1p2" );
> +             cmd.setIconId( 1 );
> +             cmd.setIconSelfExplanatory( true );
> +             cmd.setDisposition( QSimCommand::IfNoOtherCalls );
> +             command( cmd, this, SLOT(sendSetupCallMenu()) );
> +         }
> +         break;

And here

> +
> +        case SetupCall_Basic_icon_during_call:
> +         {
> +             cmd.setType( QSimCommand::SetupCall );
> +             cmd.setDestinationDevice( QSimCommand::Network );
> +             cmd.setText( "Set up call Icon 3.4.1" );
> +             cmd.setNumber( "+012340123456p1p2" );
> +             cmd.setIconId( 1 );
> +             cmd.setIconSelfExplanatory( true );
> +             cmd.setOtherText( "Set up call Icon 3.4.2" );
> +             cmd.setOtherIconId( 1 );
> +             cmd.setOtherIconSelfExplanatory( true );
> +             cmd.setDisposition( QSimCommand::IfNoOtherCalls );
> +             command( cmd, this, SLOT(sendSetupCallMenu()) );
> +         }
> +         break;

And here.

> +
> +        default:
> +            endSession();
> +        break;
> +    }
> +}

Regards,
-Denis

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

* Re: [PATCH 2/3] phonesim: Add text for PlayTone and Send SS
  2012-09-05 17:21 ` [PATCH 2/3] phonesim: Add text for PlayTone and Send SS Philippe Nunes
@ 2012-09-05 20:13   ` Denis Kenzior
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2012-09-05 20:13 UTC (permalink / raw)
  To: ofono

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

Hi Philippe,

On 09/05/2012 12:21 PM, Philippe Nunes wrote:
> ---
>   src/simapplication.cpp |    6 ++++++
>   1 file changed, 6 insertions(+)
>

Patch has been applied, thanks.

Regards,
-Denis


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

* Re: [PATCH 3/3] phonesim: Reject specific outgoing call for SAT test purpose
  2012-09-05 17:21 ` [PATCH 3/3] phonesim: Reject specific outgoing call for SAT test purpose Philippe Nunes
@ 2012-09-05 20:14   ` Denis Kenzior
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2012-09-05 20:14 UTC (permalink / raw)
  To: ofono

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

Hi Philippe,

On 09/05/2012 12:21 PM, Philippe Nunes wrote:
> ---
>   src/callmanager.cpp |    7 +++++++
>   1 file changed, 7 insertions(+)
>

Patch has been applied, thanks.

Regards,
-Denis


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

end of thread, other threads:[~2012-09-05 20:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 17:21 [PATCH 1/3] phonesim: Extend conformance menu with Setup Call items Philippe Nunes
2012-09-05 17:21 ` [PATCH 2/3] phonesim: Add text for PlayTone and Send SS Philippe Nunes
2012-09-05 20:13   ` Denis Kenzior
2012-09-05 17:21 ` [PATCH 3/3] phonesim: Reject specific outgoing call for SAT test purpose Philippe Nunes
2012-09-05 20:14   ` Denis Kenzior
2012-09-05 20:12 ` [PATCH 1/3] phonesim: Extend conformance menu with Setup Call items 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.