equal
deleted
inserted
replaced
21 |
21 |
22 // ----------------------------------------------------------------------------- |
22 // ----------------------------------------------------------------------------- |
23 // |
23 // |
24 // ----------------------------------------------------------------------------- |
24 // ----------------------------------------------------------------------------- |
25 // |
25 // |
26 void ActivityStorageSyncTask::ExecuteL(CActivityStorage& dataStorage, const RMessage2& msg) |
26 void ActivityStorageSyncTask::ExecuteL(MActivityTaskStorage& observers, |
|
27 CActivityStorage& dataStorage, |
|
28 const RMessage2& msg) |
27 { |
29 { |
28 switch (msg.Function()) { |
30 switch (msg.Function()) { |
29 case AddActivity: |
31 case AddActivity: |
30 AddActivityL(dataStorage, msg); |
32 AddActivityL(dataStorage, msg); |
31 break; |
33 break; |
41 default: |
43 default: |
42 //this code shouldn't be called. fatal error: means wrong session implementation |
44 //this code shouldn't be called. fatal error: means wrong session implementation |
43 User::Panic(KUnsupportedStorageSyncTask, KErrGeneral); |
45 User::Panic(KUnsupportedStorageSyncTask, KErrGeneral); |
44 }; |
46 }; |
45 msg.Complete(KErrNone); |
47 msg.Complete(KErrNone); |
|
48 NotifyChangeL(observers, msg); |
46 } |
49 } |
47 |
50 |
48 // ----------------------------------------------------------------------------- |
51 // ----------------------------------------------------------------------------- |
49 // |
52 // |
50 // ----------------------------------------------------------------------------- |
53 // ----------------------------------------------------------------------------- |
122 { |
125 { |
123 TPckgBuf<TInt> appId; |
126 TPckgBuf<TInt> appId; |
124 msg.ReadL(KRequestAppIdOffset, appId); |
127 msg.ReadL(KRequestAppIdOffset, appId); |
125 dataStorage.DeleteActivitiesL(appId()); |
128 dataStorage.DeleteActivitiesL(appId()); |
126 } |
129 } |
|
130 |
|
131 // ----------------------------------------------------------------------------- |
|
132 // |
|
133 // ----------------------------------------------------------------------------- |
|
134 // |
|
135 void ActivityStorageSyncTask::NotifyChangeL(MActivityTaskStorage& observers, |
|
136 const RMessage2& msg) |
|
137 { |
|
138 const RPointerArray<CActivityTask> &table(observers.StorageData()); |
|
139 for (TInt iter(table.Count() - 1); 0 <= iter; --iter) { |
|
140 table[iter]->BroadcastReceivedL(msg); |
|
141 } |
|
142 } |