|
1 // Copyright (c) 2005-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 // @file |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __APLAUNCHCHECKER_H__ |
|
19 #define __APLAUNCHCHECKER_H__ |
|
20 |
|
21 #ifndef __E32BASE_H__ |
|
22 #include <e32base.h> |
|
23 #endif |
|
24 |
|
25 #ifndef __E32CMN_H__ |
|
26 #include <e32cmn.h> |
|
27 #endif |
|
28 |
|
29 #ifndef __APGTASK_H__ |
|
30 #include <apgtask.h> |
|
31 #endif |
|
32 |
|
33 #ifndef __ECOMRESOLVERPARAMS_H__ |
|
34 #include <ecom/ecomresolverparams.h> |
|
35 #endif |
|
36 |
|
37 #ifndef __ECOM_H__ |
|
38 #include <ecom/ecom.h> |
|
39 #endif |
|
40 |
|
41 class CAppLaunchChecker : public CBase |
|
42 /** Launch checker. |
|
43 |
|
44 This is an interface for rule-based launching of an application. |
|
45 |
|
46 An instance of the CAppLaunchChecker class is used to notify an application server whether or not |
|
47 an application should be launched. Inside the plug-in could be implemented some addition actions, |
|
48 for instance closing some low priority applications. |
|
49 |
|
50 @publishedPartner |
|
51 @released |
|
52 @see TApaTaskList |
|
53 @see TUid */ |
|
54 { |
|
55 public: |
|
56 /** Defines codes for launching an application */ |
|
57 enum TAppLaunchCode |
|
58 { |
|
59 /** Plug-in doesn't care whether an application should be launched or not */ |
|
60 EAppLaunchIndifferent, |
|
61 /** Rule-based framework shouldn't launch an application */ |
|
62 EAppLaunchDecline, |
|
63 /** Rule-based framework can launch an application */ |
|
64 EAppLaunchAccept, |
|
65 }; |
|
66 // Wraps ECom object instantiation |
|
67 static CAppLaunchChecker* NewL(const TUid aUid); |
|
68 IMPORT_C ~CAppLaunchChecker(); |
|
69 /** The function to be implemented in inherited classes. */ |
|
70 TAppLaunchCode virtual OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList) = 0; |
|
71 private: |
|
72 IMPORT_C virtual void Reserved_1(); |
|
73 IMPORT_C virtual void Reserved_2(); |
|
74 IMPORT_C virtual void Reserved_3(); |
|
75 private: |
|
76 /** ECOM identifier */ |
|
77 TUid iDtor_ID_Key; |
|
78 |
|
79 TInt iReserved1; |
|
80 TInt iReserved2; |
|
81 TInt iReserved3; |
|
82 }; |
|
83 |
|
84 #endif |
|
85 |