22 #include "WriterController.h" |
22 #include "WriterController.h" |
23 |
23 |
24 const TInt KMaxWriterPluginCount = 10; |
24 const TInt KMaxWriterPluginCount = 10; |
25 |
25 |
26 |
26 |
27 CWriterController* CWriterController::NewL(CProfilerSampleStream& aStream) |
27 CWriterController* CWriterController::NewL(CProfilerSampleStream& aStream, TBool aBootMode) |
28 { |
28 { |
29 CWriterController* self = new( ELeave ) CWriterController(aStream); |
29 CWriterController* self = new( ELeave ) CWriterController(aStream, aBootMode); |
30 CleanupStack::PushL( self ); |
30 CleanupStack::PushL( self ); |
31 self->ConstructL( ); |
31 self->ConstructL( ); |
32 CleanupStack::Pop( self ); |
32 CleanupStack::Pop( self ); |
33 return self; |
33 return self; |
34 } |
34 } |
35 |
35 |
36 CWriterController::CWriterController(CProfilerSampleStream& aStream) : |
36 CWriterController::CWriterController(CProfilerSampleStream& aStream, TBool aBootMode) : |
37 iStream(aStream) |
37 iStream(aStream), |
|
38 iBootMode(aBootMode) |
38 { |
39 { |
39 } |
40 } |
40 |
41 |
41 void CWriterController::ConstructL() |
42 void CWriterController::ConstructL() |
42 { |
43 { |
43 // initiate writer plugin list |
44 // initiate writer plugin list |
44 |
45 LOGSTRING2("boot mode %d", iBootMode); |
45 } |
46 } |
46 |
47 |
47 |
48 |
48 void CWriterController::InitialiseWriterListL() |
49 void CWriterController::InitialiseWriterListL() |
49 { |
50 { |
50 // create new writer plugin array |
51 // create new writer plugin array |
51 iPluginArray = new(ELeave) CArrayPtrFlat<CWriterPluginInterface>( KMaxWriterPluginCount ); |
52 iPluginArray = new(ELeave) CArrayPtrFlat<CWriterPluginInterface>( KMaxWriterPluginCount ); |
52 |
53 |
53 // create new writer plugin loader |
54 // create new writer plugin loader |
54 iPluginLoader = CWriterPluginLoader::NewL(); |
55 iPluginLoader = CWriterPluginLoader::NewL(iBootMode); |
55 iPluginLoader->SetObserver( this ); |
56 iPluginLoader->SetObserver( this ); |
56 iPluginLoader->LoadAsyncL( iPluginArray ); |
57 if ( iBootMode ) |
57 |
58 { |
|
59 iPluginLoader->LoadRlibraryL( iPluginArray ); |
|
60 } |
|
61 else |
|
62 { |
|
63 iPluginLoader->LoadAsyncL( iPluginArray ); |
|
64 } |
58 LOGTEXT(_L(" RWriterController::InitialiseWriterList - exit")); |
65 LOGTEXT(_L(" RWriterController::InitialiseWriterList - exit")); |
59 } |
66 } |
60 |
67 |
61 CWriterController::~CWriterController() |
68 CWriterController::~CWriterController() |
62 { |
69 { |