1 /* |
|
2 * Copyright (c) 2004-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: Background task for activating sounds in skin package. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "pslntaskactivatesounds.h" |
|
20 #include "PslnSoundActivator.h" |
|
21 |
|
22 // ======== MEMBER FUNCTIONS ======== |
|
23 // --------------------------------------------------------------------------- |
|
24 // C++ constructor can NOT contain any code, that might leave. |
|
25 // --------------------------------------------------------------------------- |
|
26 // |
|
27 CPslnTaskActivateSounds::CPslnTaskActivateSounds( |
|
28 CPslnSoundActivator& aActivator ) : iDone( EFalse ), |
|
29 iActivator( aActivator ), |
|
30 iActivationErr( KErrNone ) |
|
31 { |
|
32 } |
|
33 |
|
34 // --------------------------------------------------------------------------- |
|
35 // Informs when task is finished. |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 TBool CPslnTaskActivateSounds::IsProcessDone() const |
|
39 { |
|
40 return iDone; |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------------------------- |
|
44 // Task step. |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 void CPslnTaskActivateSounds::StepL() |
|
48 { |
|
49 if( IsProcessDone() ) |
|
50 { |
|
51 return; |
|
52 } |
|
53 TRAP( iActivationErr, iActivator.ActivateToProfilesL() ); |
|
54 iDone = ETrue; |
|
55 } |
|
56 |
|
57 // End of file |
|