52 // CPIMAgnListAdapter::ConstructL |
52 // CPIMAgnListAdapter::ConstructL |
53 // Symbian 2nd phase constructor can leave. |
53 // Symbian 2nd phase constructor can leave. |
54 // ----------------------------------------------------------------------------- |
54 // ----------------------------------------------------------------------------- |
55 // |
55 // |
56 void CPIMAgnListAdapter::ConstructL( |
56 void CPIMAgnListAdapter::ConstructL( |
57 |
57 MCalChangeCallBack::TChangeEntryType aEntryType) |
58 MCalChangeCallBack::TChangeEntryType aEntryType, |
58 { |
59 CCalSession* aCalSession) |
59 JELOG2(EPim); |
60 { |
60 iServerWait = CPIMAgnServerWait::NewL(); |
61 JELOG2(EPim); |
61 iCalSession = CCalSession::NewL(); |
62 |
62 iCalSession->OpenL(iCalSession->DefaultFileNameL()); |
63 iServerWait = CPIMAgnServerWait::NewL(); |
63 iCalEntryView = CCalEntryView::NewL(*iCalSession, *iServerWait); |
64 iCalSession = aCalSession; |
|
65 iCalEntryView = CCalEntryView::NewL(*iCalSession, *iServerWait); |
|
66 iServerWait->WaitCompleteL(KServerMaxWait); |
64 iServerWait->WaitCompleteL(KServerMaxWait); |
67 |
65 |
68 iCalSession->StartChangeNotification(this, aEntryType, ETrue, // include undated ToDos, if ToDos are observed |
66 iCalSession->StartChangeNotification(this, aEntryType, ETrue, // include undated ToDos, if ToDos are observed |
69 TCalTime::MinTime(), TCalTime::MaxTime()); |
67 TCalTime::MinTime(), TCalTime::MaxTime()); |
70 } |
68 } |
285 // ----------------------------------------------------------------------------- |
283 // ----------------------------------------------------------------------------- |
286 // |
284 // |
287 void CPIMAgnListAdapter::CloseAgendaSession() |
285 void CPIMAgnListAdapter::CloseAgendaSession() |
288 { |
286 { |
289 JELOG2(EPim); |
287 JELOG2(EPim); |
290 iCalSession->StopChangeNotification(); |
|
291 delete iCalEntryView; |
288 delete iCalEntryView; |
292 iCalEntryView = NULL; |
289 iCalEntryView = NULL; |
|
290 |
|
291 delete iCalSession; |
293 iCalSession = NULL; |
292 iCalSession = NULL; |
294 |
293 |
295 iChangesRead = ETrue; |
294 iChangesRead = ETrue; |
296 } |
295 } |
297 |
296 |