|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef RS_DISP_CHANGE_NOTIFY |
|
17 #define RS_DISP_CHANGE_NOTIFY |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <graphics/wsdisplaycontrol.h> |
|
21 |
|
22 class CDisplayPolicy; |
|
23 class CRsDisplayChangeNotifier : public CActive |
|
24 { |
|
25 public: |
|
26 static CRsDisplayChangeNotifier* NewL(MWsDisplayControl* aNextLevelInterface, CDisplayPolicy* aDisplayPolicy); |
|
27 void IssueNotificationRequest(); |
|
28 void CancelNotificationRequest(); |
|
29 void RegisterActiveStatus(TRequestStatus &aStatus); |
|
30 ~CRsDisplayChangeNotifier(); |
|
31 protected: |
|
32 virtual void RunL(); |
|
33 virtual void DoCancel(); |
|
34 TInt RunError(TInt aError) |
|
35 { |
|
36 // will likely lead to inconsistent state and thus reset anyway |
|
37 RDebug::Print(_L("CRsDisplayChangeNotifier::RunError( %d )"),aError); |
|
38 aError -= (aError); |
|
39 return aError; //KErrNone; |
|
40 } |
|
41 |
|
42 private: |
|
43 CRsDisplayChangeNotifier(MWsDisplayControl* aNextLevelInterface, CDisplayPolicy* aDisplayPolicy); |
|
44 |
|
45 private: |
|
46 TRequestStatus* iWsStatus; |
|
47 MWsDisplayControl* iNextLevelInterface; |
|
48 CDisplayPolicy* iDisplayPolicy; |
|
49 }; |
|
50 |
|
51 class CRsConfigChangeNotifier : public CActive |
|
52 { |
|
53 public: |
|
54 static CRsConfigChangeNotifier* NewL(MWsDisplayControl* aNextLevelInterface); |
|
55 void IssueNotificationRequest(); |
|
56 void CancelNotificationRequest(); |
|
57 void RegisterActiveStatus(TRequestStatus &aStatus); |
|
58 ~CRsConfigChangeNotifier(); |
|
59 protected: |
|
60 virtual void RunL(); |
|
61 virtual void DoCancel(); |
|
62 private: |
|
63 CRsConfigChangeNotifier(MWsDisplayControl* aNextLevelInterface); |
|
64 |
|
65 private: |
|
66 TRequestStatus* iWsStatus; |
|
67 MWsDisplayControl* iNextLevelInterface; |
|
68 }; |
|
69 |
|
70 #endif |