1 /* |
|
2 * Copyright (c) 2005-2005 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: State class for idle state |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "aistateidle.h" |
|
20 #include "aipluginstatemachine.h" |
|
21 #include "debug.h" |
|
22 |
|
23 // ======== MEMBER FUNCTIONS ======== |
|
24 |
|
25 // ---------------------------------------------------------------------------- |
|
26 // TAiStateIdle::TAiStateIdle() |
|
27 // ---------------------------------------------------------------------------- |
|
28 // |
|
29 TAiStateIdle::TAiStateIdle() |
|
30 { |
|
31 } |
|
32 |
|
33 // ---------------------------------------------------------------------------- |
|
34 // TAiStateIdle::Enter() |
|
35 // ---------------------------------------------------------------------------- |
|
36 // |
|
37 void TAiStateIdle::Enter( MAiPluginStateMachine& aStateMachine, |
|
38 TAiStateChanges aStateChange ) |
|
39 { |
|
40 __PRINTS( "XAI: Enter idle backup restore" ); |
|
41 const TAiTransitionReason reason( |
|
42 aStateMachine.TranslateReason( aStateChange ) ); |
|
43 |
|
44 aStateMachine.ChangePluginState( reason, CAiContentPublisher::Stop ); |
|
45 } |
|
46 |
|
47 // ---------------------------------------------------------------------------- |
|
48 // TAiStateIdle::HandleEvent() |
|
49 // ---------------------------------------------------------------------------- |
|
50 // |
|
51 TBool TAiStateIdle::HandleEvent( MAiPluginStateMachine& aStateMachine, |
|
52 TAiStateChanges aStateChange ) |
|
53 { |
|
54 __PRINTS( "XAI: Idle backup restore handle event" ); |
|
55 switch( aStateChange ) |
|
56 { |
|
57 case ESMAIBackupOff: |
|
58 { |
|
59 aStateMachine.SwitchToState( EAiAlive, aStateChange ); |
|
60 return ETrue; |
|
61 } |
|
62 case ESMAIKeylockEnabled: |
|
63 case ESMAIKeylockDisabled: // fallthrough |
|
64 { |
|
65 Enter( aStateMachine, aStateChange ); |
|
66 return ETrue; |
|
67 } |
|
68 default: |
|
69 { |
|
70 return EFalse; |
|
71 } |
|
72 } |
|
73 } |
|
74 |
|
75 // ---------------------------------------------------------------------------- |
|
76 // TAiStateIdle::Exit() |
|
77 // ---------------------------------------------------------------------------- |
|
78 // |
|
79 void TAiStateIdle::Exit( MAiPluginStateMachine& /*aStateMachine*/, |
|
80 TAiStateChanges /*aStateChange*/ ) |
|
81 { |
|
82 __PRINTS( "XAI: Exit idle backup restore" ); |
|
83 } |
|
84 |
|
85 // End of file |
|