homescreenpluginsrv/hspsmanager/client/hspsclient.cpp
branchRCL_3
changeset 51 15e4dd19031c
parent 4 1a2a00e78665
child 78 1b207dd38b72
equal deleted inserted replaced
19:502e5d91ad42 51:15e4dd19031c
   234 // -----------------------------------------------------------------------------
   234 // -----------------------------------------------------------------------------
   235 // ChspsClient::hspsGetListHeaders
   235 // ChspsClient::hspsGetListHeaders
   236 // (other items were commented in a header).
   236 // (other items were commented in a header).
   237 // -----------------------------------------------------------------------------
   237 // -----------------------------------------------------------------------------
   238 //
   238 //
   239 EXPORT_C ThspsServiceCompletedMessage ChspsClient::hspsGetListHeaders( const ChspsODT& aSearchMask, 
   239 EXPORT_C ThspsServiceCompletedMessage ChspsClient::hspsGetListHeaders( 
   240                                 CArrayPtrFlat<ChspsODT>& aHeaderList )
   240         const ChspsODT& aSearchMask,
       
   241         const TBool aCopyLogos,
       
   242         CArrayPtrFlat<ChspsODT>& aHeaderList )
   241     {
   243     {
   242     ThspsServiceCompletedMessage ret = EhspsServiceRequestError; 
   244     ThspsServiceCompletedMessage ret = EhspsServiceRequestError; 
   243     TBuf8<KMaxHeaderDataLength8> headerData;
   245     TBuf8<KMaxHeaderDataLength8> headerData;
   244     TInt errorCode = 0;
   246     TInt errorCode = 0;
   245     iHeaderList = &aHeaderList;
   247     iHeaderList = &aHeaderList;
   261         if ( IsActive() ) 
   263         if ( IsActive() ) 
   262             {
   264             {
   263             // cancel previous subscription first
   265             // cancel previous subscription first
   264             hspsCancelGetListHeaders();
   266             hspsCancelGetListHeaders();
   265             }        
   267             }        
   266         ret = (ThspsServiceCompletedMessage)iSession.GetListHeaders(iResultData, 
   268         ret = (ThspsServiceCompletedMessage)iSession.GetListHeaders(
   267                                                              iSearchMaskData->Des(),headerData );
   269                 iResultData, 
       
   270                 iSearchMaskData->Des(),
       
   271                 aCopyLogos,
       
   272                 headerData );
   268 
   273 
   269 #ifdef HSPS_LOG_ACTIVE
   274 #ifdef HSPS_LOG_ACTIVE
   270         if( iLogBus )
   275         if( iLogBus )
   271             {
   276             {
   272             iLogBus->LogText( _L( "ChspsClient::hspsGetListHeaders(): - theme query sent for RootUid %d." ),
   277             iLogBus->LogText( _L( "ChspsClient::hspsGetListHeaders(): - theme query sent for RootUid %d." ),
   532 // -----------------------------------------------------------------------------
   537 // -----------------------------------------------------------------------------
   533 // ChspsClient::hspsGetHeaders
   538 // ChspsClient::hspsGetHeaders
   534 // (other items were commented in a header).
   539 // (other items were commented in a header).
   535 // -----------------------------------------------------------------------------
   540 // -----------------------------------------------------------------------------
   536 //
   541 //
   537 EXPORT_C TInt ChspsClient::hspsGetHeaders( const ChspsODT& aSearchMask, 
   542 EXPORT_C TInt ChspsClient::hspsGetHeaders( 
   538                                 CArrayPtrFlat<ChspsODT>& aHeaderList )
   543         const ChspsODT& aSearchMask,
       
   544         const TBool aCopyLogos,
       
   545         CArrayPtrFlat<ChspsODT>& aHeaderList )
   539     {
   546     {
   540     iHeaderList = &aHeaderList;
   547     iHeaderList = &aHeaderList;
   541     // Convert search mask ODT to binary stream
   548     // Convert search mask ODT to binary stream
   542     if (iSearchMaskData)
   549     if (iSearchMaskData)
   543         {
   550         {
   551         // Get the header count
   558         // Get the header count
   552         ThspsServiceCompletedMessage ret = 
   559         ThspsServiceCompletedMessage ret = 
   553             ( ThspsServiceCompletedMessage )iSession.GetListHeaders(
   560             ( ThspsServiceCompletedMessage )iSession.GetListHeaders(
   554                 iResultData, 
   561                 iResultData, 
   555                 iSearchMaskData->Des(),
   562                 iSearchMaskData->Des(),
       
   563                 aCopyLogos,
   556                 iHeaderData );
   564                 iHeaderData );
   557                 
   565                 
   558         if ( ret == EhspsGetListHeadersSuccess )
   566         if ( ret == EhspsGetListHeadersSuccess )
   559             {
   567             {
   560             // Header count > 0
   568             // Header count > 0