|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Supporting ECOM plugin for use by test programs that excercise |
|
15 // rule based launching of applications. |
|
16 // The class CTNonNativeAppLaunchChecker implements an |
|
17 // ECOM RuleBased plugin interface. |
|
18 // |
|
19 // |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @file |
|
26 @internalComponent - Internal Symbian test code |
|
27 */ |
|
28 |
|
29 #include <ImplementationProxy.h> |
|
30 #include "tNonNativeAppLaunchChecker.h" |
|
31 #include <e32cmn.h> |
|
32 |
|
33 const TUid KUidNonNativeApp = {0xA0000B6E}; |
|
34 |
|
35 // Define the interface UIDs |
|
36 const TImplementationProxy ImplementationTable[] = |
|
37 { |
|
38 IMPLEMENTATION_PROXY_ENTRY(0xA0000B6F, CTNonNativeAppLaunchChecker::NewL), |
|
39 }; |
|
40 |
|
41 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
42 { |
|
43 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
44 return ImplementationTable; |
|
45 } |
|
46 |
|
47 CTNonNativeAppLaunchChecker* CTNonNativeAppLaunchChecker::NewL() |
|
48 { |
|
49 CTNonNativeAppLaunchChecker* theAppLaunchChecker = new (ELeave) CTNonNativeAppLaunchChecker(); |
|
50 return theAppLaunchChecker; |
|
51 } |
|
52 |
|
53 CTNonNativeAppLaunchChecker::~CTNonNativeAppLaunchChecker() |
|
54 { |
|
55 } |
|
56 |
|
57 /** |
|
58 The function CAppLaunchChecker::OkayToLaunchL recieves the UID of the application to be launched. |
|
59 The function implements a rule for not launching the application whose UID is supplied as the first parameter. |
|
60 The function returns CAppLaunchChecker::EAppLaunchDecline if the rule is executed completely. |
|
61 */ |
|
62 CAppLaunchChecker::TAppLaunchCode CTNonNativeAppLaunchChecker::OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& /* aTaskList */) |
|
63 { |
|
64 if(KUidNonNativeApp == aAppToLaunch) |
|
65 { |
|
66 return CAppLaunchChecker::EAppLaunchDecline; |
|
67 } |
|
68 return CAppLaunchChecker::EAppLaunchIndifferent; |
|
69 } |
|
70 |
|
71 GLDEF_C TInt E32Dll() |
|
72 // |
|
73 // DLL entry point |
|
74 // |
|
75 { |
|
76 return KErrNone; |
|
77 } |