17 |
17 |
18 // User includes |
18 // User includes |
19 #include "cradioengine.h" |
19 #include "cradioengine.h" |
20 #include "cradioengineimp.h" |
20 #include "cradioengineimp.h" |
21 #include "cradioenginelogger.h" |
21 #include "cradioenginelogger.h" |
22 #include "mradioengineinitializer.h" |
|
23 #include "radioengineutils.h" |
22 #include "radioengineutils.h" |
24 |
23 |
25 // ================= MEMBER FUNCTIONS ======================= |
24 // ================= MEMBER FUNCTIONS ======================= |
26 |
25 |
27 // --------------------------------------------------------------------------- |
26 // --------------------------------------------------------------------------- |
28 // Starts the radio engine initialization. |
27 // Starts the radio engine initialization. |
29 // --------------------------------------------------------------------------- |
28 // --------------------------------------------------------------------------- |
30 // |
29 // |
31 EXPORT_C CRadioEngine* CRadioEngine::NewL( MRadioEngineInitializer& aInitializer ) |
30 EXPORT_C CRadioEngine* CRadioEngine::NewL() |
32 { |
31 { |
33 RadioEngineUtils::InitializeL(); |
32 RadioEngineUtils::InitializeL(); |
34 LEVEL3( LOG_METHOD_AUTO ); |
33 LEVEL3( LOG_METHOD_AUTO ); |
35 CRadioAudioRouter* audioRouter = aInitializer.InitAudioRouterL(); |
|
36 CleanupStack::PushL( audioRouter ); |
|
37 |
34 |
38 CRadioEngineImp* self = new (ELeave) CRadioEngineImp( audioRouter ); |
35 return CRadioEngineImp::NewL(); |
39 CleanupStack::Pop( audioRouter ); |
|
40 CleanupStack::PushL( self ); |
|
41 |
|
42 self->SetSystemEventCollector( aInitializer.InitSystemEventCollectorL() ); |
|
43 self->SetRadioSettings( aInitializer.InitSettingsL() ); |
|
44 self->ConstructL(); |
|
45 |
|
46 self->InitRadioL( self->DetermineRegion() ); |
|
47 self->EnableAudio( ETrue ); |
|
48 |
|
49 CleanupStack::Pop( self ); |
|
50 return self; |
|
51 } |
36 } |
52 |
37 |
53 // --------------------------------------------------------------------------- |
38 // --------------------------------------------------------------------------- |
54 // |
39 // |
55 // --------------------------------------------------------------------------- |
40 // --------------------------------------------------------------------------- |