|
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 MNcdNodeDependency interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_NCD_NODE_DEPENDENCY_H |
|
20 #define M_NCD_NODE_DEPENDENCY_H |
|
21 |
|
22 |
|
23 #include <e32cmn.h> |
|
24 |
|
25 #include "catalogsbase.h" |
|
26 #include "ncdinterfaceids.h" |
|
27 |
|
28 |
|
29 class MNcdNodeDependencyInfo; |
|
30 |
|
31 |
|
32 |
|
33 /** |
|
34 * Node dependency states |
|
35 * |
|
36 * @note Do not change the order of these enumerations |
|
37 */ |
|
38 enum TNcdDependencyState |
|
39 { |
|
40 /** |
|
41 * Dependency has not been installed or is not present |
|
42 */ |
|
43 ENcdDependencyMissing = 0, |
|
44 |
|
45 /** |
|
46 * Dependency is present but there is an upgrade available |
|
47 * on the server |
|
48 */ |
|
49 ENcdDependencyUpgradeAvailable, |
|
50 |
|
51 /** |
|
52 * Dependency is installed |
|
53 */ |
|
54 ENcdDependencyInstalled |
|
55 }; |
|
56 |
|
57 |
|
58 /** |
|
59 * This interface provides functions for the node that depends on |
|
60 * another nodes. The functions can be used to check what nodes |
|
61 * or node content this node depends on. |
|
62 * |
|
63 * @see MNcdNode |
|
64 * @see MNcdNodeDependencyInfo |
|
65 * |
|
66 * |
|
67 */ |
|
68 class MNcdNodeDependency : public virtual MCatalogsBase |
|
69 { |
|
70 |
|
71 public: |
|
72 |
|
73 /** |
|
74 * Unique identifier for the interface, required for all MCatalogsBase interfaces. |
|
75 * |
|
76 * |
|
77 */ |
|
78 enum { KInterfaceUid = ENcdNodeDependencyUid }; |
|
79 |
|
80 |
|
81 /** |
|
82 * Returns the dependency information about the nodes or content |
|
83 * that this object depends from. |
|
84 * |
|
85 * @return Array of pointers to dependency information objects that |
|
86 * this node depends on. |
|
87 */ |
|
88 virtual const RPointerArray< MNcdNodeDependencyInfo >& DependencyInfos() const = 0; |
|
89 |
|
90 |
|
91 /** |
|
92 * Returns the collective state of the dependencies. |
|
93 * |
|
94 * The returned value will be ENcdDependencyMissing if any of the node's |
|
95 * dependencies is missing, ENcdDependencyUpgradeAvailable if all of |
|
96 * node's dependencies are installed but at least one has an upgrade |
|
97 * available or ENcdDependencyInstalled if all are installed and there are |
|
98 * no upgrades available |
|
99 * |
|
100 * @return Node's dependencies' state |
|
101 */ |
|
102 virtual TNcdDependencyState State() const = 0; |
|
103 |
|
104 |
|
105 protected: |
|
106 |
|
107 /** |
|
108 * Destructor. |
|
109 * |
|
110 * @see MCatalogsBase::~MCatalogsBase |
|
111 */ |
|
112 virtual ~MNcdNodeDependency() {} |
|
113 |
|
114 }; |
|
115 |
|
116 |
|
117 #endif // M_NCD_NODE_DEPENDENCY_H |