|
1 /* |
|
2 * Copyright (c) 2002-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: Class definition for attribute access interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CGECOATTRIBUTEPROVIDER_H |
|
20 #define CGECOATTRIBUTEPROVIDER_H |
|
21 |
|
22 #include <e32std.h> |
|
23 |
|
24 |
|
25 //CLASS DESCRIPTION |
|
26 /** |
|
27 * Attribute provider interface that content object factories must implement |
|
28 * to allow generic access to attribute names/values/localisation reference ids |
|
29 * and possible object text data in string format. |
|
30 * |
|
31 * @lib XCFW.lib |
|
32 * @since Series 60 3.1 |
|
33 */ |
|
34 class MGECOAttributeProvider |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Returns number of attributes for this object / tag |
|
40 * @since Series 60 3.1 |
|
41 * @return Number of attributes for this object / tag |
|
42 */ |
|
43 virtual TInt NumAttributes() = 0; |
|
44 |
|
45 /** |
|
46 * Returns name, value and localization status of an attribute |
|
47 * @since Series 60 3.1 |
|
48 * @param aIndex Index of attribute to get. |
|
49 * @param aAttributeName Attribute name returned |
|
50 * @param aAttributeValue Attribute value returned |
|
51 * @param aIsLocalized Attribute localization status returned |
|
52 */ |
|
53 virtual void AttributeDetailsL(const TInt aIndex, TPtrC& aAttrName, |
|
54 TPtrC& aAttrValue, TBool& aIsLocalized) = 0; |
|
55 |
|
56 /** |
|
57 * Returns name and value of an attribute |
|
58 * @since Series 60 3.1 |
|
59 * @param aIndex Index of attribute to get. |
|
60 * @param aAttributeName Attribute name returned |
|
61 * @param aAttributeValue Attribute value returned |
|
62 */ |
|
63 virtual void AttributeDetailsL(const TInt aIndex, TPtrC& aAttrName, |
|
64 TPtrC& aAttrValue) = 0; |
|
65 |
|
66 /** |
|
67 * Returns ETrue if object / tag has text data |
|
68 * @since Series 60 3.1 |
|
69 * @return ETrue if object / tag has text data |
|
70 */ |
|
71 virtual TBool HasTextData() = 0; |
|
72 |
|
73 /** |
|
74 * Returns XML node / content object text data if any |
|
75 * @since Series 60 3.1 |
|
76 * @param aText Text data returned |
|
77 * @param aIsLocalized Textdata localization status returned |
|
78 */ |
|
79 virtual void TextDetailsL(TPtrC& aText, TBool& aIsLocalized) = 0; |
|
80 |
|
81 }; |
|
82 |
|
83 |
|
84 #endif //CGECOATTRIBUTEPROVIDER_H |