|
1 /* |
|
2 * Copyright (c) 2004 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: This class provides |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CMETADATAFIELD_H |
|
21 #define CMETADATAFIELD_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <MetaDataField.hrh> |
|
26 |
|
27 // CLASS DECLARATION |
|
28 |
|
29 /** |
|
30 * This class implements |
|
31 * |
|
32 * @lib MetaDataUtility.lib |
|
33 * @since 3.0 |
|
34 */ |
|
35 class CMetaDataField : public CBase |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aId The ID of this metadata field |
|
42 * @param aData The field data |
|
43 * @return A pointer to a new instance of this class |
|
44 */ |
|
45 static CMetaDataField* NewLC( TMetaDataFieldId aId, const TDesC& aData ); |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @param aId The ID of this metadata field |
|
50 * @param aData An 8 bit field data |
|
51 * @return A pointer to a new instance of this class |
|
52 */ |
|
53 static CMetaDataField* NewLC( TMetaDataFieldId aId, const TDesC8& aData ); |
|
54 |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 virtual ~CMetaDataField(); |
|
60 |
|
61 public: // New functions |
|
62 |
|
63 /** |
|
64 * Returns the metadata field ID. |
|
65 * @since 3.0 |
|
66 * @return This field's ID |
|
67 */ |
|
68 TMetaDataFieldId Id() const; |
|
69 |
|
70 /** |
|
71 * Returns the metadata field data. |
|
72 * @since 3.0 |
|
73 * @return Pointer to data |
|
74 */ |
|
75 TPtrC Data() const; |
|
76 /** |
|
77 * Returns the metadata field 8 bit data. |
|
78 * @since 3.0 |
|
79 * @return Pointer to data |
|
80 */ |
|
81 TPtrC8 Data8() const; |
|
82 |
|
83 private: |
|
84 |
|
85 /** |
|
86 * C++ default constructor. |
|
87 */ |
|
88 CMetaDataField(); |
|
89 |
|
90 /** |
|
91 * By default Symbian 2nd phase constructor is private. |
|
92 */ |
|
93 void ConstructL( TMetaDataFieldId aId, const TDesC& aData ); |
|
94 |
|
95 /** |
|
96 * By default Symbian 2nd phase constructor is private. |
|
97 */ |
|
98 void ConstructL( TMetaDataFieldId aId, const TDesC8& aData ); |
|
99 |
|
100 private: // Data |
|
101 |
|
102 // MetaData field ID |
|
103 TMetaDataFieldId iId; |
|
104 // MetaData field content. Owned. |
|
105 HBufC* iData; |
|
106 // MetaData Field 8-bit content. Owned. |
|
107 HBufC8* iData8; |
|
108 }; |
|
109 |
|
110 #endif // CMETADATAFIELD_H |
|
111 |
|
112 // End of File |