|
1 /* |
|
2 * Copyright (c) 2005-2006 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 |
|
19 #ifndef MUSENGORIENTATIONHANDLER_H |
|
20 #define MUSENGORIENTATIONHANDLER_H |
|
21 |
|
22 |
|
23 // INTERNAL INCLUDE |
|
24 #include "musunittesting.h" |
|
25 |
|
26 // SYSTEM INCLUDE |
|
27 #include <e32base.h> |
|
28 |
|
29 class CMusEngLiveSession; |
|
30 class MMusEngLiveSessionObserver; |
|
31 |
|
32 /** |
|
33 * |
|
34 * @lib musengine.lib |
|
35 */ |
|
36 NONSHARABLE_CLASS(CMusEngOrientationHandler) : public CTimer |
|
37 |
|
38 { |
|
39 MUS_UNITTEST( UT_CMusEngOrientationHandler ) |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Creates new instance of CMusEngOrientationHandler |
|
45 */ |
|
46 static CMusEngOrientationHandler* NewL( CMusEngLiveSession& aSession, |
|
47 MMusEngLiveSessionObserver& aSessionObserver ); |
|
48 |
|
49 /** |
|
50 * Destructor |
|
51 * |
|
52 */ |
|
53 ~CMusEngOrientationHandler(); |
|
54 |
|
55 |
|
56 public: // API |
|
57 |
|
58 void RefreshOrientationL(); |
|
59 void UpdateL(); |
|
60 |
|
61 protected: |
|
62 |
|
63 void RunL(); |
|
64 TInt RunError( TInt aError ); |
|
65 |
|
66 private: |
|
67 |
|
68 CMusEngOrientationHandler( CMusEngLiveSession& aSession, |
|
69 MMusEngLiveSessionObserver& aSessionObserver ); |
|
70 void ConstructL(); |
|
71 |
|
72 void DoDelayedResumeL(); |
|
73 |
|
74 private: // DATA |
|
75 |
|
76 CMusEngLiveSession& iSession; |
|
77 MMusEngLiveSessionObserver& iSessionObserver; |
|
78 TBool iRefreshBeginStateCamera; |
|
79 TBool iRefreshBeginStateDisplay; |
|
80 |
|
81 }; |
|
82 |
|
83 #endif // MUSENGORIENTATIONHANDLER_H |