|
1 /* |
|
2 * Copyright (c) 2005-2009 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: writeablejavaregistryapplicationentry implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include "javastoragenames.h" |
|
21 #include "javauid.h" |
|
22 #include "logger.h" |
|
23 #include "writeablejavaregistryapplicationentry.h" |
|
24 #include "writeablejavaregistrypackageentry.h" |
|
25 |
|
26 using namespace Java::Manager::Registry; |
|
27 using namespace java::storage; |
|
28 |
|
29 // ============================ MEMBER FUNCTIONS ============================= |
|
30 |
|
31 CWriteableJavaRegistryApplicationEntry::CWriteableJavaRegistryApplicationEntry |
|
32 (JavaStorageApplicationEntry_t& aEntry, TJavaRegistryEntryType aType) : |
|
33 CWriteableJavaRegistryEntry(aEntry , aType) |
|
34 { |
|
35 } |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // CWriteableJavaRegistryApplicationEntry:: |
|
39 // ~CWriteableJavaRegistryApplicationEntry |
|
40 // --------------------------------------------------------------------------- |
|
41 // |
|
42 EXPORT_C CWriteableJavaRegistryApplicationEntry |
|
43 ::~CWriteableJavaRegistryApplicationEntry() |
|
44 { |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------------------------- |
|
48 // CWriteableJavaRegistryApplicationEntry::IsStartable |
|
49 // --------------------------------------------------------------------------- |
|
50 // |
|
51 EXPORT_C TBool CWriteableJavaRegistryApplicationEntry::IsStartable() const |
|
52 { |
|
53 return ETrue; |
|
54 } |
|
55 |
|
56 // --------------------------------------------------------------------------- |
|
57 // CWriteableJavaRegistryApplicationEntry::IsVisible |
|
58 // --------------------------------------------------------------------------- |
|
59 // |
|
60 EXPORT_C TBool CWriteableJavaRegistryApplicationEntry::IsVisible() const |
|
61 { |
|
62 return ETrue; |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------------------------- |
|
66 // CWriteableJavaRegistryApplicationEntry::IsResident |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 EXPORT_C TBool CWriteableJavaRegistryApplicationEntry::IsResident() const |
|
70 { |
|
71 return ETrue; |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // CWriteableJavaRegistryApplicationEntry::PackageEntryL |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 EXPORT_C CWriteableJavaRegistryPackageEntry* |
|
79 CWriteableJavaRegistryApplicationEntry::PackageEntryL() const |
|
80 { |
|
81 JavaStorageApplicationEntry_t suiteEntry; |
|
82 std::wstring value; |
|
83 |
|
84 // Get suiteID where application belongs to. |
|
85 EntryAttributeValue( |
|
86 iEntry, PACKAGE_ID, value); |
|
87 |
|
88 java::util::Uid suiteUid(value); |
|
89 |
|
90 // Get suite information. |
|
91 StorageEntry(suiteUid, APPLICATION_PACKAGE_TABLE, suiteEntry); |
|
92 |
|
93 if (0 == suiteEntry.size()) |
|
94 { |
|
95 ELOG(EJavaStorage, "Application does not have suite"); |
|
96 User::Leave(KErrNotFound); |
|
97 } |
|
98 |
|
99 return new CWriteableJavaRegistryPackageEntry( |
|
100 suiteEntry, EMidp2MidletSuite); |
|
101 } |
|
102 |
|
103 // --------------------------------------------------------------------------- |
|
104 // CWriteableJavaRegistryApplicationEntry::AttributeL |
|
105 // --------------------------------------------------------------------------- |
|
106 // |
|
107 EXPORT_C const MJavaAttribute* CWriteableJavaRegistryApplicationEntry:: |
|
108 AttributeL(const TDesC& aName) const |
|
109 { |
|
110 JELOG2(EJavaStorage); |
|
111 return CWriteableJavaRegistryEntry::AttributeL(aName); |
|
112 } |
|
113 |
|
114 // --------------------------------------------------------------------------- |
|
115 // CWriteableJavaRegistryApplicationEntry::AttributesL |
|
116 // --------------------------------------------------------------------------- |
|
117 // |
|
118 EXPORT_C const RPointerArray<MJavaAttribute>& |
|
119 CWriteableJavaRegistryApplicationEntry::AttributesL() const |
|
120 { |
|
121 JELOG2(EJavaStorage); |
|
122 return CWriteableJavaRegistryEntry::AttributesL(); |
|
123 } |