|
1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 #include "cntserviceviewfactory.h" |
|
19 #include "cntabstractview.h" |
|
20 |
|
21 #include "cntservicesubeditview.h" |
|
22 |
|
23 #include "cntserviceeditview.h" |
|
24 #include "cntservicecontactselectionview.h" |
|
25 |
|
26 #include "cntservicecontactcardview.h" |
|
27 #include "cntservicegroupmemberview.h" |
|
28 #include "cntservicecontactfetchview.h" |
|
29 #include "cntserviceassigncontactcardview.h" |
|
30 |
|
31 |
|
32 CntServiceViewFactory::CntServiceViewFactory( CntAbstractServiceProvider& aServiceProvider, CntExtensionManager& aMgr ) : |
|
33 CntDefaultViewFactory( aMgr ), |
|
34 mProvider( aServiceProvider ) |
|
35 { |
|
36 } |
|
37 |
|
38 CntServiceViewFactory::~CntServiceViewFactory() |
|
39 { |
|
40 } |
|
41 |
|
42 CntAbstractView* CntServiceViewFactory::createView( int aViewId ) |
|
43 { |
|
44 switch ( aViewId ) |
|
45 { |
|
46 // contact fetch service view (for eg. requested by messaging) |
|
47 case serviceContactFetchView: |
|
48 return new CntServiceContactFetchView( mProvider ); |
|
49 |
|
50 // contact selection service view (selecting contact to edit when updating existing contact) |
|
51 case serviceContactSelectionView: |
|
52 return new CntServiceContactSelectionView( mProvider ); |
|
53 |
|
54 case serviceEditView: |
|
55 return new CntServiceEditView( mProvider ); |
|
56 |
|
57 case editView: |
|
58 return new CntServiceSubEditView( mProvider ); |
|
59 |
|
60 case serviceContactCardView: |
|
61 return new CntServiceContactCardView( mProvider ); |
|
62 |
|
63 case serviceAssignContactCardView: |
|
64 return new CntServiceAssignContactCardView( mProvider ); |
|
65 |
|
66 case serviceGroupMemberView: |
|
67 return new CntServiceGroupMemberView( mProvider ); |
|
68 |
|
69 default: |
|
70 return CntDefaultViewFactory::createView( aViewId ); |
|
71 } |
|
72 } |