|
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 |
|
21 /** |
|
22 * CTsBacksteppingFilter::NewL |
|
23 */ |
|
24 CTsBacksteppingFilter* CTsBacksteppingFilter::NewL() |
|
25 { |
|
26 CTsBacksteppingFilter *self = new(ELeave)CTsBacksteppingFilter(); |
|
27 CleanupStack::PushL(self); |
|
28 self->ConstructL(); |
|
29 CleanupStack::Pop(self); |
|
30 return self; |
|
31 } |
|
32 |
|
33 /** |
|
34 * CTsBacksteppingFilter::~CTsBacksteppingFilter |
|
35 */ |
|
36 CTsBacksteppingFilter::~CTsBacksteppingFilter() |
|
37 { |
|
38 mBlockedApps.Close(); |
|
39 } |
|
40 |
|
41 /** |
|
42 * CTsBacksteppingFilter::isBlocked |
|
43 */ |
|
44 TBool CTsBacksteppingFilter::isBlocked(TUid applicationUid) const |
|
45 { |
|
46 return KErrNotFound != mBlockedApps.Find(applicationUid); |
|
47 } |
|
48 |
|
49 /** |
|
50 * CTsBacksteppingFilter::CTsBacksteppingFilter |
|
51 */ |
|
52 CTsBacksteppingFilter::CTsBacksteppingFilter() |
|
53 { |
|
54 } |
|
55 |
|
56 /** |
|
57 * CTsBacksteppingFilter::ConstructL |
|
58 */ |
|
59 void CTsBacksteppingFilter::ConstructL() |
|
60 { |
|
61 const TInt count(sizeof(KBlockedApps) / sizeof(TInt)); |
|
62 for(TInt offset(0);offset < count; ++offset) { |
|
63 mBlockedApps.AppendL(TUid::Uid(KBlockedApps[offset])); |
|
64 } |
|
65 } |