|
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 #include <fbs.h> |
|
24 |
|
25 class CGlxHdmiContainer; |
|
26 class CGlxHdmiSurfaceUpdater; |
|
27 class CGlxTv; |
|
28 |
|
29 /* |
|
30 * This class will be called from FS and Slideshow for its requirements |
|
31 */ |
|
32 class CGlxHdmiController : public CBase, |
|
33 public MGlxTvObserver // for TV Out |
|
34 { |
|
35 public: |
|
36 /* |
|
37 * NewLC |
|
38 * @param1 - Image file path default to NULL |
|
39 */ |
|
40 IMPORT_C static CGlxHdmiController* NewL(); |
|
41 |
|
42 /* |
|
43 * Destructor |
|
44 */ |
|
45 IMPORT_C ~CGlxHdmiController(); |
|
46 |
|
47 /* |
|
48 * Update Image |
|
49 * @param1 - Image file path |
|
50 */ |
|
51 IMPORT_C void SetImageL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap = NULL, |
|
52 TBool aStore = ETrue); |
|
53 |
|
54 /* |
|
55 * To intimate that the item is not supported. |
|
56 */ |
|
57 IMPORT_C void ItemNotSupported(); |
|
58 |
|
59 /* |
|
60 * Activating zoom in posting mode |
|
61 */ |
|
62 IMPORT_C void ActivateZoom(TBool aAutoZoomOut); |
|
63 /* |
|
64 * Deactivating zoom in posting mode |
|
65 */ |
|
66 IMPORT_C void DeactivateZoom(); |
|
67 |
|
68 /* |
|
69 * ShiftToCloningMode |
|
70 */ |
|
71 IMPORT_C void ShiftToCloningMode(); |
|
72 |
|
73 /* |
|
74 * ShiftToPostingMode |
|
75 */ |
|
76 IMPORT_C void ShiftToPostingMode(); |
|
77 |
|
78 /* |
|
79 * Tells if HDMi is Connected. |
|
80 */ |
|
81 IMPORT_C TBool IsHDMIConnected(); |
|
82 |
|
83 private:// From MGlxTvObserver |
|
84 void HandleTvStatusChangedL ( TTvChangeType aChangeType ); |
|
85 |
|
86 private: |
|
87 /* |
|
88 * Constructor |
|
89 */ |
|
90 CGlxHdmiController(); |
|
91 |
|
92 /* |
|
93 * ConstructL |
|
94 */ |
|
95 void ConstructL(); |
|
96 |
|
97 /* |
|
98 * Create the Hdmi Container |
|
99 */ |
|
100 void CreateHdmiContainerL(); |
|
101 |
|
102 /* |
|
103 * Create surface updater and update background surface |
|
104 * @param1 - Image file |
|
105 */ |
|
106 void CreateSurfaceUpdaterL(const TDesC& aImageFile); |
|
107 |
|
108 /* |
|
109 * To Destroy the surface updater if present |
|
110 */ |
|
111 void DestroySurfaceUpdater(); |
|
112 |
|
113 /* |
|
114 * Detroy the container |
|
115 */ |
|
116 void DestroyContainer(); |
|
117 |
|
118 /* |
|
119 * Stores the Image File name |
|
120 * @param1 - Image file |
|
121 */ |
|
122 void StoreImageInfoL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap); |
|
123 |
|
124 private: |
|
125 CFbsBitmap* iFsBitmap; |
|
126 HBufC* iStoredImagePath; |
|
127 |
|
128 CGlxHdmiContainer* iHdmiContainer; |
|
129 CGlxHdmiSurfaceUpdater* iSurfaceUpdater; |
|
130 CGlxTv* iGlxTvOut; |
|
131 TBool iIsImageSupported; |
|
132 }; |
|
133 |
|
134 #endif /* GLXHDMICONTROLLER_H_ */ |