vtuis/videotelui/src/features/softkey/cvtuisoftkeycontext.cpp
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Sofkey context class implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <cvtlogger.h>
       
    20 
       
    21 #include "cvtuisoftkeycontext.h"
       
    22 
       
    23 /** Softkey context reference priority */
       
    24 const TInt KVtUiSoftkeyContextPriority = 200;
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // CVtUiSoftkeyContext::~CVtUiSoftkeyContext
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CVtUiSoftkeyContext::~CVtUiSoftkeyContext()
       
    31     {
       
    32     __VTPRINTENTER( "SKCtx.~" )
       
    33     UnregisterCommandContext();
       
    34     __VTPRINTEXIT( "SKCtx.~" )
       
    35     }
       
    36 
       
    37 // ---------------------------------------------------------------------------
       
    38 // CVtUiSoftkeyContext::NewL
       
    39 // ---------------------------------------------------------------------------
       
    40 //
       
    41 CVtUiSoftkeyContext* CVtUiSoftkeyContext::NewL(
       
    42     MVtUiCommandManager& aCommandManager )
       
    43     {
       
    44     __VTPRINTENTER( "SKCtx.NewL" )
       
    45     CVtUiSoftkeyContext* self =
       
    46         new ( ELeave ) CVtUiSoftkeyContext( aCommandManager );
       
    47     CleanupStack::PushL( self );
       
    48     self->ConstructL();
       
    49     CleanupStack::Pop(); // self
       
    50     __VTPRINTEXIT( "SKCtx.NewL" )
       
    51     return self;
       
    52     }
       
    53 
       
    54 // ---------------------------------------------------------------------------
       
    55 // CVtUiSoftkeyContext::ValidateL
       
    56 // ---------------------------------------------------------------------------
       
    57 //
       
    58 void CVtUiSoftkeyContext::ValidateL( CVtUiCmdValidationActionBase& aAction )
       
    59     {
       
    60     __VTPRINTENTER( "SKCtx.ValidateL" )
       
    61     ValidateSoftkeyItemsL( aAction );
       
    62     __VTPRINTEXIT( "SKCtx.ValidateL" )
       
    63     }
       
    64 
       
    65 // ---------------------------------------------------------------------------
       
    66 // CVtUiSoftkeyContext::CVtUiSoftkeyContext
       
    67 // ---------------------------------------------------------------------------
       
    68 //
       
    69 CVtUiSoftkeyContext::CVtUiSoftkeyContext( MVtUiCommandManager& aCommandManager )
       
    70     : CVtUiCmdContext( aCommandManager, EVtUiCmdContextTypeSoftkey,
       
    71       KVtUiSoftkeyContextPriority )
       
    72     {
       
    73     __VTPRINTENTER( "SKCtx.ctor" )
       
    74     __VTPRINTEXIT( "SKCtx.ctor" )
       
    75     }
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // CVtUiSoftkeyContext::ConstructL
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 void CVtUiSoftkeyContext::ConstructL()
       
    82     {
       
    83     __VTPRINTENTER( "SKCtx.ConstructL" )
       
    84     RegisterCommandContextL();
       
    85     __VTPRINTEXIT( "SKCtx.ConstructL" )
       
    86     }