|
1 /* |
|
2 * Copyright (c) 2005-2006 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: javaregproperty definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef JAVAREGPROPERTY_H |
|
20 #define JAVAREGPROPERTY_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 namespace Java |
|
25 { |
|
26 namespace Manager |
|
27 { |
|
28 namespace Registry |
|
29 { |
|
30 |
|
31 /** |
|
32 * CJavaProperty class contains a property ID and a property |
|
33 * value and makes possible to set and get these fields. |
|
34 * The property value is represented as a 16 bit descriptor. |
|
35 * |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 class CJavaProperty : |
|
39 public CBase |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Constructs a new property object using the given property |
|
46 * ID and value. |
|
47 * |
|
48 * @since S60 v3.2 |
|
49 * @param aId java property ID |
|
50 * @param aValue java property value |
|
51 * @return a new java property object |
|
52 */ |
|
53 IMPORT_C static CJavaProperty* NewL(TInt32 aId, |
|
54 const TDesC& aValue); |
|
55 |
|
56 /** |
|
57 * Constructs a new property object using the given property |
|
58 * ID and value |
|
59 * and leaves the object on the cleanup stack. |
|
60 * |
|
61 * @since S60 v3.2 |
|
62 * @param aId java property ID |
|
63 * @param aValue java property value |
|
64 * @return a new java property object |
|
65 */ |
|
66 IMPORT_C static CJavaProperty* NewLC(TInt32 aId, |
|
67 const TDesC& aValue); |
|
68 |
|
69 /** |
|
70 * Destructs property object. |
|
71 * |
|
72 * @since S60 v3.2 |
|
73 */ |
|
74 IMPORT_C ~CJavaProperty(); |
|
75 |
|
76 /** |
|
77 * Returns the property Id. |
|
78 * |
|
79 * @since S60 v3.2 |
|
80 * @return the property ID |
|
81 */ |
|
82 IMPORT_C TInt32 Id() const; |
|
83 |
|
84 /** |
|
85 * Returns the property value. |
|
86 * |
|
87 * @since S60 v3.2 |
|
88 * @return the property value |
|
89 */ |
|
90 IMPORT_C const TDesC& Value() const; |
|
91 |
|
92 /** |
|
93 * Compares two objects of this type and returns true if |
|
94 * they are identical. |
|
95 * |
|
96 * @since S60 v3.2 |
|
97 * @return true if the two objects are identical |
|
98 */ |
|
99 IMPORT_C TBool operator==(const CJavaProperty& aProp); |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * ConstructL |
|
105 * |
|
106 * @since S60 v3.2 |
|
107 * @param aId java property ID |
|
108 * @param aValue java property value |
|
109 */ |
|
110 void ConstructL(TInt32 aId, const TDesC& aValue); |
|
111 |
|
112 private: //members |
|
113 |
|
114 // property ID |
|
115 TInt32 iId; |
|
116 |
|
117 // property value |
|
118 HBufC* iValue; |
|
119 }; |
|
120 |
|
121 }//namespace Registry |
|
122 }//namespace Manager |
|
123 }//namespace Java |
|
124 |
|
125 #endif // JAVAREGPROPERTY_H |
|
126 |