equal
deleted
inserted
replaced
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 ) ); |
719 aImages.iImages[ EPhCltExtNetworkCodeIndex ], |
719 aImages.iImages[ EPhCltExtNetworkCodeIndex ], |
720 ( TPhCltExtOperatorLogoType ) aImages.iImages[ EPhCltExtLogoTypeIndex ], |
720 ( TPhCltExtOperatorLogoType ) aImages.iImages[ EPhCltExtLogoTypeIndex ], |
721 bitMap ); |
721 bitMap ); |
722 aImages.iImages[ EPhCltExtOperatorLogoIndex ] = bitMap->Handle(); |
722 aImages.iImages[ EPhCltExtOperatorLogoIndex ] = bitMap->Handle(); |
723 aImages.iImageCount = 1; |
723 aImages.iImageCount = 1; |
724 iOperatorLogos.Append( logoContainer ); |
724 CleanupStack::PushL(logoContainer); |
725 |
725 iOperatorLogos.AppendL( logoContainer ); |
|
726 CleanupStack::Pop(logoContainer); |
726 CleanupStack::Pop( bitMap ); |
727 CleanupStack::Pop( bitMap ); |
727 CleanupStack::PopAndDestroy( hbuf ); |
728 CleanupStack::PopAndDestroy( hbuf ); |
728 |
729 |
729 _DPRINT( 4, "CPhSrvSubSessionImageHandler::LoadLogo>" ) |
730 _DPRINT( 4, "CPhSrvSubSessionImageHandler::LoadLogo>" ) |
730 } |
731 } |