|
1 /* |
|
2 * Copyright (c) 2008 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: Metadata resolver class in the Memory manager component |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CMMMIMAGEMETADATARESOLVER_H |
|
20 #define C_CMMMIMAGEMETADATARESOLVER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <f32file.h> // RFs |
|
24 |
|
25 // Forward declarations |
|
26 class CExifRead; |
|
27 class CExifModify; |
|
28 |
|
29 /** |
|
30 * CCmMmImageMetadataResolver class |
|
31 * Part of Memory manager |
|
32 * |
|
33 * @lib cmmemorymanager.lib |
|
34 * @since S60 v3.2 |
|
35 */ |
|
36 class CCmMmImageMetadataResolver : public CBase |
|
37 { |
|
38 |
|
39 public: // Symbian constructors and C++ destructor |
|
40 |
|
41 /** |
|
42 * Creates new CCmMmImageMetadataResolver class |
|
43 * |
|
44 * @since S60 3.2 |
|
45 * @param aFileSession |
|
46 * @return pointer to CCmMmImageMetadataResolver object |
|
47 */ |
|
48 static CCmMmImageMetadataResolver* NewL( RFs& aFileSession ); |
|
49 |
|
50 /** |
|
51 * Creates new CCmMmImageMetadataResolver class and leaves the instance |
|
52 * in the cleanup stack |
|
53 * |
|
54 * @since S60 3.2 |
|
55 * @param aFileSession |
|
56 * @return pointer to CCmMmImageMetadataResolver object |
|
57 */ |
|
58 static CCmMmImageMetadataResolver* NewLC( RFs& aFileSession ); |
|
59 |
|
60 /** |
|
61 * @since S60 3.2 |
|
62 * |
|
63 * C++ destructor |
|
64 */ |
|
65 virtual ~CCmMmImageMetadataResolver(); |
|
66 |
|
67 public: // New methods |
|
68 |
|
69 /** |
|
70 * Captures orginal metadata |
|
71 * @since S60 3.2 |
|
72 * @param aOrigFileName, orginal file name |
|
73 * @return None |
|
74 */ |
|
75 void CaptureOrginalMetadataL( const TDesC& aOrigFileName ); |
|
76 |
|
77 /** |
|
78 * Captures and resolves image metadata |
|
79 * @since S60 3.2 |
|
80 * @param aShrinkedFileName, shrinked file name |
|
81 * @return None |
|
82 */ |
|
83 void ResolveMetadataL( const TDesC& aShrinkedFileName ); |
|
84 |
|
85 private: |
|
86 |
|
87 /** |
|
88 * Fills orginal exif data to shrinked image |
|
89 * @since S60 3.2 |
|
90 * @param aRead, exif reader |
|
91 * @param aModify, exif modifier |
|
92 * @return None |
|
93 */ |
|
94 void FillExifL( CExifRead& aRead, CExifModify& aModify ); |
|
95 |
|
96 private: // Constructors |
|
97 |
|
98 /** |
|
99 * C++ constructor |
|
100 * |
|
101 * @since S60 3.2 |
|
102 * @param None |
|
103 */ |
|
104 CCmMmImageMetadataResolver( RFs& aFileSession ); |
|
105 |
|
106 /** |
|
107 * Second-phase constructor |
|
108 * |
|
109 * @since S60 3.2 |
|
110 */ |
|
111 void ConstructL(); |
|
112 |
|
113 private: // data |
|
114 |
|
115 /** File session*/ |
|
116 RFs& iFileSession; |
|
117 |
|
118 /** Orginal Metadata ( owned ) */ |
|
119 HBufC8* iExifOrig; |
|
120 |
|
121 }; |
|
122 |
|
123 #endif // C_CMMMIMAGEMETADATARESOLVER_H |