phoneclientserver/phoneserver/Src/ImageHandler/CPhSrvSubSessionImageHandler.cpp
changeset 12 ae8abd0db65c
parent 0 ff3b6d0fd310
child 13 e32024264ebb
equal deleted inserted replaced
0:ff3b6d0fd310 12:ae8abd0db65c
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 
    20 
    21 // INCLUDE FILES
    21 // INCLUDE FILES
    22 #include    "CPhSrvSubSessionImageHandler.h"
    22 #include    "CPhSrvSubSessionImageHandler.h" 
    23 #include    "CPhSrvSession.h"
    23 #include    "CPhSrvSession.h" 
    24 #include    "CPhSrvServer.h"
    24 #include    "CPhSrvServer.h" 
    25 #include    <e32property.h>
    25 #include    <e32property.h>
    26 #include    <PhCltTypes.h>
    26 #include    <phclttypes.h> 
    27 #include    "PhSrvDebugInfo.h"  
    27 #include    "PhSrvDebugInfo.h" 
    28 
    28 
    29 // CONSTANTS
    29 // CONSTANTS
    30 _LIT( KPhSrvImageDriveRom, "z:" );
    30 _LIT( KPhSrvImageDriveRom, "z:" );
    31 _LIT( KPhSrvVTImageName, "vtstillimage" );
    31 _LIT( KPhSrvVTImageName, "vtstillimage" );
    32 _LIT( KPhSrvVTDefaultImageName, "vtdefaultimage." );
    32 _LIT( KPhSrvVTDefaultImageName, "vtdefaultimage." );
   530     {
   530     {
   531     _DPRINT( 4, "CPhSrvSubSessionImageHandler::LoadVT" )    
   531     _DPRINT( 4, "CPhSrvSubSessionImageHandler::LoadVT" )    
   532     // Load the images from file.
   532     // Load the images from file.
   533     const TBool loadDefaultImage = aImages.iType == EPhCltTypeVTDefault;    
   533     const TBool loadDefaultImage = aImages.iType == EPhCltTypeVTDefault;    
   534     DoReadVTImagesL( loadDefaultImage );
   534     DoReadVTImagesL( loadDefaultImage );
   535 	
   535     
   536 	// Copy handles.
   536     // Copy handles.
   537     aImages.iImageCount = iVTBitMaps.Count();
   537     aImages.iImageCount = iVTBitMaps.Count();
   538     for ( TInt i = 0; i < aImages.iImageCount; i++ )
   538     for ( TInt i = 0; i < aImages.iImageCount; i++ )
   539         {
   539         {
   540         aImages.iImages[ i ] = iVTBitMaps[ i ]->Handle();
   540         aImages.iImages[ i ] = iVTBitMaps[ i ]->Handle();
   541         _DDPRINT( 4, 
   541         _DDPRINT( 4, 
   560     // Search path = drive + path + file-name (with wildcard) + extension
   560     // Search path = drive + path + file-name (with wildcard) + extension
   561     HBufC* searchPath = ConstructVTImageSearchPathLC( 
   561     HBufC* searchPath = ConstructVTImageSearchPathLC( 
   562         aDefaultImage, path );
   562         aDefaultImage, path );
   563 
   563 
   564 #ifdef __PHENG_DEBUG_INFO__
   564 #ifdef __PHENG_DEBUG_INFO__
   565 		TPtr ptr = searchPath->Des();  // temp pointer to avoid lvalue compile warning
   565         TPtr ptr = searchPath->Des();  // temp pointer to avoid lvalue compile warning
   566         RDebug::Print( _L( 
   566         RDebug::Print( _L( 
   567             "CPhSrvSubSessionImageHandler::ReadVT: %S"), ( &ptr ));
   567             "CPhSrvSubSessionImageHandler::ReadVT: %S"), ( &ptr ));
   568 #endif    
   568 #endif    
   569     RDir dir;
   569     RDir dir;
   570     User::LeaveIfError( dir.Open( iFs, *searchPath, KEntryAttNormal ) );    
   570     User::LeaveIfError( dir.Open( iFs, *searchPath, KEntryAttNormal ) );