|
1 /* |
|
2 * Copyright (c) 2008-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: Handles & propogates UI state change notifications. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef GLXHDMICONTROLLER_H_ |
|
19 #define GLXHDMICONTROLLER_H_ |
|
20 |
|
21 // Internal includes |
|
22 #include <mglxtvobserver.h> // for inteface MGlxTvObserver |
|
23 |
|
24 class CGlxHdmiContainer; |
|
25 class CGlxHdmiSurfaceUpdater; |
|
26 class CGlxTv; |
|
27 |
|
28 /* |
|
29 * This class will be called from FS and Slideshow for its requirements |
|
30 */ |
|
31 class CGlxHdmiController : public CBase, |
|
32 public MGlxTvObserver // for TV Out |
|
33 { |
|
34 public: |
|
35 /* |
|
36 * NewLC |
|
37 * @param1 - Image file path default to NULL |
|
38 */ |
|
39 IMPORT_C static CGlxHdmiController* NewL(const TDesC& aImageFile = KNullDesC ); |
|
40 |
|
41 /* |
|
42 * Destructor |
|
43 */ |
|
44 IMPORT_C ~CGlxHdmiController(); |
|
45 |
|
46 /* |
|
47 * Update Image |
|
48 * @param1 - Image file path |
|
49 * @param2 - Image dimensions |
|
50 * @param3 - frame count |
|
51 */ |
|
52 IMPORT_C void SetImageL(const TDesC& aImageFile,TSize aImageDimensions, |
|
53 TInt aFrameCount); |
|
54 |
|
55 /* |
|
56 * To Determine it is a video and not image |
|
57 */ |
|
58 IMPORT_C void IsVideo(); |
|
59 |
|
60 /* |
|
61 * Activating zoom in posting mode |
|
62 */ |
|
63 IMPORT_C void ActivateZoom(); |
|
64 /* |
|
65 * Deactivating zoom in posting mode |
|
66 */ |
|
67 IMPORT_C void DeactivateZoom(); |
|
68 private:// From MGlxTvObserver |
|
69 virtual void HandleTvStatusChangedL ( TTvChangeType aChangeType ); |
|
70 |
|
71 private: |
|
72 /* |
|
73 * Constructor |
|
74 */ |
|
75 CGlxHdmiController(const TDesC& aImageFile); |
|
76 |
|
77 /* |
|
78 * ConstructL |
|
79 */ |
|
80 void ConstructL(); |
|
81 |
|
82 /* |
|
83 * Create the Hdmi Container |
|
84 */ |
|
85 void CreateHdmiContainerL(); |
|
86 |
|
87 /* |
|
88 * Create surface updater and update background surface |
|
89 * @param1 - Image file |
|
90 * @param2 - Image dimensions |
|
91 * @param3 - framecount |
|
92 */ |
|
93 void CreateSurfaceUpdaterL(const TDesC& aImageFile, TSize aImageDimensions, |
|
94 TInt aFrameCount); |
|
95 |
|
96 /* |
|
97 * To Destroy the surface updater if present |
|
98 */ |
|
99 void DestroySurfaceUpdater(); |
|
100 |
|
101 /* |
|
102 * Detroy the container |
|
103 */ |
|
104 void DestroyContainer(); |
|
105 |
|
106 /* |
|
107 * |
|
108 */ |
|
109 void StoreImageInfoL(const TDesC& aImageFile, |
|
110 TSize aImageDimensions, TInt aFrameCount); |
|
111 |
|
112 private: |
|
113 const TDesC& iImagePath; // Image path |
|
114 HBufC* iStoredImagePath; |
|
115 TSize iImageDimensions; |
|
116 TInt iFrameCount; |
|
117 |
|
118 CGlxHdmiContainer* iHdmiContainer; |
|
119 CGlxHdmiSurfaceUpdater* iSurfaceUpdater; |
|
120 CGlxTv* iGlxTvOut; |
|
121 }; |
|
122 |
|
123 #endif /* GLXHDMICONTROLLER_H_ */ |