17 |
17 |
18 |
18 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 #include "cpimagnlistadapter.h" |
20 #include "cpimagnlistadapter.h" |
21 #include "mpimitemdata.h" |
21 #include "mpimitemdata.h" |
22 #include "javasymbianoslayer.h" |
22 #include "cleanupresetanddestroy.h" |
23 #include "cpimagnserverwait.h" |
23 #include "cpimagnserverwait.h" |
24 #include "logger.h" |
24 #include "logger.h" |
25 |
25 |
26 #include <calsession.h> |
26 #include <calsession.h> |
27 #include <calentryview.h> |
27 #include <calentryview.h> |
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 MCalChangeCallBack::TChangeEntryType aEntryType) |
57 |
58 { |
58 MCalChangeCallBack::TChangeEntryType aEntryType, |
59 JELOG2(EPim); |
59 CCalSession* aCalSession) |
|
60 { |
|
61 JELOG2(EPim); |
|
62 |
60 iServerWait = CPIMAgnServerWait::NewL(); |
63 iServerWait = CPIMAgnServerWait::NewL(); |
61 iCalSession = CCalSession::NewL(); |
64 iCalSession = aCalSession; |
62 iCalSession->OpenL(iCalSession->DefaultFileNameL()); |
|
63 iCalEntryView = CCalEntryView::NewL(*iCalSession, *iServerWait); |
65 iCalEntryView = CCalEntryView::NewL(*iCalSession, *iServerWait); |
64 iServerWait->WaitCompleteL(KServerMaxWait); |
66 iServerWait->WaitCompleteL(KServerMaxWait); |
65 |
67 |
66 iCalSession->StartChangeNotification(this, aEntryType, ETrue, // include undated ToDos, if ToDos are observed |
68 iCalSession->StartChangeNotification(this, aEntryType, ETrue, // include undated ToDos, if ToDos are observed |
67 TCalTime::MinTime(), TCalTime::MaxTime()); |
69 TCalTime::MinTime(), TCalTime::MaxTime()); |
283 // ----------------------------------------------------------------------------- |
285 // ----------------------------------------------------------------------------- |
284 // |
286 // |
285 void CPIMAgnListAdapter::CloseAgendaSession() |
287 void CPIMAgnListAdapter::CloseAgendaSession() |
286 { |
288 { |
287 JELOG2(EPim); |
289 JELOG2(EPim); |
|
290 iCalSession->StopChangeNotification(); |
288 delete iCalEntryView; |
291 delete iCalEntryView; |
289 iCalEntryView = NULL; |
292 iCalEntryView = NULL; |
290 |
|
291 delete iCalSession; |
|
292 iCalSession = NULL; |
293 iCalSession = NULL; |
293 |
294 |
294 iChangesRead = ETrue; |
295 iChangesRead = ETrue; |
295 } |
296 } |
296 |
297 |