equal
deleted
inserted
replaced
99 { |
99 { |
100 delete iEComWatcher; |
100 delete iEComWatcher; |
101 iEComWatcher = NULL; |
101 iEComWatcher = NULL; |
102 } |
102 } |
103 |
103 |
104 // Stop database change notifications. |
|
105 if( iDbChangeNotifier ) |
|
106 { |
|
107 delete iDbChangeNotifier; |
|
108 iDbChangeNotifier = NULL; |
|
109 } |
|
110 |
|
111 // Stop settings change notifications |
104 // Stop settings change notifications |
112 if( iCenRepChangeNotifier ) |
105 if( iCenRepChangeNotifier ) |
113 { |
106 { |
114 delete iCenRepChangeNotifier; |
107 delete iCenRepChangeNotifier; |
115 iCenRepChangeNotifier = NULL; |
108 iCenRepChangeNotifier = NULL; |
168 // Register for changes to Calendar settings from the Central Repository |
161 // Register for changes to Calendar settings from the Central Repository |
169 iRepository = CRepository::NewL( KCRUidCalendar ); |
162 iRepository = CRepository::NewL( KCRUidCalendar ); |
170 iCenRepChangeNotifier = CCenRepNotifyHandler::NewL( *this, *iRepository ); |
163 iCenRepChangeNotifier = CCenRepNotifyHandler::NewL( *this, *iRepository ); |
171 iCenRepChangeNotifier->StartListeningL(); |
164 iCenRepChangeNotifier->StartListeningL(); |
172 |
165 |
173 // Register for changes to our database session |
|
174 iDbChangeNotifier = CCalenDbChangeNotifier::NewL( *iGlobalData ); |
|
175 iDbChangeNotifier->RegisterObserverL( *this ); |
|
176 |
|
177 // Register for changes to the ECom registry |
166 // Register for changes to the ECom registry |
178 iEComWatcher = CCalenEComWatcher::NewL( *this ); |
167 iEComWatcher = CCalenEComWatcher::NewL( *this ); |
179 |
168 |
180 iIgnoreFirstLocaleChange = ETrue; |
169 iIgnoreFirstLocaleChange = ETrue; |
181 |
170 |
769 switch(changeType) |
758 switch(changeType) |
770 { |
759 { |
771 case MCalFileChangeObserver::ECalendarFileCreated: |
760 case MCalFileChangeObserver::ECalendarFileCreated: |
772 case MCalFileChangeObserver::ECalendarInfoCreated: |
761 case MCalFileChangeObserver::ECalendarInfoCreated: |
773 { |
762 { |
|
763 BroadcastNotification(ECalenNotifyDeleteInstanceView); |
774 BroadcastNotification(ECalenNotifyCalendarInfoCreated); |
764 BroadcastNotification(ECalenNotifyCalendarInfoCreated); |
775 } |
765 } |
776 break; |
766 break; |
777 case MCalFileChangeObserver::ECalendarFileDeleted: |
767 case MCalFileChangeObserver::ECalendarFileDeleted: |
778 { |
768 { |