116
|
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"
|
119
|
18 |
#include "tsidlist.h"
|
116
|
19 |
|
119
|
20 |
const TInt KBlockedApps [] = {0x100058b3/* <-- phoneui */,
|
|
21 |
0x2001843A/* <-- javainstaller */,
|
|
22 |
0x200267D2/* <-- widgetinstallerapp */};
|
116
|
23 |
|
|
24 |
// -----------------------------------------------------------------------------
|
|
25 |
/**
|
119
|
26 |
* Symbian two-phase constructor. Allocate and initialize list blocked applications
|
|
27 |
* @return backstepping filtering
|
116
|
28 |
*/
|
|
29 |
CTsBacksteppingFilter* CTsBacksteppingFilter::NewL()
|
|
30 |
{
|
|
31 |
CTsBacksteppingFilter *self = new(ELeave)CTsBacksteppingFilter();
|
|
32 |
CleanupStack::PushL( self );
|
|
33 |
self->ConstructL();
|
|
34 |
CleanupStack::Pop( self );
|
|
35 |
return self;
|
|
36 |
}
|
|
37 |
|
|
38 |
// -----------------------------------------------------------------------------
|
|
39 |
/**
|
119
|
40 |
* Destructor
|
116
|
41 |
*/
|
|
42 |
CTsBacksteppingFilter::~CTsBacksteppingFilter()
|
|
43 |
{
|
119
|
44 |
delete iBlockedApps;
|
116
|
45 |
}
|
|
46 |
|
|
47 |
// -----------------------------------------------------------------------------
|
|
48 |
/**
|
119
|
49 |
* Inform if application is blocked for backstepping engine
|
|
50 |
* @param aApplicationUid - tested application UID
|
|
51 |
* @return EFalse if application is not blocked for backstepping engine, other value in other cases
|
116
|
52 |
*/
|
|
53 |
TBool CTsBacksteppingFilter::isBlocked( TUid aApplicationUid ) const
|
|
54 |
{
|
119
|
55 |
return iBlockedApps->IsPresent( aApplicationUid.iUid );
|
116
|
56 |
}
|
|
57 |
|
|
58 |
// -----------------------------------------------------------------------------
|
|
59 |
/**
|
119
|
60 |
* Constructor
|
116
|
61 |
*/
|
|
62 |
CTsBacksteppingFilter::CTsBacksteppingFilter()
|
|
63 |
{
|
|
64 |
//No implementation required
|
|
65 |
}
|
|
66 |
|
|
67 |
// -----------------------------------------------------------------------------
|
|
68 |
/**
|
119
|
69 |
* Symbian second-phase constructor. Initilaize blocked applications list
|
116
|
70 |
*/
|
|
71 |
void CTsBacksteppingFilter::ConstructL()
|
|
72 |
{
|
119
|
73 |
const TInt count( sizeof( KBlockedApps ) / sizeof( TInt ) );
|
|
74 |
iBlockedApps = CTsIdList::NewL();
|
|
75 |
iBlockedApps->AppendL( KBlockedApps, count );
|
116
|
76 |
}
|