|
1 /* |
|
2 * Copyright (c) 2006-2008 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: Contains MNcdInstalledContent interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_NCD_INSTALLED_CONTENT_H |
|
20 #define M_NCD_INSTALLED_CONTENT_H |
|
21 |
|
22 #include "catalogsbase.h" |
|
23 #include "ncdinterfaceids.h" |
|
24 |
|
25 |
|
26 /** |
|
27 * Interface for accessing installed content. |
|
28 * |
|
29 * This interface provides methods for checking the status of the installed content. |
|
30 * The actual content interfaces are queried by using QueryInterfaceL(). These interfaces |
|
31 * include MNcdInstalledApplication, MNcdInstalledTheme and MNcdInstalledFile. |
|
32 * |
|
33 * @see MNcdNodeInstall |
|
34 * @see MNcdInstalledApplication |
|
35 * @see MNcdInstalledTheme |
|
36 * @see MNcdInstalledFile |
|
37 * |
|
38 * |
|
39 */ |
|
40 class MNcdInstalledContent : public virtual MCatalogsBase |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Unique identifier for the interface, required for all MCatalogsBase interfaces. |
|
46 * |
|
47 * |
|
48 */ |
|
49 enum { KInterfaceUid = ENcdInstalledContentUid }; |
|
50 |
|
51 |
|
52 /** |
|
53 * Types of installed content |
|
54 * |
|
55 * |
|
56 */ |
|
57 enum TInstalledContentType |
|
58 { |
|
59 /** |
|
60 * Normal content |
|
61 */ |
|
62 EInstalledContent, |
|
63 |
|
64 /** |
|
65 * Required dependency |
|
66 */ |
|
67 EInstalledDependency, |
|
68 |
|
69 /** |
|
70 * Application that should be launched |
|
71 */ |
|
72 EInstalledLauncher |
|
73 }; |
|
74 |
|
75 /** |
|
76 * Checks if the item content has already been installed and is currently present in the |
|
77 * device. |
|
78 * |
|
79 * |
|
80 * @return ETrue if the item content has been installed and is present, EFalse otherwise. |
|
81 * @exception Leave System wide error code. |
|
82 * @note This is always ETrue for content that is of EInstalledLauncher type |
|
83 */ |
|
84 virtual TBool IsInstalledL() const = 0; |
|
85 |
|
86 |
|
87 /** |
|
88 * Checks if the content is allowed to be launched. |
|
89 * |
|
90 * If this returns EFalse, the content should not be launched even if it has been |
|
91 * successfully installed. |
|
92 * |
|
93 * |
|
94 * @return ETrue if the content can be launched. |
|
95 * @note This method does not check if the content has been installed or if it's |
|
96 * currently present. |
|
97 * @note For EInstalledLauncher content this is both launchable |
|
98 * and installed status |
|
99 */ |
|
100 virtual TBool IsLaunchable() const = 0; |
|
101 |
|
102 |
|
103 /** |
|
104 * Content type getter |
|
105 * |
|
106 * |
|
107 * @return Type of the content |
|
108 */ |
|
109 virtual TInstalledContentType ContentType() const = 0; |
|
110 |
|
111 protected: |
|
112 |
|
113 /** |
|
114 * Destructor. |
|
115 * |
|
116 * @see MCatalogsBase::~MCatalogsBase() |
|
117 */ |
|
118 virtual ~MNcdInstalledContent() {} |
|
119 |
|
120 }; |
|
121 |
|
122 |
|
123 #endif // M_NCD_INSTALLED_CONTENT_H |