|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Calendar Application Document |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // Debug |
|
21 #include "calendarui_debug.h" // Calendar debug macros |
|
22 |
|
23 // Include files |
|
24 #include "CalenDoc.h" // CCalenDocument |
|
25 #include "CalenAppUi.h" // CCalenAppUi |
|
26 #include "calencontroller.h" // CCalenController |
|
27 |
|
28 // ---------------------------------------------------------------------------- |
|
29 // CCalenDocument::NewL |
|
30 // First phase constructor |
|
31 // Creates a new CCalenDocument instance |
|
32 // ---------------------------------------------------------------------------- |
|
33 // |
|
34 CCalenDocument* CCalenDocument::NewL( CEikApplication& aApp ) |
|
35 { |
|
36 TRACE_ENTRY_POINT; |
|
37 |
|
38 CCalenDocument* self = new( ELeave )CCalenDocument( aApp ); |
|
39 |
|
40 TRACE_EXIT_POINT; |
|
41 return self; |
|
42 } |
|
43 |
|
44 // ---------------------------------------------------------------------------- |
|
45 // CCalenDocument::~CCalenDocument |
|
46 // Destructor |
|
47 // ---------------------------------------------------------------------------- |
|
48 // |
|
49 CCalenDocument::~CCalenDocument() |
|
50 { |
|
51 TRACE_ENTRY_POINT; |
|
52 |
|
53 if ( iController ) |
|
54 { |
|
55 iController->ReleaseCustomisations(); |
|
56 iController->Release(); |
|
57 } |
|
58 |
|
59 TRACE_EXIT_POINT; |
|
60 } |
|
61 |
|
62 // ---------------------------------------------------------------------------- |
|
63 // CCalenDocument::CCalenDocument |
|
64 // C++ default constructor |
|
65 // ---------------------------------------------------------------------------- |
|
66 // |
|
67 CCalenDocument::CCalenDocument( CEikApplication& aApp ) |
|
68 : CAknDocument( aApp ) |
|
69 { |
|
70 TRACE_ENTRY_POINT; |
|
71 TRACE_EXIT_POINT; |
|
72 } |
|
73 |
|
74 // ---------------------------------------------------------------------------- |
|
75 // CCalenDocument::CreateAppUiL |
|
76 // Creates a new CCalenAppUi instance |
|
77 // ---------------------------------------------------------------------------- |
|
78 // |
|
79 CEikAppUi* CCalenDocument::CreateAppUiL(void) |
|
80 { |
|
81 TRACE_ENTRY_POINT; |
|
82 |
|
83 TRACE_EXIT_POINT; |
|
84 return new( ELeave )CCalenAppUi; |
|
85 } |
|
86 |
|
87 // ---------------------------------------------------------------------------- |
|
88 // CCalenDocument::SetController |
|
89 // Takes ownership of the controller |
|
90 // ---------------------------------------------------------------------------- |
|
91 // |
|
92 void CCalenDocument::SetController( CCalenController* aController ) |
|
93 { |
|
94 TRACE_ENTRY_POINT; |
|
95 |
|
96 iController = aController; |
|
97 |
|
98 TRACE_EXIT_POINT; |
|
99 }; |
|
100 |
|
101 // End of File |