16 */ |
16 */ |
17 #include "afapplicationsengine.h" |
17 #include "afapplicationsengine.h" |
18 #include "afapplicationsstorage.h" |
18 #include "afapplicationsstorage.h" |
19 #include "afapplicationscollection.h" |
19 #include "afapplicationscollection.h" |
20 #include "afapplicationsmonitor.h" |
20 #include "afapplicationsmonitor.h" |
|
21 #include "aftaskstorage.h" |
|
22 #include "aftask.h" |
21 |
23 |
22 //------------------------------------------------------------------------------ |
24 //------------------------------------------------------------------------------ |
23 CAfApplicationsEngine* CAfApplicationsEngine::NewL(RApaLsSession& serviceProvider, |
25 CAfApplicationsEngine* CAfApplicationsEngine::NewL(RApaLsSession& serviceProvider, |
24 CAfStorage& storage) |
26 CAfStorage& storage, |
|
27 MAfTaskStorage& taskStorage) |
25 { |
28 { |
26 CAfApplicationsEngine *self = new(ELeave)CAfApplicationsEngine(); |
29 CAfApplicationsEngine *self = new(ELeave)CAfApplicationsEngine(taskStorage); |
27 CleanupStack::PushL(self); |
30 CleanupStack::PushL(self); |
28 self->ConstructL(storage, serviceProvider); |
31 self->ConstructL(serviceProvider, storage); |
29 CleanupStack::Pop(self); |
32 CleanupStack::Pop(self); |
30 return self; |
33 return self; |
31 } |
34 } |
32 |
35 |
33 //------------------------------------------------------------------------------ |
36 //------------------------------------------------------------------------------ |
34 CAfApplicationsEngine::CAfApplicationsEngine() |
37 CAfApplicationsEngine::CAfApplicationsEngine(MAfTaskStorage& taskStorage) : |
35 {} |
38 mTaskStorage(taskStorage) |
|
39 { |
|
40 } |
36 |
41 |
37 //------------------------------------------------------------------------------ |
42 //------------------------------------------------------------------------------ |
38 void CAfApplicationsEngine::ConstructL(CAfStorage& storage, |
43 void CAfApplicationsEngine::ConstructL(RApaLsSession& serviceProvider, |
39 RApaLsSession& serviceProvider) |
44 CAfStorage& storage) |
40 { |
45 { |
41 mCollection = CAfApplicationsCollection::NewL(serviceProvider); |
46 mCollection = CAfApplicationsCollection::NewL(serviceProvider); |
42 mMonitor = CAfApplicationsMonitor::NewL(serviceProvider, *mCollection); |
47 mMonitor = CAfApplicationsMonitor::NewL(serviceProvider, *mCollection); |
43 mStorage = CAfApplicationsStorage::NewL(storage, *mCollection); |
48 mStorage = CAfApplicationsStorage::NewL(storage, *mCollection, *this); |
44 |
49 |
45 mCollection->setObserver(*mStorage); |
50 mCollection->setObserver(*mStorage); |
46 } |
51 } |
47 |
52 |
48 //------------------------------------------------------------------------------ |
53 //------------------------------------------------------------------------------ |