phonebookui/Phonebook2/ServerApplication/src/TPbk2ServerMessageDataRetriever.cpp
branchRCL_3
changeset 17 2666d9724c76
parent 0 e686773b3f54
equal deleted inserted replaced
15:34879f5cfc63 17:2666d9724c76
    62 const TInt KStoreUrisPosition( 0 );
    62 const TInt KStoreUrisPosition( 0 );
    63 const TInt KPreselectedContactsPosition( 1 );
    63 const TInt KPreselectedContactsPosition( 1 );
    64 const TInt KAddressSelectFilterBuffer( 2 );
    64 const TInt KAddressSelectFilterBuffer( 2 );
    65 const TInt KContactViewFilterBuffer( 3 );
    65 const TInt KContactViewFilterBuffer( 3 );
    66 const TInt KTitlePaneTextPosition( 4 );
    66 const TInt KTitlePaneTextPosition( 4 );
       
    67 const TInt KStatusPaneIdPosition( 5 );
    67 const TInt KDefaultPrioritiesPosition( 2 );
    68 const TInt KDefaultPrioritiesPosition( 2 );
    68 const TInt KOrientationType( 5 );
    69 const TInt KOrientationType( 5 );
    69 
    70 
    70 
    71 
    71 _LIT(KPanicText, "TPbk2ServerMessageDataRetriever");
    72 _LIT(KPanicText, "TPbk2ServerMessageDataRetriever");
   509         Pbk2IPCPackage::InternalizeL
   510         Pbk2IPCPackage::InternalizeL
   510             ( titlePaneText, readStream, KTitlePaneTextPosition );
   511             ( titlePaneText, readStream, KTitlePaneTextPosition );
   511 
   512 
   512         CleanupStack::PopAndDestroy( &readStream );
   513         CleanupStack::PopAndDestroy( &readStream );
   513         CleanupStack::PopAndDestroy( configuration );
   514         CleanupStack::PopAndDestroy( configuration );
       
   515         
   514         }
   516         }
   515 
   517 
   516     return titlePaneText;
   518     return titlePaneText;
   517     }
   519     }
   518 
   520 
   908         CleanupStack::PopAndDestroy( &readStream );
   910         CleanupStack::PopAndDestroy( &readStream );
   909         CleanupStack::PopAndDestroy( configuration );
   911         CleanupStack::PopAndDestroy( configuration );
   910         }
   912         }
   911     return orientationType;
   913     return orientationType;
   912     }
   914     }
       
   915 
       
   916 // --------------------------------------------------------------------------
       
   917 // TPbk2ServerMessageDataRetriever::GetStatusPaneIdL
       
   918 // --------------------------------------------------------------------------
       
   919 //
       
   920 TInt TPbk2ServerMessageDataRetriever::GetStatusPaneIdL
       
   921         ( const RMessage2& aMessage ) const
       
   922     {
       
   923     TInt statusPaneId( 0 );
       
   924     HBufC8* statusPaneIdInText = NULL;
       
   925     TInt length = aMessage.GetDesLengthL( KConfigurationPackageSlot );
       
   926     
       
   927     if ( length > 0 )
       
   928         {
       
   929         HBufC8* configuration = HBufC8::NewLC( length );
       
   930         TPtr8 ptr = configuration->Des();
       
   931         aMessage.ReadL( KConfigurationPackageSlot, ptr );
       
   932         RDesReadStream readStream( ptr );
       
   933         readStream.PushL();
       
   934 
       
   935         TRAPD( error, Pbk2IPCPackage::InternalizeL
       
   936             ( statusPaneIdInText, readStream, KStatusPaneIdPosition ) );        
       
   937         
       
   938         if ( KErrNone == error && statusPaneIdInText )
       
   939             {
       
   940             TLex8 aLex(*statusPaneIdInText);        
       
   941             error = aLex.Val( statusPaneId );
       
   942             delete statusPaneIdInText;
       
   943             }
       
   944             
       
   945         CleanupStack::PopAndDestroy( &readStream );
       
   946         CleanupStack::PopAndDestroy( configuration );
       
   947         }
       
   948 
       
   949     return statusPaneId;
       
   950     }
   913     
   951     
   914 // End of File
   952 // End of File