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