|
1 /* |
|
2 * Copyright (c) 2005 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: XDM node attribute |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __XDMNODEATTRIBUTE__ |
|
22 #define __XDMNODEATTRIBUTE__ |
|
23 |
|
24 #include <e32base.h> |
|
25 #include "XdmDocumentNode.h" |
|
26 |
|
27 class CXdmEngine; |
|
28 |
|
29 //CLASS DECLARATION |
|
30 class CXdmNodeAttribute : public CXdmDocumentNode |
|
31 { |
|
32 public: |
|
33 |
|
34 /** |
|
35 * Return the value of this attribute |
|
36 * |
|
37 * NOTE! The name of an attribute is retrieved through a call |
|
38 * to the NodeName() member function in the base class. |
|
39 * |
|
40 * @return TPtrC8 The value of this attribute |
|
41 */ |
|
42 IMPORT_C TPtrC AttributeValue() const; |
|
43 |
|
44 /** |
|
45 * Return the value of this attribute |
|
46 * |
|
47 * @return HBufC8* The value of this attribute |
|
48 */ |
|
49 IMPORT_C HBufC8* EightBitValueLC() const; |
|
50 |
|
51 /** |
|
52 * Return the escaped value of this attribute |
|
53 * |
|
54 * @return HBufC8* The value of this attribute |
|
55 */ |
|
56 IMPORT_C HBufC8* EscapedValueLC() const; |
|
57 |
|
58 /** |
|
59 * Set the value of this attribute |
|
60 * |
|
61 * @param TDesC8& Value of the attribute |
|
62 * @return void |
|
63 */ |
|
64 IMPORT_C void SetAttributeValueL( const TDesC& aAttributeValue ); |
|
65 |
|
66 /** |
|
67 * Set the value of this attribute |
|
68 * |
|
69 * @param TDesC8& Value of the attribute |
|
70 * @return void |
|
71 */ |
|
72 IMPORT_C void SetAttributeValueL( const TDesC8& aAttributeValue ); |
|
73 |
|
74 /** |
|
75 * The type of this element: an element or an attribute |
|
76 * |
|
77 * @return TXdmElementType* |
|
78 */ |
|
79 IMPORT_C virtual TXdmElementType ElementType() const; |
|
80 |
|
81 /** |
|
82 * Destructor. |
|
83 */ |
|
84 IMPORT_C virtual ~CXdmNodeAttribute(); |
|
85 |
|
86 protected: //Methods |
|
87 |
|
88 /** |
|
89 * Symbian OS constructor for derived classes. |
|
90 * |
|
91 * @param CXdmEngine& Reference to the engine |
|
92 * @param MXdmNodeFactory* Reference to the node factory |
|
93 */ |
|
94 IMPORT_C CXdmNodeAttribute( CXdmEngine& aXdmEngine, |
|
95 MXdmNodeFactory& aNodeFactory ); |
|
96 |
|
97 /** |
|
98 * Symbian OS constructor for derived classes. |
|
99 * |
|
100 * @param CXdmEngine& Reference to the engine |
|
101 * @param MXdmNodeFactory* Reference to the node factory |
|
102 * @param CXdmDocumentNode* Pointer to the parent element |
|
103 */ |
|
104 IMPORT_C CXdmNodeAttribute( CXdmEngine& aXdmEngine, |
|
105 MXdmNodeFactory& aNodeFactory, |
|
106 CXdmDocumentNode* aParentNode ); |
|
107 |
|
108 /** |
|
109 * Symbian OS base class constructor. |
|
110 * |
|
111 * @param TDesC& Name of the attribute |
|
112 * @return void |
|
113 */ |
|
114 IMPORT_C void BaseConstructL( const TDesC& aAttributeName ); |
|
115 |
|
116 private: |
|
117 |
|
118 /** |
|
119 * Set the value of this element |
|
120 * |
|
121 * @param TDesC Attribute name |
|
122 * @return void |
|
123 */ |
|
124 void SetValueL( const TDesC& aAttributeName ); |
|
125 |
|
126 private: //Data |
|
127 |
|
128 HBufC* iAttributeValue; |
|
129 }; |
|
130 |
|
131 #endif //__XDMNODEATTRIBUTE__ |
|
132 |
|
133 // End of File |