24
|
1 |
/*
|
|
2 |
* Copyright (c) 2002 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 the License "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: ?Description
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef __CXMLATTRIBUTES_H
|
|
21 |
#define __CXMLATTRIBUTES_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <e32std.h>
|
|
25 |
#include <badesca.h>
|
|
26 |
#include <xml/MXMLAttributes.h>
|
|
27 |
|
|
28 |
|
|
29 |
// CLASS DECLARATION
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Implementation of MXMLAttributes interface.
|
|
33 |
* @lib XMLInterface.dll
|
|
34 |
* @since ?Series60_version
|
|
35 |
*/
|
|
36 |
class CXMLAttributes : public CBase, public MXMLAttributes
|
|
37 |
{
|
|
38 |
public: // Constructors and destructor
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Two-phased constructor.
|
|
42 |
*/
|
|
43 |
static CXMLAttributes* NewL();
|
|
44 |
|
|
45 |
static CXMLAttributes* NewLC();
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Destructor.
|
|
49 |
*/
|
|
50 |
virtual ~CXMLAttributes();
|
|
51 |
|
|
52 |
public: // Implementation of MXMLAttributes Functions
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Implementation of MXMLAttributes::GetIndexL(TDesC& aName)
|
|
56 |
*/
|
|
57 |
TInt GetIndex(TDesC& aName);
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Implementation of MXMLAttributes::GetLenght()
|
|
61 |
*/
|
|
62 |
TInt GetLength();
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Implementation of MXMLAttributes::GetNameL(TInt aIndex).
|
|
66 |
*/
|
|
67 |
TPtrC GetName(TInt aIndex);
|
|
68 |
|
|
69 |
/**
|
|
70 |
* Implementation of MXMLAttributes::GetValueL(TDesC& aName, TDesC& aValue).
|
|
71 |
*/
|
|
72 |
TPtrC GetValue(TDesC& aName);
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Implementation of MXMLAttributes::GetValueL(TInt& aIndex, TDesC& aValue).
|
|
76 |
*/
|
|
77 |
TPtrC GetValue(TInt& aIndex);
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Implementation of MXMLAttributes::GetTypeL(Tint aIndex, TDesC& aType).
|
|
81 |
*/
|
|
82 |
// R&D: Feature: GetType missing from Attributes
|
|
83 |
TPtrC GetType(TInt aIndex);
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Implementation of MXMLAttributes::GetTypeL(TDesC& aName, TDesC& aType).
|
|
87 |
*/
|
|
88 |
// R&D: Feature: GetType missing from Attributes
|
|
89 |
TPtrC GetType(TDesC& aName);
|
|
90 |
|
|
91 |
public: // New Functions
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Appends new attribute to attrinbuteslist.
|
|
95 |
* @since ?Series60_version
|
|
96 |
* @param aName: Attribute name.
|
|
97 |
* @param aValue: Attribute value.
|
|
98 |
* @return none.
|
|
99 |
*/
|
|
100 |
void AppendL(const TDesC& aName, const TDesC& aValue);
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Resets the attribute list.
|
|
104 |
* @since ?Series60_version
|
|
105 |
* @param aName: Attribute name.
|
|
106 |
* @param aValue: Attribute value.
|
|
107 |
* @return none.
|
|
108 |
*/
|
|
109 |
void Reset();
|
|
110 |
|
|
111 |
protected:
|
|
112 |
/**
|
|
113 |
* C++ default constructor.
|
|
114 |
*/
|
|
115 |
CXMLAttributes();
|
|
116 |
|
|
117 |
private:
|
|
118 |
|
|
119 |
void ConstructL();
|
|
120 |
|
|
121 |
private: // Data
|
|
122 |
|
|
123 |
// Store Attribute Names
|
|
124 |
CDesCArraySeg* iDescAttName;
|
|
125 |
// Store Attribute Values
|
|
126 |
CDesCArraySeg* iDescAttValue;
|
|
127 |
};
|
|
128 |
|
|
129 |
#endif // __CXMLATTRIBUTES_H
|
|
130 |
|
|
131 |
// End of File
|