|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Java Registy API header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef JAVAREGISTRYENTRY_H |
|
20 #define JAVAREGISTRYENTRY_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32cmn.h> |
|
24 #include <f32file.h> |
|
25 #include "javaregistryentrytype.h" |
|
26 #include "javaattribute.h" |
|
27 |
|
28 |
|
29 namespace Java |
|
30 { |
|
31 namespace Manager |
|
32 { |
|
33 namespace Registry |
|
34 { |
|
35 |
|
36 // FORWARD DECLARATION |
|
37 class CWriteableJavaRegistryEntry; |
|
38 |
|
39 }// namespace Registry |
|
40 }// namespace Manager |
|
41 |
|
42 /** |
|
43 * This class provides the Domain API for entries in JavaRegistry. |
|
44 * This class is intended for further derivation. |
|
45 * It supports only those attributes which exist in all types of |
|
46 * entries. |
|
47 * |
|
48 * @lib javaregistryclient.lib |
|
49 * @since S60 v3.2 |
|
50 */ |
|
51 class CJavaRegistryEntry : public CBase |
|
52 { |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Gets the Uid of this registry entry. |
|
57 * |
|
58 * @since S60 v3.2 |
|
59 * @return A TUid object. |
|
60 */ |
|
61 IMPORT_C TUid Uid() const; |
|
62 |
|
63 /** |
|
64 * Gets the type of this registry entry. |
|
65 * Enumeration TJavaRegistryEntryType defines the currently possible |
|
66 * options. Mandatory property. |
|
67 * |
|
68 * @since S60 v3.2 |
|
69 * @return Type of this registry entry. |
|
70 */ |
|
71 IMPORT_C TJavaRegistryEntryType Type() const; |
|
72 |
|
73 /** |
|
74 * Gets the drive letter where the content of the installation package |
|
75 * has been installed. |
|
76 * |
|
77 * @since S60 v3.2 |
|
78 * @return Drive letter where the content of the installation package |
|
79 * has been installed. |
|
80 * Default value if not set: EDriveC. |
|
81 */ |
|
82 IMPORT_C TDriveNumber Drive() const; |
|
83 |
|
84 /** |
|
85 * Gets the name of the entity (midlet, suite, etc.) this entry |
|
86 * represents. |
|
87 * |
|
88 * @since S60 v3.2 |
|
89 * @return Name of the entity this entry represents. |
|
90 * Default value if not set: KNullDesC. |
|
91 */ |
|
92 IMPORT_C const TDesC& Name() const; |
|
93 |
|
94 /** |
|
95 * Returns the number of certificate chains belonging to the entity |
|
96 * this entry represents. |
|
97 * |
|
98 * @since S60 v3.2 |
|
99 * @return Number of certificate chains. |
|
100 */ |
|
101 IMPORT_C TInt NumberOfCertificateChains() const; |
|
102 |
|
103 /** |
|
104 * Returns the n-th certificate chain of the entity this entry |
|
105 * represents consisting of X.509 version 3 certificates |
|
106 * in their DER encoded format concatenated together |
|
107 * without any separators. |
|
108 * All certificate chains are returned indifferent if they could be |
|
109 * validated or not. |
|
110 * This format is directly suitable to be used with |
|
111 * function CX509CertChain::DecodeCertsL(). |
|
112 * |
|
113 * @since S60 v3.2 |
|
114 * @param aChain Zero-based index of the certificate chain to be |
|
115 * retrieved. |
|
116 * @return N-th certificate chain |
|
117 * Default value if not set: KNullDesC8. |
|
118 */ |
|
119 IMPORT_C const TDesC8& CertificateChain(TInt aChain) const; |
|
120 |
|
121 /** |
|
122 * Returns the content id of the entity this entry represents. |
|
123 * The content id can be used to check if a DRM protected entity |
|
124 * has enough right to be launched or not. |
|
125 * The method can also be used to check if the entity is DRM |
|
126 * protected or not. |
|
127 * |
|
128 * @since S60 v3.2 |
|
129 * @return Content id of the entity this entry represent or |
|
130 * KNullDesC if the entity is not DRM protected. |
|
131 */ |
|
132 IMPORT_C const TDesC& DrmContentId() const; |
|
133 |
|
134 /** |
|
135 * CJavaRegistryEntry::~CJavaRegistryEntry method |
|
136 * Destructor |
|
137 * |
|
138 * @since S60 v3.2 |
|
139 */ |
|
140 IMPORT_C ~CJavaRegistryEntry(); |
|
141 |
|
142 /** |
|
143 * CJavaRegistryEntry::Attribute method gets the |
|
144 * additional attribute. |
|
145 * |
|
146 * @since S60 v5.0 |
|
147 * @param aName The name the searched attribute. |
|
148 * @return MJavaAttribute poiter to instance, which contain attribute. |
|
149 * If attribute doesn't exist return NULL. |
|
150 */ |
|
151 IMPORT_C const MJavaAttribute* |
|
152 CJavaRegistryEntry::AttributeL(const TDesC& aName) const; |
|
153 |
|
154 /** |
|
155 * CJavaRegistryEntry::Attributes method gets the |
|
156 * array of additional attributes. |
|
157 * |
|
158 * @since S60 v5.0 |
|
159 * @return RPointerArray& with all additional attributes. |
|
160 */ |
|
161 IMPORT_C const RPointerArray<MJavaAttribute>& |
|
162 CJavaRegistryEntry::AttributesL() const; |
|
163 |
|
164 protected: |
|
165 |
|
166 /** |
|
167 * CJavaRegistryEntry::CJavaRegistryEntry constructor |
|
168 * |
|
169 * @since S60 v3.2 |
|
170 * @param aWritableEntry Pointer to a writable entry, to delegate |
|
171 * getter methods. Pointer ownership taken. |
|
172 */ |
|
173 CJavaRegistryEntry(Java::Manager::Registry:: |
|
174 CWriteableJavaRegistryEntry* aWritableEntry); |
|
175 |
|
176 /** |
|
177 * CJavaRegistryEntry::WritableEntry method returns the member |
|
178 * of this class; |
|
179 * |
|
180 * @since S60 v3.2 |
|
181 * @return Returns the member of this class. |
|
182 */ |
|
183 Java::Manager::Registry:: |
|
184 CWriteableJavaRegistryEntry* WritableEntry() const; |
|
185 |
|
186 protected: // Data |
|
187 |
|
188 |
|
189 /** |
|
190 * CJavaRegistryEntry::iWritableEntry member |
|
191 * Pointer Owned |
|
192 * |
|
193 * @since S60 v3.2 |
|
194 */ |
|
195 Java::Manager::Registry::CWriteableJavaRegistryEntry* iWritableEntry; |
|
196 |
|
197 private: // Data |
|
198 |
|
199 |
|
200 RPointerArray<MJavaAttribute> iAttributes; |
|
201 |
|
202 }; |
|
203 |
|
204 } // namespace Java |
|
205 |
|
206 #endif // JAVAREGISTRYENTRY_H |