|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef GLXCOMMANDHANDLERROTATE_H |
|
19 #define GLXCOMMANDHANDLERROTATE_H |
|
20 |
|
21 #include <glxmpxcommandhandler.h> |
|
22 #include <ExifModify.h> |
|
23 |
|
24 #ifdef BUILD_COMMONCOMMANDHANDLERS |
|
25 #define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_EXPORT |
|
26 #else |
|
27 #define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_IMPORT |
|
28 #endif |
|
29 |
|
30 |
|
31 class GLX_COMMONCOMMANDHANDLERS_EXPORT GlxCommandHandlerRotate : public GlxMpxCommandHandler |
|
32 { |
|
33 public: |
|
34 GlxCommandHandlerRotate(); |
|
35 ~GlxCommandHandlerRotate(); |
|
36 CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume) const ; |
|
37 void DoExecuteCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume); |
|
38 private: |
|
39 /* |
|
40 * Responsible for rotating the Image by Changing the Image Orientation Exif |
|
41 */ |
|
42 void RotateImageL(TFileName aFileToBeRotated); |
|
43 /* |
|
44 * Responsible for Initializing the Exif writer. Will leave In case of Error |
|
45 */ |
|
46 void InitializeExifWriterL(TFileName aFileToBeRotated); |
|
47 void DestroyExifWriter(); |
|
48 TUint16 ReadImageOrientationL(); |
|
49 TUint16 CalculateFinalOrientationL(TUint16 aInitialOrientation); |
|
50 void SetImageOrientationL(TUint16 aFinalOrientation); |
|
51 |
|
52 RFs iFs; |
|
53 RFile iFileHandle; |
|
54 HBufC8* iExifData; |
|
55 CExifModify* iExifWriter; |
|
56 }; |
|
57 |
|
58 #endif // GLXCOMMANDHANDLERROTATE_H |