phoneapp/phoneuivoipextension/src/cphonenewcallcmdhandler.cpp
branchRCL_3
changeset 62 5266b1f337bd
parent 61 41a7f70b3818
--- a/phoneapp/phoneuivoipextension/src/cphonenewcallcmdhandler.cpp	Tue Aug 31 15:14:29 2010 +0300
+++ b/phoneapp/phoneuivoipextension/src/cphonenewcallcmdhandler.cpp	Wed Sep 01 12:30:10 2010 +0100
@@ -118,6 +118,7 @@
             break;
         
         case EPhoneCmdNewInternetCallOk:
+            DoNewCallL();     
             break;
         
         case EPhoneCmdNewInternetCallSearch:
@@ -151,6 +152,70 @@
     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
         "CPhoneNewCallCmdHandler::ShowNewCallQueryL" )
     
+    if ( !FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) )
+        {
+        CPhoneState* phoneState = 
+            static_cast<CPhoneState*>( iStateMachine.State() );
+        
+        HBufC *text = HBufC::NewLC( KPhoneNumberEntryBufferSize );
+        TPtr ptr( text->Des() );
+        // Pre-populate the query with the number entry contents, if it exists
+        if ( phoneState->IsNumberEntryUsedL() )
+            {
+            // get the number entry contents
+            TPhoneCmdParamString stringParam;
+            stringParam.SetString( &ptr );
+            iViewCommandHandle.ExecuteCommandL(
+                EPhoneViewGetLocalizedNumberFromEntry,
+                &stringParam );
+            }
+        
+        TPhoneCmdParamQuery queryDialogParam;
+        queryDialogParam.SetQueryType( EPhoneTextQueryDialog );
+        queryDialogParam.SetQueryResourceId( 
+            CPhoneMainResourceResolver::Instance()->
+            ResolveResourceID( EPhoneVoIPNewCallQuery ) );
+        
+        queryDialogParam.SetDefaultCba( CPhoneMainResourceResolver::Instance()->
+            ResolveResourceID( EPhoneVoIPNewCallQueryEmptySoftkeys ) );
+        
+        queryDialogParam.SetContentCba( CPhoneMainResourceResolver::Instance()->
+            ResolveResourceID( EPhoneVoIPNewCallQueryNotEmptySoftkeys ) );
+        
+        queryDialogParam.SetDataText( &ptr );
+        queryDialogParam.SetSendKeyEnabled( ETrue );
+        
+        // Display dialog        
+        iViewCommandHandle.ExecuteCommandL( 
+            EPhoneViewShowQuery, &queryDialogParam );
+        
+        CleanupStack::PopAndDestroy( text );
+        }
+    }
+
+
+// ---------------------------------------------------------------------------
+// CPhoneNewCallCmdHandler::DoNewCallL
+// ---------------------------------------------------------------------------
+//
+void CPhoneNewCallCmdHandler::DoNewCallL()
+    {
+    __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
+        "CPhoneNewCallCmdHandler::DoNewCallL" )
+    
+    // First get the string from dialog
+    TPhoneCmdParamString string;
+    HBufC* content = HBufC::NewLC( KPEPhoneNumberMaxLength );
+    TPtr ptr( content->Des() );
+    string.SetString( &ptr );   
+
+    iViewCommandHandle.ExecuteCommandL( 
+        EPhoneViewGetTextQueryContent, &string );
+
+    // Dial new voip call
+    StateUtils().SelectServiceAndDialL( ptr );
+    
+    CleanupStack::PopAndDestroy( content );
     }
 
 
@@ -166,10 +231,10 @@
     
     TPhoneCmdParamInteger integerParam;
     integerParam.SetInteger( aFetchType );
-    /*
+    
     iViewCommandHandle.HandleCommandL( 
         EPhoneViewOpenSingleItemFetchDialog, 
-        &integerParam );*/
+        &integerParam );
     }