taskswitcher/backstepping/src/tsbacksteppingfilter.cpp
changeset 121 0b3699f6c654
child 119 50e220be30d1
equal deleted inserted replaced
115:3ab5c078b490 121:0b3699f6c654
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 #include "tsbacksteppingfilter.h"
       
    18 
       
    19 const TInt KBlockedApps [] = {0x100058b3/* <-- phoneui.exe */,
       
    20                               0x2001843A/* <-- javainstaller */};
       
    21 
       
    22 // -----------------------------------------------------------------------------
       
    23 /** 
       
    24  * CTsBacksteppingFilter::NewL
       
    25  */
       
    26 CTsBacksteppingFilter* CTsBacksteppingFilter::NewL()
       
    27     {
       
    28     CTsBacksteppingFilter *self = new(ELeave)CTsBacksteppingFilter();
       
    29     CleanupStack::PushL( self );
       
    30     self->ConstructL();
       
    31     CleanupStack::Pop( self );
       
    32     return self;
       
    33     }
       
    34 
       
    35 // -----------------------------------------------------------------------------
       
    36 /** 
       
    37  * CTsBacksteppingFilter::~CTsBacksteppingFilter
       
    38  */
       
    39 CTsBacksteppingFilter::~CTsBacksteppingFilter()
       
    40     {
       
    41     iBlockedApps.Close();
       
    42     }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 /** 
       
    46  * CTsBacksteppingFilter::isBlocked
       
    47  */
       
    48 TBool CTsBacksteppingFilter::isBlocked( TUid aApplicationUid ) const
       
    49     {
       
    50     return KErrNotFound != iBlockedApps.Find( aApplicationUid );
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 /** 
       
    55  * CTsBacksteppingFilter::CTsBacksteppingFilter
       
    56  */
       
    57 CTsBacksteppingFilter::CTsBacksteppingFilter()
       
    58     {
       
    59     //No implementation required
       
    60     }
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 /** 
       
    64  * CTsBacksteppingFilter::ConstructL
       
    65  */
       
    66 void CTsBacksteppingFilter::ConstructL()
       
    67     {
       
    68     const TInt count(sizeof( KBlockedApps ) / sizeof(TInt)); 
       
    69     for( TInt offset(0);offset < count; ++offset )
       
    70         {
       
    71         iBlockedApps.AppendL(TUid::Uid(KBlockedApps[offset]));
       
    72         }
       
    73     }