|
1 /* |
|
2 * Copyright (c) 2003, 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: Exif tag wrapper implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef EXIFTAGIMPL_H |
|
21 #define EXIFTAGIMPL_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "ExifTag.h" |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 // MACROS |
|
29 |
|
30 // DATA TYPES |
|
31 |
|
32 // FUNCTION PROTOTYPES |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * CExifTagImpl |
|
40 * Implementation class for manipulating Exif Tags. An instance of this class |
|
41 * can be instantiated |
|
42 * providing the internal data to insert into the Exif data. |
|
43 * |
|
44 * @lib ExifLib |
|
45 * @since 2.6 |
|
46 */ |
|
47 NONSHARABLE_CLASS( CExifTagImpl ): public CExifTag |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 static CExifTagImpl* NewL( |
|
55 TUint16 aTagId, |
|
56 TExifTagDataType aDataType, |
|
57 TUint32 aDataCount, |
|
58 HBufC8* aDataBuffer, |
|
59 TBool aCheckValidity ); |
|
60 |
|
61 /** |
|
62 * Two-phased constructor. |
|
63 */ |
|
64 static CExifTagImpl* NewL( TExifTagInfo aTagInfo, HBufC8* aDataBuffer, TBool aCheckValidity ); |
|
65 |
|
66 /** |
|
67 * Destructor. |
|
68 */ |
|
69 virtual ~CExifTagImpl(); |
|
70 |
|
71 public: // Functions from base classes |
|
72 |
|
73 /** |
|
74 * Duplicate constructor. Creates an exact copy instance of the tag. |
|
75 * @since 2.6 |
|
76 * @return Pointer to the new tag instance. |
|
77 */ |
|
78 CExifTag* DuplicateL() const; |
|
79 |
|
80 /** |
|
81 * Returns the informative fields of a tag. |
|
82 * @since 2.6 |
|
83 * @return Informative fields of the tag in associated structure. |
|
84 */ |
|
85 TExifTagInfo TagInfo() const; |
|
86 |
|
87 /** |
|
88 * Returns the ID of the tag. |
|
89 * @since 2.6 |
|
90 * @return The tag ID |
|
91 */ |
|
92 TUint16 Id() const; |
|
93 |
|
94 /** |
|
95 * Returns the data type of the tag. |
|
96 * @since 2.6 |
|
97 * @return The tag data type |
|
98 */ |
|
99 TExifTagDataType DataType() const; |
|
100 |
|
101 /** |
|
102 * Returns the data count of the tag. Data count is not in bytes, |
|
103 * it specifies the number of elements in the data type. |
|
104 * @since 2.6 |
|
105 * @return The number of tag data elements |
|
106 */ |
|
107 TUint32 DataCount() const; |
|
108 |
|
109 /** |
|
110 * Returns the data stored in the tag. |
|
111 * @since 2.6 |
|
112 * @return Unmodifiable pointer to the tag data. |
|
113 */ |
|
114 TPtrC8 Data() const; |
|
115 |
|
116 /** |
|
117 * Returns the total size of the tag in bytes. |
|
118 * @since 2.6 |
|
119 * @return The total size of the tag in bytes |
|
120 */ |
|
121 TUint Size() const; |
|
122 |
|
123 private: |
|
124 |
|
125 /** |
|
126 * Constructor. |
|
127 */ |
|
128 CExifTagImpl( TExifTagInfo aTagInfo ); |
|
129 |
|
130 /** |
|
131 * By default Symbian 2nd phase constructor is private. |
|
132 */ |
|
133 void ConstructL( HBufC8* aDataBuffer, TBool aCheckValidity ); |
|
134 |
|
135 private: |
|
136 |
|
137 // Informative fields of a tag |
|
138 TExifTagInfo iTagInfo; |
|
139 |
|
140 // Data of the tag. |
|
141 HBufC8* iData; |
|
142 |
|
143 }; |
|
144 |
|
145 #endif // EXIFTAGIMPL_H |
|
146 // End of File |