phonebookui/Phonebook2/ServerApplication/src/CPbk2ItemFetcher.cpp
branchRCL_3
changeset 17 2666d9724c76
parent 9 0d28c1c5b6dd
child 18 d4f567ce2e7c
equal deleted inserted replaced
15:34879f5cfc63 17:2666d9724c76
    72         }
    72         }
    73     TPbk2TitlePaneOperator titlePaneOperator;
    73     TPbk2TitlePaneOperator titlePaneOperator;
    74     titlePaneOperator.SetTitlePaneL( titlePaneText ); // takes ownership
    74     titlePaneOperator.SetTitlePaneL( titlePaneText ); // takes ownership
    75     }
    75     }
    76 
    76 
       
    77 
       
    78 /**
       
    79  * Change the StatusPane layout to use the mentioned StatusPane ID.
       
    80  *
       
    81  * @param aStatusPaneId     StatusPane ID
       
    82  */
       
    83 void SetStatusPaneL( TInt aStatusPaneId )
       
    84     {
       
    85     CEikStatusPane* statusPane =
       
    86             CEikonEnv::Static()->AppUiFactory()->StatusPane();
       
    87     
       
    88     if ( statusPane && 0 != aStatusPaneId )
       
    89         {
       
    90         statusPane->SwitchLayoutL( aStatusPaneId );        
       
    91         }                    
       
    92     }
       
    93 
    77 struct TMap
    94 struct TMap
    78     {
    95     {
    79     TAiwCommAddressSelectType aiwType;
    96     TAiwCommAddressSelectType aiwType;
    80     VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector selectorType;
    97     VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector selectorType;
    81     };
    98     };
   203 //
   220 //
   204 CPbk2ItemFetcher::CPbk2ItemFetcher
   221 CPbk2ItemFetcher::CPbk2ItemFetcher
   205         ( MPbk2UiServiceObserver& aObserver,
   222         ( MPbk2UiServiceObserver& aObserver,
   206           TPbk2FetchType aFetchType ) :
   223           TPbk2FetchType aFetchType ) :
   207             iObserver( aObserver ),
   224             iObserver( aObserver ),
   208             iFetchType( aFetchType )
   225             iFetchType( aFetchType ),
       
   226             iStatusPaneId( 0 )
   209     {
   227     {
   210     PBK2_DEBUG_PRINT( PBK2_DEBUG_STRING
   228     PBK2_DEBUG_PRINT( PBK2_DEBUG_STRING
   211         ("CPbk2ItemFetcher::CPbk2ItemFetcher()") );
   229         ("CPbk2ItemFetcher::CPbk2ItemFetcher()") );
   212     }
   230     }
   213 
   231 
   261     TPbk2ServerMessageDataRetriever dataRetriever;
   279     TPbk2ServerMessageDataRetriever dataRetriever;
   262     TUint flags = dataRetriever.FetchFlagsL( aMessage );
   280     TUint flags = dataRetriever.FetchFlagsL( aMessage );
   263 
   281 
   264     // Set title pane
   282     // Set title pane
   265     SetTitlePaneL( dataRetriever, flags, aMessage );
   283     SetTitlePaneL( dataRetriever, flags, aMessage );
       
   284     
       
   285     iStatusPaneId = dataRetriever.GetStatusPaneIdL( aMessage );
   266 
   286 
   267     iPreselectedContacts = dataRetriever.GetPreselectedContactLinksL
   287     iPreselectedContacts = dataRetriever.GetPreselectedContactLinksL
   268         ( aMessage, appUi.ApplicationServices().ContactManager() );
   288         ( aMessage, appUi.ApplicationServices().ContactManager() );
   269     iStoreUris = dataRetriever.GetContactStoreUriArrayL
   289     iStoreUris = dataRetriever.GetContactStoreUriArrayL
   270         ( aMessage, appUi.ApplicationServices().StoreConfiguration(),
   290         ( aMessage, appUi.ApplicationServices().StoreConfiguration(),
   673     delete iAddressSelectPhase;
   693     delete iAddressSelectPhase;
   674     iAddressSelectPhase = NULL;
   694     iAddressSelectPhase = NULL;
   675     delete iCommAddressSelectPhase;
   695     delete iCommAddressSelectPhase;
   676     iCommAddressSelectPhase = NULL;
   696     iCommAddressSelectPhase = NULL;
   677     
   697     
       
   698     //Restore the appropriate StatusPane
       
   699     SetStatusPaneL( iStatusPaneId );
       
   700     
   678     if ( iCommAddressSelectType != VPbkFieldTypeSelectorFactory::EEmptySelector )
   701     if ( iCommAddressSelectType != VPbkFieldTypeSelectorFactory::EEmptySelector )
   679         {
   702         {
   680         iCommAddressSelectPhase = CPbk2CommAddressSelectPhase::NewL
   703         iCommAddressSelectPhase = CPbk2CommAddressSelectPhase::NewL
   681             ( *this, aContactLinks.At( 0 ), iDefaultPriorities,
   704             ( *this, aContactLinks.At( 0 ), iDefaultPriorities,
   682               *iContactViewFilter, iCommAddressSelectType, rskBack );
   705               *iContactViewFilter, iCommAddressSelectType, rskBack );