phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.cpp
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Dialer Dialog
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    "CPhCltDialerDlg.h"
       
    22 #include    <phoneclient.rsg>
       
    23 #include    <CPhCltExtPhoneBase.h>
       
    24 
       
    25 #include    <avkon.hrh>
       
    26 
       
    27 
       
    28 // ============================ MEMBER FUNCTIONS ===============================
       
    29 
       
    30 // Destructor
       
    31 CPhCltDialerDlg::~CPhCltDialerDlg()
       
    32     {
       
    33     delete iPhoneClient;
       
    34     }
       
    35 
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CPhCltDialerDlg::DialData
       
    39 //
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 CPhCltExtPhoneDialData& CPhCltDialerDlg::DialData()
       
    43     {
       
    44     return *iData;
       
    45     }
       
    46 
       
    47 
       
    48 // -----------------------------------------------------------------------------
       
    49 // CPhCltDialerDlg::ExecuteDialLD
       
    50 //
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 void CPhCltDialerDlg::ExecuteDialLD()
       
    54     {
       
    55     TInt error = KErrNone;
       
    56     iError = &error;
       
    57  	if (!iData->Emergency())
       
    58  		{
       
    59  		ExecuteLD( R_PHCLT_BLANK_DLG );
       
    60  		}
       
    61     else
       
    62 		{
       
    63 		iPhoneClient = CPhCltExtPhoneBase::NewL( this );
       
    64 		iPhoneClient->DialL( *iData );
       
    65 		}
       
    66     User::LeaveIfError( error );
       
    67     }
       
    68 
       
    69 
       
    70 // -----------------------------------------------------------------------------
       
    71 // CPhCltDialerDlg::PreLayoutDynInitL
       
    72 //
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 void CPhCltDialerDlg::PreLayoutDynInitL()
       
    76     {
       
    77     MakeVisible( EFalse );
       
    78     ButtonGroupContainer().MakeVisible( EFalse );
       
    79 
       
    80     // Create phone client and pass observer.
       
    81     iPhoneClient = CPhCltExtPhoneBase::NewL( this );
       
    82     }
       
    83 
       
    84 
       
    85 // -----------------------------------------------------------------------------
       
    86 // CPhCltDialerDlg::PostLayoutDynInitL
       
    87 //
       
    88 // -----------------------------------------------------------------------------
       
    89 //
       
    90 void CPhCltDialerDlg::PostLayoutDynInitL()
       
    91     {
       
    92     iPhoneClient->DialL( *iData );
       
    93     }
       
    94 
       
    95 
       
    96 // -----------------------------------------------------------------------------
       
    97 // CPhCltDialerDlg::OkToExitL
       
    98 //
       
    99 // -----------------------------------------------------------------------------
       
   100 //
       
   101 TBool CPhCltDialerDlg::OkToExitL( TInt aButtonId )
       
   102     {
       
   103     if ( aButtonId == EAknSoftkeyEmpty )
       
   104         {
       
   105         return EFalse;
       
   106         }
       
   107     else
       
   108         {
       
   109         return CEikDialog::OkToExitL( aButtonId );
       
   110         }
       
   111     }
       
   112 
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // CPhCltDialerDlg::Draw
       
   116 //
       
   117 // -----------------------------------------------------------------------------
       
   118 //
       
   119 void CPhCltDialerDlg::Draw( const TRect& /*aRect*/ ) const
       
   120     {
       
   121     }
       
   122 
       
   123 
       
   124 // -----------------------------------------------------------------------------
       
   125 // CPhCltDialerDlg::HandleDialL
       
   126 //
       
   127 // -----------------------------------------------------------------------------
       
   128 //
       
   129 void CPhCltDialerDlg::HandleDialL( const TInt aStatus )
       
   130     {
       
   131     if ( iError )
       
   132         {
       
   133         *iError = aStatus;
       
   134         iError = NULL;
       
   135         }
       
   136 
       
   137     delete this;
       
   138     }
       
   139 
       
   140 
       
   141 //  End of File