|
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 "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-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 @file |
|
23 @internalComponent - Internal Symbian test code |
|
24 */ |
|
25 |
|
26 #include <ecom/implementationproxy.h> |
|
27 #include "TNonNativeAppLaunchChecker.h" |
|
28 #include <e32cmn.h> |
|
29 |
|
30 const TUid KUidNonNativeApp = {0xA0000B6E}; |
|
31 |
|
32 // Define the interface UIDs |
|
33 const TImplementationProxy ImplementationTable[] = |
|
34 { |
|
35 IMPLEMENTATION_PROXY_ENTRY(0xA0000B6F, CTNonNativeAppLaunchChecker::NewL), |
|
36 }; |
|
37 |
|
38 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
39 { |
|
40 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
41 return ImplementationTable; |
|
42 } |
|
43 |
|
44 CTNonNativeAppLaunchChecker* CTNonNativeAppLaunchChecker::NewL() |
|
45 { |
|
46 CTNonNativeAppLaunchChecker* theAppLaunchChecker = new (ELeave) CTNonNativeAppLaunchChecker(); |
|
47 return theAppLaunchChecker; |
|
48 } |
|
49 |
|
50 CTNonNativeAppLaunchChecker::~CTNonNativeAppLaunchChecker() |
|
51 { |
|
52 } |
|
53 |
|
54 /** |
|
55 The function CAppLaunchChecker::OkayToLaunchL recieves the UID of the application to be launched. |
|
56 The function implements a rule for not launching the application whose UID is supplied as the first parameter. |
|
57 The function returns CAppLaunchChecker::EAppLaunchDecline if the rule is executed completely. |
|
58 */ |
|
59 CAppLaunchChecker::TAppLaunchCode CTNonNativeAppLaunchChecker::OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& /* aTaskList */) |
|
60 { |
|
61 if(KUidNonNativeApp == aAppToLaunch) |
|
62 { |
|
63 return CAppLaunchChecker::EAppLaunchDecline; |
|
64 } |
|
65 return CAppLaunchChecker::EAppLaunchIndifferent; |
|
66 } |
|
67 |
|
68 GLDEF_C TInt E32Dll() |
|
69 // |
|
70 // DLL entry point |
|
71 // |
|
72 { |
|
73 return KErrNone; |
|
74 } |