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: UI framework observer for Active Idle framework |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <AknsConstants.h> // for KAknsMessageSkinChange equal general theme changed |
|
20 #include "aiuiframeworkobserverimpl.h" |
|
21 #include "debug.h" |
|
22 |
|
23 CAiUiFrameworkObserverImpl::CAiUiFrameworkObserverImpl( MAiStateManager& aManager ) |
|
24 : iManager( aManager ) |
|
25 { |
|
26 } |
|
27 |
|
28 void CAiUiFrameworkObserverImpl::ConstructL() |
|
29 { |
|
30 } |
|
31 |
|
32 CAiUiFrameworkObserverImpl* CAiUiFrameworkObserverImpl::NewL( MAiStateManager& aManager ) |
|
33 |
|
34 { |
|
35 CAiUiFrameworkObserverImpl* self = |
|
36 new(ELeave) CAiUiFrameworkObserverImpl( aManager ); |
|
37 CleanupStack::PushL( self ); |
|
38 self->ConstructL(); |
|
39 CleanupStack::Pop( self ); |
|
40 return self; |
|
41 } |
|
42 |
|
43 CAiUiFrameworkObserverImpl::~CAiUiFrameworkObserverImpl() |
|
44 { |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------------------------- |
|
48 // From class MAiUiFrameworkObserver. |
|
49 // |
|
50 // --------------------------------------------------------------------------- |
|
51 // |
|
52 void CAiUiFrameworkObserverImpl::HandleResourceChange( TInt aType ) |
|
53 { |
|
54 switch( aType ) |
|
55 { |
|
56 case KAknsMessageSkinChange: |
|
57 { |
|
58 iManager.ReportStateChange( ESMAIGeneralThemeChanged ); |
|
59 break; |
|
60 } |
|
61 default: |
|
62 { |
|
63 // Do nothing |
|
64 break; |
|
65 } |
|
66 } |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // From class MAiUiFrameworkObserver. |
|
71 // |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 void CAiUiFrameworkObserverImpl::HandleForegroundEvent( TBool /*aForeground*/ ) |
|
75 { |
|
76 // Focus observer disabled from this location |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // From class MAiDeviceStatusObserver. |
|
81 // |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 TAiStateChanges CAiUiFrameworkObserverImpl::Status() |
|
85 { |
|
86 // Resource change event are by nature single shot, so no status can |
|
87 // be defined for them. |
|
88 return ESMAIUnknownState; |
|
89 } |
|