phonebookui/phonebookservices/src/cntserviceviewfactory.cpp
changeset 59 a642906a277a
parent 37 fd64c38c277d
child 65 ae724a111993
equal deleted inserted replaced
47:7cbcb2896f0e 59:a642906a277a
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include "cntserviceviewfactory.h"
    18 #include "cntserviceviewfactory.h"
    19 #include "cntabstractview.h"
    19 #include "cntabstractview.h"
       
    20 
       
    21 
    20 #include "cntserviceeditview.h"
    22 #include "cntserviceeditview.h"
    21 #include "cntservicesubeditview.h"
    23 #include "cntservicecontactselectionview.h"
       
    24 
       
    25 #include "cntservicecontactcardview.h"
       
    26 #include "cntservicegroupmemberview.h"
    22 #include "cntservicecontactfetchview.h"
    27 #include "cntservicecontactfetchview.h"
    23 #include "cntservicecontactselectionview.h"
       
    24 #include "cntservicecontactcardview.h"
       
    25 #include "cntserviceassigncontactcardview.h"
    28 #include "cntserviceassigncontactcardview.h"
    26 
    29 
    27 CntServiceViewFactory::CntServiceViewFactory(CntServiceHandler* aHandler) : 
    30 
       
    31 CntServiceViewFactory::CntServiceViewFactory( CntAbstractServiceProvider& aServiceProvider ) : 
    28 CntDefaultViewFactory(),
    32 CntDefaultViewFactory(),
    29 mService( aHandler )
    33 mProvider( aServiceProvider )
    30 {
    34 {
    31 }
    35 }
    32 
    36 
    33 CntServiceViewFactory::~CntServiceViewFactory()
    37 CntServiceViewFactory::~CntServiceViewFactory()
    34 {
    38 {
    36     
    40     
    37 CntAbstractView* CntServiceViewFactory::createView( int aViewId )
    41 CntAbstractView* CntServiceViewFactory::createView( int aViewId )
    38 {
    42 {
    39     switch ( aViewId )
    43     switch ( aViewId )
    40     {
    44     {
    41     // contact fetch service view (fetching contacts from for example messaging)
    45     // contact fetch service view (for eg. requested by messaging)
    42     case serviceContactFetchView:
    46     case serviceContactFetchView:
    43         return new CntServiceContactFetchView( mService );
    47         return new CntServiceContactFetchView( mProvider );
    44     
    48 
    45     // contact selection service view (selecting contact to edit when updating existing contact)
    49     // contact selection service view (selecting contact to edit when updating existing contact)
    46     case serviceContactSelectionView:
    50     case serviceContactSelectionView:
    47         return new CntServiceContactSelectionView( mService );
    51         return new CntServiceContactSelectionView( mProvider );
    48             
    52             
    49     case serviceEditView:
    53     case serviceEditView:
    50         return new CntServiceEditView( mService );
    54         return new CntServiceEditView( mProvider );
    51         
    55 
    52     case serviceSubEditView:
       
    53         return new CntServiceSubEditView( mService );
       
    54     
       
    55     case serviceContactCardView:
    56     case serviceContactCardView:
    56         return new CntServiceContactCardView( mService );
    57         return new CntServiceContactCardView( mProvider );
    57             
    58             
    58     case serviceAssignContactCardView:
    59     case serviceAssignContactCardView:
    59         return new CntServiceAssignContactCardView( mService );
    60         return new CntServiceAssignContactCardView( mProvider );
    60         
    61         
       
    62     case serviceGroupMemberView:
       
    63         return new CntServiceGroupMemberView( mProvider );
       
    64 
    61     default:
    65     default:
    62         return CntDefaultViewFactory::createView( aViewId );
    66         return CntDefaultViewFactory::createView( aViewId );
    63     }
    67     }
    64 }
    68 }