1 /* |
|
2 * Copyright (c) 2009 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 // User includes |
|
19 #include "cradioengine.h" |
|
20 #include "cradioengineimp.h" |
|
21 #include "cradioenginelogger.h" |
|
22 #include "mradioengineinitializer.h" |
|
23 |
|
24 // ================= MEMBER FUNCTIONS ======================= |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // Starts the radio engine initialization. |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 EXPORT_C CRadioEngine* CRadioEngine::NewL( MRadioEngineInitializer& aInitializer ) |
|
31 { |
|
32 CRadioAudioRouter* audioRouter = aInitializer.InitAudioRouterL(); |
|
33 CleanupStack::PushL( audioRouter ); |
|
34 |
|
35 CRadioEngineImp* self = new (ELeave) CRadioEngineImp( audioRouter ); |
|
36 CleanupStack::Pop( audioRouter ); |
|
37 CleanupStack::PushL( self ); |
|
38 |
|
39 self->SetSystemEventCollector( aInitializer.InitSystemEventCollectorL() ); |
|
40 self->SetRadioSettings( aInitializer.InitSettingsL() ); |
|
41 self->SetRadioPubSub( aInitializer.InitPubSubL() ); |
|
42 self->ConstructL(); |
|
43 |
|
44 self->InitRadioL( self->DetermineRegion(), self->PubSub() ); |
|
45 self->EnableAudio( ETrue ); |
|
46 |
|
47 CleanupStack::Pop( self ); |
|
48 return self; |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 CRadioEngine::CRadioEngine( CRadioAudioRouter* aAudioRouter ) |
|
56 : CRadioRoutableAudio( aAudioRouter ) |
|
57 { |
|
58 } |
|
59 |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 // --------------------------------------------------------------------------- |
|
63 // |
|
64 EXPORT_C CRadioEngine::~CRadioEngine() |
|
65 { |
|
66 } |
|