vtuis/videotelui/src/CVtUiBlankDialog.cpp
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Implementation of the CVtUiBlankDialog class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    "CVtUiBlankDialog.h"
       
    22 #include    <videotelui.rsg>
       
    23 #include    <avkon.hrh>
       
    24 
       
    25 // ============================ MEMBER FUNCTIONS ===============================
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CVtUiBlankDialog::CVtUiBlankDialog
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 CVtUiBlankDialog::CVtUiBlankDialog(
       
    32         CEikDialog** aSelfPtr )
       
    33     : iSelfPtr( aSelfPtr ) 
       
    34     {
       
    35     }
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CVtUiBlankDialog::~CVtUiBlankDialog
       
    39 // -----------------------------------------------------------------------------
       
    40 //
       
    41 CVtUiBlankDialog::~CVtUiBlankDialog()
       
    42     {
       
    43     if ( iSelfPtr )
       
    44         {
       
    45         *iSelfPtr = NULL;
       
    46         iSelfPtr = NULL;
       
    47         }
       
    48 
       
    49     if ( iRequest )
       
    50         {
       
    51         User::RequestComplete( iRequest, KErrCancel );
       
    52         iRequest = NULL;
       
    53         }
       
    54     }
       
    55 
       
    56 // -----------------------------------------------------------------------------
       
    57 // CVtUiBlankDialog::ExecuteDialogNoWaitLD
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 void CVtUiBlankDialog::ExecuteDialogNoWaitLD()
       
    61     {
       
    62     ExecuteLD( R_VIDEOTELUI_BLANK_NOWAIT_DLG );
       
    63     }
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // CVtUiBlankDialog::ExecuteDialogLD
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 void CVtUiBlankDialog::ExecuteDialogLD(
       
    70         TRequestStatus* aRequest )
       
    71     {
       
    72     if ( !aRequest )
       
    73         {
       
    74         TInt error = KErrNone;
       
    75         iError = &error;
       
    76  
       
    77         ExecuteLD( R_VIDEOTELUI_BLANK_DLG );
       
    78         User::LeaveIfError( error );
       
    79         }
       
    80     else
       
    81         {
       
    82         // It's assumed that either ExecuteLD leaves or
       
    83         // then dialog is started (& dialog is not immediately deleted).
       
    84         *aRequest = KRequestPending;
       
    85         ExecuteLD( R_VIDEOTELUI_BLANK_NOWAIT_DLG );
       
    86         iRequest = aRequest; 
       
    87         }
       
    88     }
       
    89 
       
    90 // -----------------------------------------------------------------------------
       
    91 // CVtUiBlankDialog::Complete
       
    92 // -----------------------------------------------------------------------------
       
    93 //
       
    94 void CVtUiBlankDialog::Complete( const TInt aError )
       
    95     {
       
    96     if ( iError )
       
    97         {
       
    98         *iError = aError;
       
    99         }
       
   100 
       
   101     if ( iRequest )
       
   102         {
       
   103         User::RequestComplete( iRequest, aError );
       
   104         iRequest = NULL;
       
   105         }
       
   106 
       
   107     delete this;
       
   108     }
       
   109 
       
   110 // -----------------------------------------------------------------------------
       
   111 // CVtUiBlankDialog::PreLayoutDynInitL
       
   112 // -----------------------------------------------------------------------------
       
   113 //
       
   114 void CVtUiBlankDialog::PreLayoutDynInitL()
       
   115     {
       
   116     MakeVisible( EFalse );
       
   117     ButtonGroupContainer().MakeVisible( EFalse );
       
   118     }
       
   119 
       
   120 // -----------------------------------------------------------------------------
       
   121 // CVtUiBlankDialog::PostLayoutDynInitL
       
   122 // -----------------------------------------------------------------------------
       
   123 //
       
   124 void CVtUiBlankDialog::PostLayoutDynInitL()
       
   125     {
       
   126     }
       
   127 
       
   128 // -----------------------------------------------------------------------------
       
   129 // CVtUiBlankDialog::OkToExitL
       
   130 // -----------------------------------------------------------------------------
       
   131 //
       
   132 TBool CVtUiBlankDialog::OkToExitL( TInt aButtonId )
       
   133     {
       
   134     if ( aButtonId != EEikBidCancel )
       
   135         {
       
   136         return EFalse;
       
   137         }
       
   138     else
       
   139         {
       
   140         return CEikDialog::OkToExitL( aButtonId );
       
   141         }
       
   142     }
       
   143 
       
   144 // -----------------------------------------------------------------------------
       
   145 // CVtUiBlankDialog::Draw
       
   146 // -----------------------------------------------------------------------------
       
   147 //
       
   148 void CVtUiBlankDialog::Draw( const TRect& /*aRect*/ ) const
       
   149     {
       
   150     }
       
   151 
       
   152 //  End of File