phoneengine/PhoneCntFinder/ContactService/src/tphcntservicerequestparams.cpp
changeset 0 5f000ab63145
child 9 91c2fb4b78df
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Classes for service requests made to CPhCntService
       
    15 *
       
    16 */
       
    17 
       
    18 #include <coehelp.h>
       
    19 #include <AiwGenericParam.h>
       
    20 #include <AiwContactAssignDataTypes.h>
       
    21 #include <AiwGenericParam.hrh>
       
    22 #include <AiwContactSelectionDataTypes.h>
       
    23 #include <CVPbkFieldTypeSelector.h>
       
    24 #include <CVPbkContactStoreUriArray.h>
       
    25 #include <MVPbkContactLinkArray.h>
       
    26 #include <RVPbkContactFieldDefaultPriorities.h>
       
    27 #include <talogger.h>
       
    28 
       
    29 #include "tphcntservicerequestparams.h"
       
    30 #include "MPhCntContactManager.h"
       
    31 #include "cphcntcontactstoreuris.h"
       
    32 #include "CPhCntSingleItemFetch.h"
       
    33 
       
    34 // ======== MEMBER FUNCTIONS ========
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // Constructor
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 CPhCntServiceRequestParams::CPhCntServiceRequestParams(
       
    41     TAiwServiceCommands aAiwCommand ) : 
       
    42     iAiwCommand( aAiwCommand )
       
    43     {
       
    44     }
       
    45     
       
    46 CPhCntServiceRequestParams::~CPhCntServiceRequestParams()
       
    47     {
       
    48     delete iGenericParamList;
       
    49     iDefaultPriorities.Close();
       
    50     }
       
    51 
       
    52 // ---------------------------------------------------------------------------
       
    53 // Constructor
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 void CPhCntServiceRequestParams::BaseConstructL()
       
    57     {
       
    58     iGenericParamList = CAiwGenericParamList::NewL();
       
    59     }
       
    60     
       
    61 // ---------------------------------------------------------------------------
       
    62 // Gives the command
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65 TAiwServiceCommands CPhCntServiceRequestParams::Command() const
       
    66     {
       
    67     return iAiwCommand;
       
    68     }
       
    69     
       
    70 // ---------------------------------------------------------------------------
       
    71 // Gives the in param list
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 const CAiwGenericParamList& CPhCntServiceRequestParams::InParamList() const
       
    75     {
       
    76     return *iGenericParamList;
       
    77     }
       
    78 
       
    79 // ---------------------------------------------------------------------------
       
    80 // Constructor
       
    81 // ---------------------------------------------------------------------------
       
    82 //
       
    83 CPhCntCreateNewContactParams::CPhCntCreateNewContactParams(
       
    84     const TDesC& aPhoneNumber ) : 
       
    85     CPhCntServiceRequestParams( KAiwCmdAssign ),
       
    86     iPhoneNumber( aPhoneNumber )
       
    87     {        
       
    88     }
       
    89     
       
    90 // ---------------------------------------------------------------------------
       
    91 // Constructor
       
    92 // ---------------------------------------------------------------------------
       
    93 //
       
    94 CPhCntCreateNewContactParams* CPhCntCreateNewContactParams::NewL(
       
    95     const TDesC& aPhoneNumber )
       
    96     {
       
    97     CPhCntCreateNewContactParams* self = 
       
    98         CPhCntCreateNewContactParams::NewLC( aPhoneNumber );
       
    99     CleanupStack::Pop( self );
       
   100     return self;
       
   101     }
       
   102 
       
   103 // ---------------------------------------------------------------------------
       
   104 // Constructor
       
   105 // ---------------------------------------------------------------------------
       
   106 //    
       
   107 CPhCntCreateNewContactParams* CPhCntCreateNewContactParams::NewLC(
       
   108     const TDesC& aPhoneNumber )
       
   109     {
       
   110     CPhCntCreateNewContactParams* self = 
       
   111         new( ELeave )CPhCntCreateNewContactParams( aPhoneNumber );
       
   112     CleanupStack::PushL( self );
       
   113     self->ConstructL();
       
   114     return self;
       
   115     }
       
   116     
       
   117 // ---------------------------------------------------------------------------
       
   118 // Constructor
       
   119 // ---------------------------------------------------------------------------
       
   120 //
       
   121 void CPhCntCreateNewContactParams::ConstructL()
       
   122     {
       
   123     BaseConstructL();
       
   124     
       
   125     AiwContactAssign::TAiwSingleContactAssignDataV1 data = 
       
   126         AiwContactAssign::TAiwSingleContactAssignDataV1();
       
   127         
       
   128     // EHideEditorExit has to be set because otherwise AIW provider offers
       
   129     // exit menu item which will also exit the phone application.
       
   130     data.SetFlags( AiwContactAssign::ECreateNewContact | 
       
   131                    AiwContactAssign::EHideEditorExit ); 
       
   132 
       
   133     iGenericParamList->AppendL(
       
   134         TAiwGenericParam(
       
   135             EGenericParamPhoneNumber,
       
   136             TAiwVariant( iPhoneNumber ) ) );
       
   137             
       
   138     iGenericParamList->AppendL( 
       
   139         TAiwGenericParam(
       
   140             EGenericParamContactAssignData,
       
   141             TAiwVariant( 
       
   142                 AiwContactAssign::TAiwSingleContactAssignDataV1Pckg( data ) ) ) );
       
   143     }
       
   144     
       
   145 // ---------------------------------------------------------------------------
       
   146 // Constructor
       
   147 // ---------------------------------------------------------------------------
       
   148 //
       
   149 CPhCntUpdateExistingContact::CPhCntUpdateExistingContact(
       
   150     const TDesC& aPhoneNumber ) : 
       
   151     CPhCntServiceRequestParams( KAiwCmdAssign ),
       
   152     iPhoneNumber( aPhoneNumber )
       
   153     {        
       
   154     }
       
   155     
       
   156 // ---------------------------------------------------------------------------
       
   157 // Constructor
       
   158 // ---------------------------------------------------------------------------
       
   159 //
       
   160 CPhCntUpdateExistingContact* CPhCntUpdateExistingContact::NewL(
       
   161     const TDesC& aPhoneNumber )
       
   162     {
       
   163     CPhCntUpdateExistingContact* self = 
       
   164         CPhCntUpdateExistingContact::NewLC( aPhoneNumber );
       
   165     CleanupStack::Pop( self );
       
   166     return self;
       
   167     }
       
   168 
       
   169 // ---------------------------------------------------------------------------
       
   170 // Constructor
       
   171 // ---------------------------------------------------------------------------
       
   172 //    
       
   173 CPhCntUpdateExistingContact* CPhCntUpdateExistingContact::NewLC(
       
   174     const TDesC& aPhoneNumber )
       
   175     {
       
   176     CPhCntUpdateExistingContact* self = 
       
   177         new( ELeave )CPhCntUpdateExistingContact( aPhoneNumber );
       
   178     CleanupStack::PushL( self );
       
   179     self->ConstructL();
       
   180     return self;
       
   181     }
       
   182     
       
   183 // ---------------------------------------------------------------------------
       
   184 // Constructor
       
   185 // ---------------------------------------------------------------------------
       
   186 //
       
   187 void CPhCntUpdateExistingContact::ConstructL()
       
   188     {
       
   189     BaseConstructL();
       
   190     
       
   191     AiwContactAssign::TAiwSingleContactAssignDataV1 data = 
       
   192         AiwContactAssign::TAiwSingleContactAssignDataV1();
       
   193         
       
   194     data.SetFlags( AiwContactAssign::EHideEditorExit );
       
   195     
       
   196     iGenericParamList->AppendL(
       
   197         TAiwGenericParam(
       
   198             EGenericParamPhoneNumber,
       
   199             TAiwVariant( iPhoneNumber ) ) );
       
   200             
       
   201     iGenericParamList->AppendL( 
       
   202         TAiwGenericParam(
       
   203             EGenericParamContactAssignData,
       
   204             TAiwVariant( 
       
   205                 AiwContactAssign::TAiwSingleContactAssignDataV1Pckg( data ) ) ) );
       
   206     }
       
   207 
       
   208 // ---------------------------------------------------------------------------
       
   209 // Static constructor
       
   210 // ---------------------------------------------------------------------------
       
   211 //
       
   212 CPhCntGetUserSelectedPhoneNumberLink*   
       
   213     CPhCntGetUserSelectedPhoneNumberLink::NewLC(
       
   214         TBool aCallUsedWithLSK, MPhCntContactManager& aContactManager )
       
   215     {
       
   216     CPhCntGetUserSelectedPhoneNumberLink* self = 
       
   217         new( ELeave )CPhCntGetUserSelectedPhoneNumberLink();
       
   218     CleanupStack::PushL( self );
       
   219     self->ConstructL( aCallUsedWithLSK, aContactManager );
       
   220     return self;
       
   221     }
       
   222     
       
   223 // ---------------------------------------------------------------------------
       
   224 // Constructor
       
   225 // ---------------------------------------------------------------------------
       
   226 //
       
   227 CPhCntGetUserSelectedPhoneNumberLink::CPhCntGetUserSelectedPhoneNumberLink() : 
       
   228     CPhCntServiceRequestParams( KAiwCmdSelect )
       
   229     {
       
   230     }
       
   231     
       
   232 // ---------------------------------------------------------------------------
       
   233 // Destructor
       
   234 // ---------------------------------------------------------------------------
       
   235 //  
       
   236 CPhCntGetUserSelectedPhoneNumberLink::~CPhCntGetUserSelectedPhoneNumberLink()
       
   237     {
       
   238     delete iContactViewFilter;
       
   239     }
       
   240     
       
   241 
       
   242 // ---------------------------------------------------------------------------
       
   243 // Second phase constructor
       
   244 // ---------------------------------------------------------------------------
       
   245 // 
       
   246 void CPhCntGetUserSelectedPhoneNumberLink::ConstructL(
       
   247     TBool aCallUsedWithLSK, MPhCntContactManager& aContactManager )
       
   248     {
       
   249     TEFLOGSTRING( KTAOBJECT, "CNT CPhCntGetUserSelectedPhoneNumberLink::ConstructL" );
       
   250     BaseConstructL();
       
   251     iContactViewFilter = aContactManager.CreateFieldTypeSelectorL();
       
   252 
       
   253     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,   
       
   254         EVPbkContactViewFilterPhoneNumber );
       
   255     
       
   256 	iDefaultPriorities.Append( EVPbkDefaultTypePhoneNumber );    
       
   257 	
       
   258     TAiwSingleItemSelectionDataV3 data = TAiwSingleItemSelectionDataV3();
       
   259 	  
       
   260     if( aCallUsedWithLSK )
       
   261         {
       
   262         data.SetAddressSelectType( EAiwCallItemSelect );	    
       
   263         }
       
   264     else
       
   265         {
       
   266         data.SetAddressSelectType( EAiwPhoneNumberSelect );
       
   267         }
       
   268 	
       
   269 	data.SetDefaultPriorities( iDefaultPriorities ); 	
       
   270     data.SetFetchFilter( iContactViewFilter );
       
   271         
       
   272     iGenericParamList->AppendL(
       
   273         TAiwGenericParam(
       
   274             EGenericParamContactSelectionData,
       
   275             TAiwVariant( TAiwSingleItemSelectionDataV3Pckg( data ) ) ) );            
       
   276 
       
   277 	// Pass an array of currently active contact store uris
       
   278     CPhCntContactStoreUris& storeUris = aContactManager.ContactStoreUrisL();
       
   279 	CVPbkContactStoreUriArray* uriArray = storeUris.ActiveContactStoresL(); 
       
   280 	CleanupStack::PushL( uriArray );
       
   281 	if ( uriArray->Count() > 0 ) 
       
   282 		{ 
       
   283 		HBufC8* packedUris = uriArray->PackLC(); 
       
   284 		iGenericParamList->AppendL( 
       
   285 	        TAiwGenericParam( 
       
   286             	EGenericParamContactStoreUriArray, 
       
   287             	TAiwVariant( *packedUris ) 
       
   288             	) 
       
   289            	); 
       
   290 		CleanupStack::PopAndDestroy( packedUris ); 
       
   291 		}
       
   292 	CleanupStack::PopAndDestroy( uriArray );
       
   293     }
       
   294 
       
   295 // ---------------------------------------------------------------------------
       
   296 // Static constructor
       
   297 // ---------------------------------------------------------------------------
       
   298 //
       
   299 CPhCntGetUserSelectedVoIPAddressLink*   
       
   300     CPhCntGetUserSelectedVoIPAddressLink::NewLC(
       
   301         MPhCntContactManager& aContactManager,
       
   302         TBool aCallUsedWithLSK )
       
   303     {
       
   304     CPhCntGetUserSelectedVoIPAddressLink* self = 
       
   305         new( ELeave )CPhCntGetUserSelectedVoIPAddressLink();
       
   306     CleanupStack::PushL( self ); 
       
   307     self->ConstructL( aContactManager, aCallUsedWithLSK );
       
   308     return self;
       
   309     }
       
   310     
       
   311 // ---------------------------------------------------------------------------
       
   312 // Constructor
       
   313 // ---------------------------------------------------------------------------
       
   314 //
       
   315 CPhCntGetUserSelectedVoIPAddressLink::CPhCntGetUserSelectedVoIPAddressLink() : 
       
   316     CPhCntServiceRequestParams( KAiwCmdSelect )
       
   317     {
       
   318     }
       
   319 
       
   320 // ---------------------------------------------------------------------------
       
   321 // Second phase constructor
       
   322 // ---------------------------------------------------------------------------
       
   323 // 
       
   324 void CPhCntGetUserSelectedVoIPAddressLink::ConstructL(
       
   325     MPhCntContactManager& aContactManager,
       
   326     TBool aCallUsedWithLSK )
       
   327     {
       
   328     BaseConstructL();
       
   329 
       
   330     // Construct empty filter
       
   331     iContactViewFilter = aContactManager.CreateFieldTypeSelectorL();
       
   332 
       
   333     // Append the filter object with suitable criteria
       
   334     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,
       
   335         EVPbkContactViewFilterVoIP );
       
   336     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,   
       
   337         EVPbkContactViewFilterPhoneNumber );
       
   338     
       
   339     iDefaultPriorities.Append( EVPbkDefaultTypeVoIP ); 
       
   340                      
       
   341     TAiwSingleItemSelectionDataV3 data = TAiwSingleItemSelectionDataV3();
       
   342     
       
   343     
       
   344     if( aCallUsedWithLSK )
       
   345         {
       
   346         data.SetCommAddressSelectType( EAiwCommVOIPCall );
       
   347         data.SetAddressSelectType( EAiwVoIPItemSelect );	    
       
   348         }
       
   349     else
       
   350         {
       
   351         data.SetCommAddressSelectType( EAiwCommVOIPCall );
       
   352         }
       
   353     
       
   354     
       
   355     data.SetFetchFilter( iContactViewFilter );
       
   356 	data.SetDefaultPriorities( iDefaultPriorities ); 	
       
   357 	
       
   358     iGenericParamList->AppendL(
       
   359         TAiwGenericParam(
       
   360             EGenericParamContactSelectionData,
       
   361             TAiwVariant(TAiwSingleItemSelectionDataV3Pckg( data ) ) ) );
       
   362 
       
   363 	// Pass an array of currently active contact store uris
       
   364     CPhCntContactStoreUris* storeUris = CPhCntContactStoreUris::NewL();
       
   365 	CleanupStack::PushL( storeUris );
       
   366 	CVPbkContactStoreUriArray* uriArray = storeUris->ActiveContactStoresL();
       
   367 	CleanupStack::PushL( uriArray );
       
   368 	if ( uriArray->Count() > 0 ) 
       
   369 		{ 
       
   370 		HBufC8* packedUris = uriArray->PackLC(); 
       
   371 		iGenericParamList->AppendL( 
       
   372 	        TAiwGenericParam( 
       
   373             	EGenericParamContactStoreUriArray, 
       
   374             	TAiwVariant(*packedUris) 
       
   375             	) 
       
   376            	); 
       
   377 		CleanupStack::PopAndDestroy( packedUris ); 
       
   378 		}
       
   379 	CleanupStack::PopAndDestroy( uriArray );
       
   380 	CleanupStack::PopAndDestroy( storeUris );
       
   381     }
       
   382 
       
   383 
       
   384 
       
   385 // ---------------------------------------------------------------------------
       
   386 // Static constructor
       
   387 // ---------------------------------------------------------------------------
       
   388 //    
       
   389 CPhCntGetUserSelectedDtmfNumberLink* 
       
   390     CPhCntGetUserSelectedDtmfNumberLink::NewLC(
       
   391         MPhCntContactManager& aContactManager )
       
   392     {
       
   393     CPhCntGetUserSelectedDtmfNumberLink* self = 
       
   394         new( ELeave )CPhCntGetUserSelectedDtmfNumberLink();
       
   395     CleanupStack::PushL( self );
       
   396     self->ConstructL( aContactManager );
       
   397     return self;
       
   398     }
       
   399 
       
   400 // ---------------------------------------------------------------------------
       
   401 // Destructor
       
   402 // ---------------------------------------------------------------------------
       
   403 //  
       
   404 CPhCntGetUserSelectedDtmfNumberLink::~CPhCntGetUserSelectedDtmfNumberLink()
       
   405     {
       
   406     delete iContactViewFilter;
       
   407     }
       
   408     
       
   409 // ---------------------------------------------------------------------------
       
   410 // Constructor
       
   411 // ---------------------------------------------------------------------------
       
   412 //
       
   413 CPhCntGetUserSelectedDtmfNumberLink::CPhCntGetUserSelectedDtmfNumberLink() : 
       
   414     CPhCntServiceRequestParams( KAiwCmdSelect )
       
   415     {
       
   416     }
       
   417 
       
   418 // ---------------------------------------------------------------------------
       
   419 // Second phase constructor
       
   420 // ---------------------------------------------------------------------------
       
   421 //
       
   422 void CPhCntGetUserSelectedDtmfNumberLink::ConstructL(
       
   423     MPhCntContactManager& aContactManager )
       
   424     {
       
   425     BaseConstructL();
       
   426 
       
   427     // Construct empty filter
       
   428     iContactViewFilter = aContactManager.CreateFieldTypeSelectorL();
       
   429 
       
   430     // Append the filter object with suitable criteria
       
   431     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,
       
   432         EVPbkContactViewFilterDTMF );
       
   433     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,   
       
   434         EVPbkContactViewFilterPhoneNumber );
       
   435 
       
   436     iDefaultPriorities.Append( EVPbkDefaultTypePhoneNumber ); 
       
   437                      
       
   438     TAiwSingleItemSelectionDataV3 data;
       
   439     data.SetAddressSelectType(EAiwDTMFPhoneNumberSelect);
       
   440     data.SetFetchFilter( iContactViewFilter );
       
   441 	data.SetDefaultPriorities( iDefaultPriorities ); 	
       
   442                  
       
   443     iGenericParamList->AppendL(
       
   444         TAiwGenericParam( 
       
   445             EGenericParamContactSelectionData,
       
   446             TAiwVariant( TAiwSingleItemSelectionDataV3Pckg( data ) ) ) );
       
   447 	// Pass an array of currently active contact store uris
       
   448     CPhCntContactStoreUris* storeUris = CPhCntContactStoreUris::NewL();
       
   449 	CleanupStack::PushL( storeUris );				
       
   450 	CVPbkContactStoreUriArray* uriArray = storeUris->ActiveContactStoresL(); 
       
   451 	CleanupStack::PushL( uriArray );
       
   452 	if ( uriArray->Count() > 0 ) 
       
   453 		{ 
       
   454 		HBufC8* packedUris = uriArray->PackLC(); 
       
   455 		iGenericParamList->AppendL( 
       
   456 	        TAiwGenericParam( 
       
   457             	EGenericParamContactStoreUriArray, 
       
   458             	TAiwVariant(*packedUris) 
       
   459             	) 
       
   460            	); 
       
   461 		CleanupStack::PopAndDestroy( packedUris ); 
       
   462 		}
       
   463 	CleanupStack::PopAndDestroy( uriArray );
       
   464 	CleanupStack::PopAndDestroy( storeUris );
       
   465     }
       
   466 
       
   467 // ---------------------------------------------------------------------------
       
   468 // Static constructor
       
   469 // ---------------------------------------------------------------------------
       
   470 //    
       
   471 CPhCntGetPhoneNumberReqParam* 
       
   472     CPhCntGetPhoneNumberReqParam::NewL(
       
   473     	MPhCntContactManager& aContactManager, 
       
   474         MVPbkContactLinkArray& aLinkArray,
       
   475         const CPhCntSingleItemFetch::TCallType aCallType )
       
   476     {
       
   477     CPhCntGetPhoneNumberReqParam* self = 
       
   478         new( ELeave )CPhCntGetPhoneNumberReqParam();
       
   479     CleanupStack::PushL( self );
       
   480     self->ConstructL( aContactManager, aLinkArray, aCallType );
       
   481     CleanupStack::Pop( self );
       
   482     return self;
       
   483     }
       
   484 
       
   485 // ---------------------------------------------------------------------------
       
   486 // Destructor
       
   487 // ---------------------------------------------------------------------------
       
   488 //  
       
   489 CPhCntGetPhoneNumberReqParam::~CPhCntGetPhoneNumberReqParam()
       
   490     {    
       
   491     delete iContactViewFilter;
       
   492     }
       
   493     
       
   494 // ---------------------------------------------------------------------------
       
   495 // Constructor
       
   496 // ---------------------------------------------------------------------------
       
   497 //
       
   498 CPhCntGetPhoneNumberReqParam::CPhCntGetPhoneNumberReqParam() : 
       
   499     CPhCntServiceRequestParams( KAiwCmdSelect )
       
   500     {
       
   501     }
       
   502 
       
   503 // ---------------------------------------------------------------------------
       
   504 // Second phase constructor
       
   505 // ---------------------------------------------------------------------------
       
   506 //
       
   507 void CPhCntGetPhoneNumberReqParam::ConstructL(
       
   508 	MPhCntContactManager& aContactManager,
       
   509     MVPbkContactLinkArray& aLinkArray,
       
   510     const CPhCntSingleItemFetch::TCallType aCallType )
       
   511     {
       
   512     BaseConstructL();
       
   513                 
       
   514 	// Set filtering
       
   515 	TVPbkContactViewFilter filter = EVPbkContactViewFilterPhoneNumber;	    		                    		
       
   516 	TAiwSingleItemSelectionDataV3 data; 
       
   517 	data.SetAddressSelectType(  EAiwCallItemSelect );
       
   518 	switch( aCallType )
       
   519 		{				
       
   520 		case CPhCntSingleItemFetch::ECallPhoneNumber:			
       
   521     		iDefaultPriorities.Append( EVPbkDefaultTypePhoneNumber );    		
       
   522     		break;
       
   523     	case CPhCntSingleItemFetch::ECallVoip:
       
   524     		iDefaultPriorities.Append( EVPbkDefaultTypeVoIP );
       
   525     		filter = EVPbkContactViewFilterVoIP;
       
   526     		data.SetCommAddressSelectType( EAiwCommVOIPCall );
       
   527     		data.SetAddressSelectType(  EAiwVOIPSelect ); 		
       
   528     		break;
       
   529     	case CPhCntSingleItemFetch::ECallVideoNumber:
       
   530     		iDefaultPriorities.Append( EVPbkDefaultTypeVideoNumber );
       
   531     		filter = EVPbkContactViewFilterVideoNumber;
       
   532     		break;    	    		
       
   533     	default:
       
   534             break;
       
   535 		}
       
   536 		
       
   537 	// Construct empty filter
       
   538     iContactViewFilter = aContactManager.CreateFieldTypeSelectorL();
       
   539 
       
   540     // Append the filter object with suitable criteria
       
   541     aContactManager.AppendFilterToSelectorL( *iContactViewFilter, filter );   			
       
   542                                                  		
       
   543 	data.SetFetchFilter( iContactViewFilter ); 
       
   544 	data.SetDefaultPriorities( iDefaultPriorities ); 		
       
   545 	
       
   546     iGenericParamList->AppendL(
       
   547         TAiwGenericParam(
       
   548             EGenericParamContactSelectionData,
       
   549             TAiwVariant( TAiwSingleItemSelectionDataV3Pckg( data ) ) ) );
       
   550             
       
   551 	// Contact link array		
       
   552 	HBufC8* packedLinks = aLinkArray.PackLC();
       
   553 	iGenericParamList->AppendL( 
       
   554 	    TAiwGenericParam( 
       
   555 	    	EGenericParamContactLinkArray, 
       
   556 	    	TAiwVariant( *packedLinks ) 
       
   557 	    	) 
       
   558 	   	); 
       
   559    	CleanupStack::PopAndDestroy( packedLinks );
       
   560    			
       
   561     }
       
   562