|
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: This class observes the accessory framework. |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 |
|
21 |
|
22 #ifndef MPXVIDEOACCESSORYOBSERVER_H |
|
23 #define MPXVIDEOACCESSORYOBSERVER_H |
|
24 |
|
25 // |
|
26 // INCLUDES |
|
27 // |
|
28 #include <e32std.h> |
|
29 #include <e32base.h> |
|
30 |
|
31 #include "mpxvideo_debug.h" |
|
32 |
|
33 // |
|
34 // FORWARD DECLARATIONS |
|
35 // |
|
36 class CMPXVideoPlaybackController; |
|
37 |
|
38 // |
|
39 // CLASS DECLARATION |
|
40 // |
|
41 |
|
42 NONSHARABLE_CLASS( CMPXVideoAccessoryObserver ) |
|
43 { |
|
44 public: |
|
45 /* |
|
46 * Two phase constructor |
|
47 * @param aObs Reference to an event observer |
|
48 */ |
|
49 static CMPXVideoAccessoryObserver* NewL( CMPXVideoPlaybackController* aController ); |
|
50 |
|
51 /* |
|
52 * Destructor |
|
53 */ |
|
54 virtual ~CMPXVideoAccessoryObserver(); |
|
55 |
|
56 public: |
|
57 |
|
58 /* |
|
59 * Returns the status of the TV-Out cable connection |
|
60 * @return the cable connection status |
|
61 * ETrue cable is connected. |
|
62 * EFalse cable is not connected. |
|
63 */ |
|
64 TBool IsTvOutConnected(); |
|
65 |
|
66 /* |
|
67 * Returns if the playback is allowed when the TV-Out cable is connected |
|
68 * @return playback is allowed |
|
69 * ETrue playback is allowed. |
|
70 * EFalse playback is not allowed. |
|
71 */ |
|
72 TBool IsTvOutPlaybackAllowed(); |
|
73 |
|
74 void UpdateTvOutStatusL( TBool aTvOutConnected ); |
|
75 void SetTvOutConnected( TBool aConnected ); |
|
76 void SetTvOutPlaybackAllowed( TBool aAllowed ); |
|
77 |
|
78 private: |
|
79 |
|
80 /* |
|
81 * C++ default constructor. |
|
82 * @param aObs Reference to an event observer |
|
83 */ |
|
84 CMPXVideoAccessoryObserver( CMPXVideoPlaybackController* aController ); |
|
85 |
|
86 /* |
|
87 * By default Symbian 2nd phase constructor is private. |
|
88 * Create and connect to the driver and Central Repository. |
|
89 */ |
|
90 void ConstructL(); |
|
91 |
|
92 private: |
|
93 |
|
94 CMPXVideoPlaybackController* iController; |
|
95 TBool iTvOutConnected; |
|
96 TBool iTvOutPlaybackAllowed; |
|
97 }; |
|
98 |
|
99 #endif // MPXVIDEOACCESSORYOBSERVER_H |
|
100 |
|
101 // End of File |