phoneengine/PhoneCntFinder/ContactService/src/tphcntservicerequestparams.cpp
branchRCL_3
changeset 25 5266b1f337bd
equal deleted inserted replaced
24:41a7f70b3818 25:5266b1f337bd
       
     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 	// By default an existing contact is opened, we'll override this behaviour
       
   129 	// by setting the ECreateNewContact flag
       
   130     data.SetFlags( AiwContactAssign::ECreateNewContact );
       
   131 
       
   132     iGenericParamList->AppendL(
       
   133         TAiwGenericParam(
       
   134             EGenericParamPhoneNumber,
       
   135             TAiwVariant( iPhoneNumber ) ) );
       
   136             
       
   137     iGenericParamList->AppendL( 
       
   138         TAiwGenericParam(
       
   139             EGenericParamContactAssignData,
       
   140             TAiwVariant( 
       
   141                 AiwContactAssign::TAiwSingleContactAssignDataV1Pckg( data ) ) ) );
       
   142     }
       
   143     
       
   144 // ---------------------------------------------------------------------------
       
   145 // Constructor
       
   146 // ---------------------------------------------------------------------------
       
   147 //
       
   148 CPhCntUpdateExistingContact::CPhCntUpdateExistingContact(
       
   149     const TDesC& aPhoneNumber ) : 
       
   150     CPhCntServiceRequestParams( KAiwCmdAssign ),
       
   151     iPhoneNumber( aPhoneNumber )
       
   152     {        
       
   153     }
       
   154     
       
   155 // ---------------------------------------------------------------------------
       
   156 // Constructor
       
   157 // ---------------------------------------------------------------------------
       
   158 //
       
   159 CPhCntUpdateExistingContact* CPhCntUpdateExistingContact::NewL(
       
   160     const TDesC& aPhoneNumber )
       
   161     {
       
   162     CPhCntUpdateExistingContact* self = 
       
   163         CPhCntUpdateExistingContact::NewLC( aPhoneNumber );
       
   164     CleanupStack::Pop( self );
       
   165     return self;
       
   166     }
       
   167 
       
   168 // ---------------------------------------------------------------------------
       
   169 // Constructor
       
   170 // ---------------------------------------------------------------------------
       
   171 //    
       
   172 CPhCntUpdateExistingContact* CPhCntUpdateExistingContact::NewLC(
       
   173     const TDesC& aPhoneNumber )
       
   174     {
       
   175     CPhCntUpdateExistingContact* self = 
       
   176         new( ELeave )CPhCntUpdateExistingContact( aPhoneNumber );
       
   177     CleanupStack::PushL( self );
       
   178     self->ConstructL();
       
   179     return self;
       
   180     }
       
   181     
       
   182 // ---------------------------------------------------------------------------
       
   183 // Constructor
       
   184 // ---------------------------------------------------------------------------
       
   185 //
       
   186 void CPhCntUpdateExistingContact::ConstructL()
       
   187     {
       
   188     BaseConstructL();
       
   189     
       
   190     AiwContactAssign::TAiwSingleContactAssignDataV1 data = 
       
   191         AiwContactAssign::TAiwSingleContactAssignDataV1();
       
   192         
       
   193     iGenericParamList->AppendL(
       
   194         TAiwGenericParam(
       
   195             EGenericParamPhoneNumber,
       
   196             TAiwVariant( iPhoneNumber ) ) );
       
   197             
       
   198     iGenericParamList->AppendL( 
       
   199         TAiwGenericParam(
       
   200             EGenericParamContactAssignData,
       
   201             TAiwVariant( 
       
   202                 AiwContactAssign::TAiwSingleContactAssignDataV1Pckg( data ) ) ) );
       
   203     }
       
   204 
       
   205 // ---------------------------------------------------------------------------
       
   206 // Static constructor
       
   207 // ---------------------------------------------------------------------------
       
   208 //
       
   209 CPhCntGetUserSelectedPhoneNumberLink*   
       
   210     CPhCntGetUserSelectedPhoneNumberLink::NewLC(
       
   211         TBool aCallUsedWithLSK, MPhCntContactManager& aContactManager )
       
   212     {
       
   213     CPhCntGetUserSelectedPhoneNumberLink* self = 
       
   214         new( ELeave )CPhCntGetUserSelectedPhoneNumberLink();
       
   215     CleanupStack::PushL( self );
       
   216     self->ConstructL( aCallUsedWithLSK, aContactManager );
       
   217     return self;
       
   218     }
       
   219     
       
   220 // ---------------------------------------------------------------------------
       
   221 // Constructor
       
   222 // ---------------------------------------------------------------------------
       
   223 //
       
   224 CPhCntGetUserSelectedPhoneNumberLink::CPhCntGetUserSelectedPhoneNumberLink() : 
       
   225     CPhCntServiceRequestParams( KAiwCmdSelect )
       
   226     {
       
   227     }
       
   228     
       
   229 // ---------------------------------------------------------------------------
       
   230 // Destructor
       
   231 // ---------------------------------------------------------------------------
       
   232 //  
       
   233 CPhCntGetUserSelectedPhoneNumberLink::~CPhCntGetUserSelectedPhoneNumberLink()
       
   234     {
       
   235     delete iContactViewFilter;
       
   236     }
       
   237     
       
   238 
       
   239 // ---------------------------------------------------------------------------
       
   240 // Second phase constructor
       
   241 // ---------------------------------------------------------------------------
       
   242 // 
       
   243 void CPhCntGetUserSelectedPhoneNumberLink::ConstructL(
       
   244     TBool aCallUsedWithLSK, MPhCntContactManager& aContactManager )
       
   245     {
       
   246     TEFLOGSTRING( KTAOBJECT, "CNT CPhCntGetUserSelectedPhoneNumberLink::ConstructL" );
       
   247     BaseConstructL();
       
   248     iContactViewFilter = aContactManager.CreateFieldTypeSelectorL();
       
   249 
       
   250     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,   
       
   251         EVPbkContactViewFilterPhoneNumber );
       
   252 	
       
   253     TAiwSingleItemSelectionDataV3 data = TAiwSingleItemSelectionDataV3();
       
   254 	  
       
   255     if( aCallUsedWithLSK )
       
   256         {
       
   257         data.SetAddressSelectType( EAiwCallItemSelect );	    
       
   258         }
       
   259     else
       
   260         {
       
   261         data.SetAddressSelectType( EAiwPhoneNumberSelect );
       
   262         }
       
   263 	
       
   264 	data.SetDefaultPriorities( iDefaultPriorities ); 	
       
   265     data.SetFetchFilter( iContactViewFilter );
       
   266         
       
   267     iGenericParamList->AppendL(
       
   268         TAiwGenericParam(
       
   269             EGenericParamContactSelectionData,
       
   270             TAiwVariant( TAiwSingleItemSelectionDataV3Pckg( data ) ) ) );            
       
   271 
       
   272 	// Pass an array of currently active contact store uris
       
   273     CPhCntContactStoreUris& storeUris = aContactManager.ContactStoreUrisL();
       
   274 	CVPbkContactStoreUriArray* uriArray = storeUris.ActiveContactStoresL(); 
       
   275 	CleanupStack::PushL( uriArray );
       
   276 	if ( uriArray->Count() > 0 ) 
       
   277 		{ 
       
   278 		HBufC8* packedUris = uriArray->PackLC(); 
       
   279 		iGenericParamList->AppendL( 
       
   280 	        TAiwGenericParam( 
       
   281             	EGenericParamContactStoreUriArray, 
       
   282             	TAiwVariant( *packedUris ) 
       
   283             	) 
       
   284            	); 
       
   285 		CleanupStack::PopAndDestroy( packedUris ); 
       
   286 		}
       
   287 	CleanupStack::PopAndDestroy( uriArray );
       
   288     }
       
   289 
       
   290 // ---------------------------------------------------------------------------
       
   291 // Static constructor
       
   292 // ---------------------------------------------------------------------------
       
   293 //
       
   294 CPhCntGetUserSelectedVoIPAddressLink*   
       
   295     CPhCntGetUserSelectedVoIPAddressLink::NewLC(
       
   296         MPhCntContactManager& aContactManager,
       
   297         TBool aCallUsedWithLSK )
       
   298     {
       
   299     CPhCntGetUserSelectedVoIPAddressLink* self = 
       
   300         new( ELeave )CPhCntGetUserSelectedVoIPAddressLink();
       
   301     CleanupStack::PushL( self ); 
       
   302     self->ConstructL( aContactManager, aCallUsedWithLSK );
       
   303     return self;
       
   304     }
       
   305     
       
   306 // ---------------------------------------------------------------------------
       
   307 // Constructor
       
   308 // ---------------------------------------------------------------------------
       
   309 //
       
   310 CPhCntGetUserSelectedVoIPAddressLink::CPhCntGetUserSelectedVoIPAddressLink() : 
       
   311     CPhCntServiceRequestParams( KAiwCmdSelect )
       
   312     {
       
   313     }
       
   314 
       
   315 // ---------------------------------------------------------------------------
       
   316 // Second phase constructor
       
   317 // ---------------------------------------------------------------------------
       
   318 // 
       
   319 void CPhCntGetUserSelectedVoIPAddressLink::ConstructL(
       
   320     MPhCntContactManager& aContactManager,
       
   321     TBool aCallUsedWithLSK )
       
   322     {
       
   323     BaseConstructL();
       
   324 
       
   325     // Construct empty filter
       
   326     iContactViewFilter = aContactManager.CreateFieldTypeSelectorL();
       
   327 
       
   328     // Append the filter object with suitable criteria
       
   329     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,
       
   330         EVPbkContactViewFilterVoIP );
       
   331     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,   
       
   332         EVPbkContactViewFilterPhoneNumber );
       
   333     
       
   334     iDefaultPriorities.Append( EVPbkDefaultTypeVoIP ); 
       
   335                      
       
   336     TAiwSingleItemSelectionDataV3 data = TAiwSingleItemSelectionDataV3();
       
   337     
       
   338     
       
   339     if( aCallUsedWithLSK )
       
   340         {
       
   341         data.SetCommAddressSelectType( EAiwCommVOIPCall );
       
   342         data.SetAddressSelectType( EAiwVoIPItemSelect );	    
       
   343         }
       
   344     else
       
   345         {
       
   346         data.SetCommAddressSelectType( EAiwCommVOIPCall );
       
   347         }
       
   348     
       
   349     
       
   350     data.SetFetchFilter( iContactViewFilter );
       
   351 	data.SetDefaultPriorities( iDefaultPriorities ); 	
       
   352 	
       
   353     iGenericParamList->AppendL(
       
   354         TAiwGenericParam(
       
   355             EGenericParamContactSelectionData,
       
   356             TAiwVariant(TAiwSingleItemSelectionDataV3Pckg( data ) ) ) );
       
   357 
       
   358 	// Pass an array of currently active contact store uris
       
   359     CPhCntContactStoreUris* storeUris = CPhCntContactStoreUris::NewL();
       
   360 	CleanupStack::PushL( storeUris );
       
   361 	CVPbkContactStoreUriArray* uriArray = storeUris->ActiveContactStoresL();
       
   362 	CleanupStack::PushL( uriArray );
       
   363 	if ( uriArray->Count() > 0 ) 
       
   364 		{ 
       
   365 		HBufC8* packedUris = uriArray->PackLC(); 
       
   366 		iGenericParamList->AppendL( 
       
   367 	        TAiwGenericParam( 
       
   368             	EGenericParamContactStoreUriArray, 
       
   369             	TAiwVariant(*packedUris) 
       
   370             	) 
       
   371            	); 
       
   372 		CleanupStack::PopAndDestroy( packedUris ); 
       
   373 		}
       
   374 	CleanupStack::PopAndDestroy( uriArray );
       
   375 	CleanupStack::PopAndDestroy( storeUris );
       
   376     }
       
   377 
       
   378 
       
   379 
       
   380 // ---------------------------------------------------------------------------
       
   381 // Static constructor
       
   382 // ---------------------------------------------------------------------------
       
   383 //    
       
   384 CPhCntGetUserSelectedDtmfNumberLink* 
       
   385     CPhCntGetUserSelectedDtmfNumberLink::NewLC(
       
   386         MPhCntContactManager& aContactManager )
       
   387     {
       
   388     CPhCntGetUserSelectedDtmfNumberLink* self = 
       
   389         new( ELeave )CPhCntGetUserSelectedDtmfNumberLink();
       
   390     CleanupStack::PushL( self );
       
   391     self->ConstructL( aContactManager );
       
   392     return self;
       
   393     }
       
   394 
       
   395 // ---------------------------------------------------------------------------
       
   396 // Destructor
       
   397 // ---------------------------------------------------------------------------
       
   398 //  
       
   399 CPhCntGetUserSelectedDtmfNumberLink::~CPhCntGetUserSelectedDtmfNumberLink()
       
   400     {
       
   401     delete iContactViewFilter;
       
   402     }
       
   403     
       
   404 // ---------------------------------------------------------------------------
       
   405 // Constructor
       
   406 // ---------------------------------------------------------------------------
       
   407 //
       
   408 CPhCntGetUserSelectedDtmfNumberLink::CPhCntGetUserSelectedDtmfNumberLink() : 
       
   409     CPhCntServiceRequestParams( KAiwCmdSelect )
       
   410     {
       
   411     }
       
   412 
       
   413 // ---------------------------------------------------------------------------
       
   414 // Second phase constructor
       
   415 // ---------------------------------------------------------------------------
       
   416 //
       
   417 void CPhCntGetUserSelectedDtmfNumberLink::ConstructL(
       
   418     MPhCntContactManager& aContactManager )
       
   419     {
       
   420     BaseConstructL();
       
   421 
       
   422     // Construct empty filter
       
   423     iContactViewFilter = aContactManager.CreateFieldTypeSelectorL();
       
   424 
       
   425     // Append the filter object with suitable criteria
       
   426     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,
       
   427         EVPbkContactViewFilterDTMF );
       
   428     aContactManager.AppendFilterToSelectorL( *iContactViewFilter,   
       
   429         EVPbkContactViewFilterPhoneNumber );
       
   430                      
       
   431     TAiwSingleItemSelectionDataV3 data;
       
   432     data.SetAddressSelectType(EAiwDTMFPhoneNumberSelect);
       
   433     data.SetFetchFilter( iContactViewFilter );
       
   434 	data.SetDefaultPriorities( iDefaultPriorities ); 	
       
   435                  
       
   436     iGenericParamList->AppendL(
       
   437         TAiwGenericParam( 
       
   438             EGenericParamContactSelectionData,
       
   439             TAiwVariant( TAiwSingleItemSelectionDataV3Pckg( data ) ) ) );
       
   440 	// Pass an array of currently active contact store uris
       
   441     CPhCntContactStoreUris* storeUris = CPhCntContactStoreUris::NewL();
       
   442 	CleanupStack::PushL( storeUris );				
       
   443 	CVPbkContactStoreUriArray* uriArray = storeUris->ActiveContactStoresL(); 
       
   444 	CleanupStack::PushL( uriArray );
       
   445 	if ( uriArray->Count() > 0 ) 
       
   446 		{ 
       
   447 		HBufC8* packedUris = uriArray->PackLC(); 
       
   448 		iGenericParamList->AppendL( 
       
   449 	        TAiwGenericParam( 
       
   450             	EGenericParamContactStoreUriArray, 
       
   451             	TAiwVariant(*packedUris) 
       
   452             	) 
       
   453            	); 
       
   454 		CleanupStack::PopAndDestroy( packedUris ); 
       
   455 		}
       
   456 	CleanupStack::PopAndDestroy( uriArray );
       
   457 	CleanupStack::PopAndDestroy( storeUris );
       
   458     }
       
   459 
       
   460 // ---------------------------------------------------------------------------
       
   461 // Static constructor
       
   462 // ---------------------------------------------------------------------------
       
   463 //    
       
   464 CPhCntGetPhoneNumberReqParam* 
       
   465     CPhCntGetPhoneNumberReqParam::NewL(
       
   466     	MPhCntContactManager& aContactManager, 
       
   467         MVPbkContactLinkArray& aLinkArray,
       
   468         const CPhCntSingleItemFetch::TCallType aCallType )
       
   469     {
       
   470     CPhCntGetPhoneNumberReqParam* self = 
       
   471         new( ELeave )CPhCntGetPhoneNumberReqParam();
       
   472     CleanupStack::PushL( self );
       
   473     self->ConstructL( aContactManager, aLinkArray, aCallType );
       
   474     CleanupStack::Pop( self );
       
   475     return self;
       
   476     }
       
   477 
       
   478 // ---------------------------------------------------------------------------
       
   479 // Destructor
       
   480 // ---------------------------------------------------------------------------
       
   481 //  
       
   482 CPhCntGetPhoneNumberReqParam::~CPhCntGetPhoneNumberReqParam()
       
   483     {    
       
   484     delete iContactViewFilter;
       
   485     }
       
   486     
       
   487 // ---------------------------------------------------------------------------
       
   488 // Constructor
       
   489 // ---------------------------------------------------------------------------
       
   490 //
       
   491 CPhCntGetPhoneNumberReqParam::CPhCntGetPhoneNumberReqParam() : 
       
   492     CPhCntServiceRequestParams( KAiwCmdSelect )
       
   493     {
       
   494     }
       
   495 
       
   496 // ---------------------------------------------------------------------------
       
   497 // Second phase constructor
       
   498 // ---------------------------------------------------------------------------
       
   499 //
       
   500 void CPhCntGetPhoneNumberReqParam::ConstructL(
       
   501 	MPhCntContactManager& aContactManager,
       
   502     MVPbkContactLinkArray& aLinkArray,
       
   503     const CPhCntSingleItemFetch::TCallType aCallType )
       
   504     {
       
   505     BaseConstructL();
       
   506                 
       
   507 	// Set filtering
       
   508 	TVPbkContactViewFilter filter = EVPbkContactViewFilterPhoneNumber;	    		                    		
       
   509 	TAiwSingleItemSelectionDataV3 data; 
       
   510 	data.SetAddressSelectType(  EAiwCallItemSelect );
       
   511 	switch( aCallType )
       
   512 		{				
       
   513 		case CPhCntSingleItemFetch::ECallPhoneNumber:			
       
   514     		iDefaultPriorities.Append( EVPbkDefaultTypePhoneNumber );    		
       
   515     		break;
       
   516     	case CPhCntSingleItemFetch::ECallVoip:
       
   517     		iDefaultPriorities.Append( EVPbkDefaultTypeVoIP );
       
   518     		filter = EVPbkContactViewFilterVoIP;
       
   519     		data.SetCommAddressSelectType( EAiwCommVOIPCall );
       
   520     		data.SetAddressSelectType(  EAiwVOIPSelect ); 		
       
   521     		break;
       
   522     	case CPhCntSingleItemFetch::ECallVideoNumber:
       
   523     		iDefaultPriorities.Append( EVPbkDefaultTypeVideoNumber );
       
   524     		filter = EVPbkContactViewFilterVideoNumber;
       
   525     		break;    	    		
       
   526     	default:
       
   527             break;
       
   528 		}
       
   529 		
       
   530 	// Construct empty filter
       
   531     iContactViewFilter = aContactManager.CreateFieldTypeSelectorL();
       
   532 
       
   533     // Append the filter object with suitable criteria
       
   534     aContactManager.AppendFilterToSelectorL( *iContactViewFilter, filter );   			
       
   535                                                  		
       
   536 	data.SetFetchFilter( iContactViewFilter ); 
       
   537 	data.SetDefaultPriorities( iDefaultPriorities ); 		
       
   538 	
       
   539     iGenericParamList->AppendL(
       
   540         TAiwGenericParam(
       
   541             EGenericParamContactSelectionData,
       
   542             TAiwVariant( TAiwSingleItemSelectionDataV3Pckg( data ) ) ) );
       
   543             
       
   544 	// Contact link array		
       
   545 	HBufC8* packedLinks = aLinkArray.PackLC();
       
   546 	iGenericParamList->AppendL( 
       
   547 	    TAiwGenericParam( 
       
   548 	    	EGenericParamContactLinkArray, 
       
   549 	    	TAiwVariant( *packedLinks ) 
       
   550 	    	) 
       
   551 	   	); 
       
   552    	CleanupStack::PopAndDestroy( packedLinks );
       
   553    			
       
   554     }
       
   555