|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Implementation of CCbsUiViewFactory. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDES |
|
22 #include "CCbsUiViewFactory.h" |
|
23 #include "CCbsUiSettingsView.h" |
|
24 #include "CCbsUiTopicListView.h" |
|
25 #include "CCbsUiTopicView.h" |
|
26 #include "CCbsUIMsgView.h" |
|
27 #include "CCbsUiTopicListMonitor.h" |
|
28 #include "CCbsUiSettingsMonitor.h" |
|
29 #include "CbsUiPanic.h" |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 // ================= MEMBER FUNCTIONS ======================= |
|
35 |
|
36 // C++ default constructor can NOT contain any code, that |
|
37 // might leave. |
|
38 // |
|
39 CCbsUiViewFactory::CCbsUiViewFactory( |
|
40 MCbs& aServer, CCbsUiTopicListMonitor& aTopicMonitor ) : |
|
41 iTopicMonitor( aTopicMonitor ), |
|
42 iServer( aServer ) |
|
43 { |
|
44 } |
|
45 |
|
46 // Destructor |
|
47 CCbsUiViewFactory::~CCbsUiViewFactory() |
|
48 { |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------- |
|
52 // CCbsUiViewFactory::CreateTopicListViewLC |
|
53 // |
|
54 // |
|
55 // --------------------------------------------------------- |
|
56 // |
|
57 CAknView* CCbsUiViewFactory::CreateTopicListViewLC() |
|
58 { |
|
59 CCbsUiTopicListView* view = CCbsUiTopicListView::NewL( iServer ); |
|
60 CleanupStack::PushL( view ); |
|
61 iTopicMonitor.AddObserverL( view ); |
|
62 return view; |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------- |
|
66 // CCbsUiViewFactory::CreateTopicViewLC |
|
67 // |
|
68 // |
|
69 // --------------------------------------------------------- |
|
70 // |
|
71 CAknView* CCbsUiViewFactory::CreateTopicViewLC() |
|
72 { |
|
73 CCbsUiTopicView* view = CCbsUiTopicView::NewL( iServer ); |
|
74 CleanupStack::PushL( view ); |
|
75 iTopicMonitor.AddObserverL( view ); |
|
76 return view; |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------- |
|
80 // CCbsUiViewFactory::CreateMsgViewLC |
|
81 // |
|
82 // |
|
83 // --------------------------------------------------------- |
|
84 // |
|
85 CAknView* CCbsUiViewFactory::CreateMsgViewLC() |
|
86 { |
|
87 CCbsUiMsgView* view = CCbsUiMsgView::NewL( iServer ); |
|
88 CleanupStack::PushL( view ); |
|
89 iTopicMonitor.AddObserverL( view ); |
|
90 return view; |
|
91 } |
|
92 |
|
93 // --------------------------------------------------------- |
|
94 // CCbsUiViewFactory::CreateSettingsViewLC |
|
95 // |
|
96 // |
|
97 // --------------------------------------------------------- |
|
98 // |
|
99 CAknView* CCbsUiViewFactory::CreateSettingsViewLC() |
|
100 { |
|
101 CCbsUiSettingsView* view = CCbsUiSettingsView::NewL( iServer ); |
|
102 CleanupStack::PushL( view ); |
|
103 view->UpdateContextPaneL(); |
|
104 return view; |
|
105 } |
|
106 |
|
107 |
|
108 // End of File |