# HG changeset patch # User hgs # Date 1281108452 -10800 # Node ID b6b8e90f9863292d33c0fa6bb2886b87f3d887ec # Parent e9457ebcc4df1ff659f5b847428376aa700d01b9 201031 diff -r e9457ebcc4df -r b6b8e90f9863 services/terminalmodeservice/inc/upnpsvgimageconverter.h --- a/services/terminalmodeservice/inc/upnpsvgimageconverter.h Fri Jul 23 08:57:49 2010 +0300 +++ b/services/terminalmodeservice/inc/upnpsvgimageconverter.h Fri Aug 06 18:27:32 2010 +0300 @@ -20,7 +20,6 @@ // Include Files #include -#include /** * CUpnpSvgImageConverter class acts as an intermediate between the invoker and the @@ -57,8 +56,7 @@ void ConstructL( TInt aIconWidth, TInt aIconHeight ); // Thread creation method void StartThreadL( ); - // "Getter" methods - RFs& FileSession( ); + // "Getter" method to fetch file path const TDesC& Filepath( )const; private: @@ -68,7 +66,6 @@ CSvgEngineInterfaceImpl* iSvgModule; RBuf iBitMapFilePath; CFbsBitmap* iBitmap; - RFile iFile; }; #endif // __UPNPSVGIMAGECONVERTER_H__ diff -r e9457ebcc4df -r b6b8e90f9863 services/terminalmodeservice/inc/upnptmappserverservice.h --- a/services/terminalmodeservice/inc/upnptmappserverservice.h Fri Jul 23 08:57:49 2010 +0300 +++ b/services/terminalmodeservice/inc/upnptmappserverservice.h Fri Aug 06 18:27:32 2010 +0300 @@ -97,7 +97,7 @@ void ConstructL(const TDesC& aDescriptionPath ); void ConstructHttpL( ); - TInt ConvertDescriptorToInt( const TDesC8& aDes, TInt& aErr ); + TInt ConvertDescriptorToInt( const TDesC8& aDes, TUint& aErr ); private: CUpnpHttpServerSession* iHttpServerSession; diff -r e9457ebcc4df -r b6b8e90f9863 services/terminalmodeservice/inc/upnptmclientprofileservice.h --- a/services/terminalmodeservice/inc/upnptmclientprofileservice.h Fri Jul 23 08:57:49 2010 +0300 +++ b/services/terminalmodeservice/inc/upnptmclientprofileservice.h Fri Aug 06 18:27:32 2010 +0300 @@ -67,7 +67,6 @@ TUpnpErrorCode GetMaxNumProfilesActionL( CUpnpAction* aAction ); TUpnpErrorCode SetClientProfileActionL( CUpnpAction* aAction ); TUpnpErrorCode GetClientProfileActionL( CUpnpAction* aAction ); - TInt ConvertDescriptorToInt( const TDesC8& aDes, TUint& aIntVal ); private: // Constructors /** diff -r e9457ebcc4df -r b6b8e90f9863 services/terminalmodeservice/src/upnpappfilterinfo.cpp --- a/services/terminalmodeservice/src/upnpappfilterinfo.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/services/terminalmodeservice/src/upnpappfilterinfo.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -111,6 +111,9 @@ // returns invalid argument as an error. // @param aKey Key name // @param aValue Value of the key +// @param aDisplayInfoFlag True if info type is displayInfo, false otherwise. +// Default is false. It is used to distinguish "trustLevel" element +// of appInfo and displayInfo. // @param aErr Terminal Mode error code // --------------------------------------------------------------------------------- // @@ -196,7 +199,7 @@ iAppCategory = aValue.AllocL(); aErr = ETerminalModeSuccess; } - else if ( aKey.Compare(KTrustLevel) == KErrNone ) + else if (( aKey.Compare(KTrustLevel) == KErrNone ) && ( !aDisplayInfoFlag )) { delete iAppTrustLevel; iAppTrustLevel = NULL; @@ -217,7 +220,7 @@ iContentRules = aValue.AllocL(); aErr = ETerminalModeSuccess; } - else if ( ( aDisplayInfoFlag ) && ( aKey.Compare(KTrustLevel) == KErrNone ) ) + else if (( aKey.Compare(KTrustLevel) == KErrNone ) && ( aDisplayInfoFlag )) { delete iContTrustLevel; iContTrustLevel = NULL; diff -r e9457ebcc4df -r b6b8e90f9863 services/terminalmodeservice/src/upnpsvgimageconverter.cpp --- a/services/terminalmodeservice/src/upnpsvgimageconverter.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/services/terminalmodeservice/src/upnpsvgimageconverter.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -33,7 +33,7 @@ _LIT(KSemaphoreName, "ImageConverterSemaphore"); // Constant -const TUint KDot = '.'; +const TUint KDot = '.'; // ============================ MEMBER FUNCTIONS =================================== @@ -131,7 +131,6 @@ delete iBitmap; delete iSvgModule; iFbsSession.Disconnect(); - iFile.Close(); iFileSession.Close(); OstTraceFunctionExit0( CUPNPSVGIMAGECONVERTER_CUPNPSVGIMAGECONVERTER_EXIT ); } @@ -154,9 +153,10 @@ TPtrC iconFileNameWithExtension = aSvgFile.Mid((aSvgFile.LocateReverse(KDirectorySeparator))+1); iBitMapFilePath.Append( iconFileNameWithExtension.Left(iconFileNameWithExtension.LocateReverse(KDot)) ); iBitMapFilePath.Append( KDotBmp ); - - TInt err = iFile.Create(iFileSession,iBitMapFilePath,EFileRead|EFileWrite|EFileShareAny); + RFile iconFile; + TInt err = iconFile.Create(iFileSession,iBitMapFilePath,EFileRead|EFileWrite|EFileShareAny); OstTrace1( TRACE_NORMAL, CUPNPSVGIMAGECONVERTER_CONVERTTOBITMAPL, "CUpnpSvgImageConverter::ConvertToBitmapL;err=%d", err ); + iconFile.Close(); aBitmapFile.Close(); if ( err == KErrAlreadyExists ) { @@ -184,7 +184,7 @@ *@param iMask Buffer for mask (alpha values) of framebuffer result *@return lsvgerr Error object specifying the error occured. */ - lsvgerr = iSvgModule->UseDom( domHandle ,iBitmap,iMask); + lsvgerr = iSvgModule->UseDom( domHandle ,iBitmap,iMask ); if ( (! lsvgerr ) || ( lsvgerr && lsvgerr->HasError() &&!lsvgerr->IsWarning() ) ) { User::Leave( KErrCancel ); @@ -260,19 +260,6 @@ } // --------------------------------------------------------------------------------- -// CUpnpSvgImageConverter::FileSession -// Method to return the file session. -// @return Returns reference to File session. -// --------------------------------------------------------------------------------- -// -RFs& CUpnpSvgImageConverter::FileSession( ) - { - OstTraceFunctionEntry0( CUPNPSVGIMAGECONVERTER_FILESESSION_ENTRY ); - OstTraceFunctionExit0( CUPNPSVGIMAGECONVERTER_FILESESSION_EXIT ); - return iFileSession; - } - -// --------------------------------------------------------------------------------- // CUpnpSvgImageConverter::Filepath // Method to return the path of the icon file which needs to be converted. // @return Returns reference to Bitmap file path. @@ -318,8 +305,6 @@ } else { - // Meet up with the starter thread - RThread::Rendezvous(KErrNone); TRAP( err, ImageConverterL(*svgConverter) ); } // Create a matching semaphore for signalling the waiting semaphore @@ -351,9 +336,12 @@ CleanupStack::PushL(scheduler); CActiveScheduler::Install( scheduler ); // Opens the bitmap file and supplies it to the active object + RFs fs; + CleanupClosePushL( fs ); + User::LeaveIfError(fs.Connect()); RFile bitmapFile; CleanupClosePushL( bitmapFile ); - User::LeaveIfError( bitmapFile.Open( aSvgConverter.FileSession(), aSvgConverter.Filepath(), EFileRead|EFileWrite|EFileShareAny)); + User::LeaveIfError( bitmapFile.Open( fs, aSvgConverter.Filepath(), EFileRead|EFileWrite|EFileShareAny )); // Create an active object that is executed in this thread CUpnpIconConversionActive* active = CUpnpIconConversionActive::NewL( bitmapFile ); @@ -368,7 +356,7 @@ * Thread execution ends (waiting for CActiveScheduler::Stop()) * Cleanup the active object and scheduler */ - CleanupStack::PopAndDestroy(UpnpString::KCRLFCRLength,scheduler); + CleanupStack::PopAndDestroy(UpnpString::KDoubleLineFeedLength,scheduler); OstTraceFunctionExit0( CUPNPSVGIMAGECONVERTER_IMAGECONVERTERL_EXIT ); } diff -r e9457ebcc4df -r b6b8e90f9863 services/terminalmodeservice/src/upnptmappserverservice.cpp --- a/services/terminalmodeservice/src/upnptmappserverservice.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/services/terminalmodeservice/src/upnptmappserverservice.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -184,6 +184,7 @@ TUpnpErrorCode CUpnpTmAppServerService::GetAppListActionL( CUpnpAction* aAction ) { OstTraceFunctionEntry0( CUPNPTMAPPSERVERSERVICE_GETAPPLISTACTIONL_ENTRY ); + // Fetch the value for app listing filter argument const TDesC8& filter = aAction->ArgumentValue(KAppFilter); // Validate the AppListing filter string // AppListingFilter input argument can contain wither wildcard(*) or @@ -195,14 +196,11 @@ return EInvalidArgs; // invalid AppListingFilter argument } - TInt profileIdInt; - // Validate the profileID - if ( ConvertDescriptorToInt( aAction->ArgumentValue(KProfileId), profileIdInt ) != KErrNone ) - { - OstTrace1( TRACE_ERROR, CUPNPTMAPPSERVERSERVICE_GETAPPLISTACTIONL, "CUpnpTmAppServerService::GetAppListActionL;profileIdInt=%d", profileIdInt ); - return EInvalidArgs; // invalid profile ID - } - + // Fetch the value for profile ID argument + TUint profileIdInt; + ConvertDescriptorToInt( aAction->ArgumentValue(KProfileId), profileIdInt ); + OstTrace1( TRACE_NORMAL, CUPNPTMAPPSERVERSERVICE_GETAPPLISTACTIONL, "CUpnpTmAppServerService::GetAppListActionL;profileIdInt=%u", profileIdInt ); + TTerminalModeErrorCode ret; const TDesC8& appList = iTmServerImpl.GetApplicationListL( filter,profileIdInt,ret ); if ( ret != ETerminalModeSuccess ) @@ -224,13 +222,13 @@ TUpnpErrorCode CUpnpTmAppServerService::LaunchAppActionL( CUpnpAction* aAction ) { OstTraceFunctionEntry0( CUPNPTMAPPSERVERSERVICE_LAUNCHAPPACTIONL_ENTRY ); - TInt appIdInt; - TInt profileIdInt; + TUint appIdInt; + TUint profileIdInt; // Validates the input parameters if ( ( ConvertDescriptorToInt( aAction->ArgumentValue(KAppId), appIdInt ) != KErrNone ) || ( ConvertDescriptorToInt( aAction->ArgumentValue(KProfileId), profileIdInt ) != KErrNone )) { - OstTraceExt2( TRACE_ERROR, CUPNPTMAPPSERVERSERVICE_LAUNCHAPPACTIONL, "CUpnpTmAppServerService::LaunchAppActionL;appIdInt=%d;profileIdInt=%d", appIdInt, profileIdInt ); + OstTraceExt2( TRACE_ERROR, CUPNPTMAPPSERVERSERVICE_LAUNCHAPPACTIONL, "CUpnpTmAppServerService::LaunchAppActionL;appIdInt=%u;profileIdInt=%u", appIdInt, profileIdInt ); return EInvalidArgs; // either invalid app ID or invalid profile ID } @@ -262,12 +260,12 @@ { OstTraceFunctionEntry0( CUPNPTMAPPSERVERSERVICE_TERMINATEAPPACTIONL_ENTRY ); // Validates the input parameters - TInt appIdInt; - TInt profileIdInt; + TUint appIdInt; + TUint profileIdInt; if ( ( ConvertDescriptorToInt( aAction->ArgumentValue(KAppId), appIdInt ) != KErrNone ) || ( ConvertDescriptorToInt( aAction->ArgumentValue(KProfileId), profileIdInt ) != KErrNone )) { - OstTraceExt2( TRACE_ERROR, CUPNPTMAPPSERVERSERVICE_TERMINATEAPPACTIONL, "CUpnpTmAppServerService::TerminateAppActionL;appIdInt=%d;profileIdInt=%d", appIdInt, profileIdInt ); + OstTraceExt2( TRACE_ERROR, CUPNPTMAPPSERVERSERVICE_TERMINATEAPPACTIONL, "CUpnpTmAppServerService::TerminateAppActionL;appIdInt=%u;profileIdInt=%u", appIdInt, profileIdInt ); return EInvalidArgs; // either invalid app ID or invalid profile ID } @@ -296,11 +294,11 @@ const TDesC8& appId= aAction->ArgumentValue(KAppId); // Check if the appID argument has either wildcard character(*) // or a valid integer as its value - TInt appIdInt; + TUint appIdInt; if ( (( appId.Compare( KWildCard ) != KErrNone ) && ( ConvertDescriptorToInt( appId, appIdInt ) != KErrNone )) ) { - OstTrace1( TRACE_ERROR, CUPNPTMAPPSERVERSERVICE_GETAPPSTATUSACTIONL, "CUpnpTmAppServerService::GetAppStatusActionL;appIdInt=%d", appIdInt ); + OstTrace1( TRACE_ERROR, CUPNPTMAPPSERVERSERVICE_GETAPPSTATUSACTIONL, "CUpnpTmAppServerService::GetAppStatusActionL;appIdInt=%u", appIdInt ); return EInvalidArgs; // invalid input argument } RBuf8 appStatusBuf; @@ -383,18 +381,18 @@ // --------------------------------------------------------------------------------- // CUpnpTmAppServerService::ConvertDescriptorToInt -// Utility method to convert descriptor to integer +// Utility method to convert descriptor's data to integer // @param aDes Descriptor whose integer equivalent have to be calculated // @param aIntVal[out] Integer value -// @return returns error code +// @return Returns error code // --------------------------------------------------------------------------------- // -TInt CUpnpTmAppServerService::ConvertDescriptorToInt( const TDesC8& aDes, TInt& aIntVal ) +TInt CUpnpTmAppServerService::ConvertDescriptorToInt( const TDesC8& aDes, TUint& aIntVal ) { OstTraceFunctionEntry0( CUPNPTMAPPSERVERSERVICE_CONVERTDESCRIPTORTOINT_ENTRY ); - aIntVal = KErrGeneral; + aIntVal = KErrNone; TLex8 lex( aDes ); - OstTrace1( TRACE_NORMAL, CUPNPTMAPPSERVERSERVICE_CONVERTDESCRIPTORTOINT, "CUpnpTmAppServerService::ConvertDescriptorToInt;aIntVal=%d", aIntVal ); + OstTrace1( TRACE_NORMAL, CUPNPTMAPPSERVERSERVICE_CONVERTDESCRIPTORTOINT, "CUpnpTmAppServerService::ConvertDescriptorToInt;aIntVal=%u", aIntVal ); OstTraceFunctionExit0( CUPNPTMAPPSERVERSERVICE_CONVERTDESCRIPTORTOINT_EXIT ); return lex.Val(aIntVal); } diff -r e9457ebcc4df -r b6b8e90f9863 services/terminalmodeservice/src/upnptmclientprofileservice.cpp --- a/services/terminalmodeservice/src/upnptmclientprofileservice.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/services/terminalmodeservice/src/upnptmclientprofileservice.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -178,12 +178,12 @@ { OstTraceFunctionEntry0( CUPNPTMCLIENTPROFILESERVICE_SETCLIENTPROFILEACTIONL_ENTRY ); TUint profileIdInt; - // Validates the input parameter(profileID) - if ( ConvertDescriptorToInt( aAction->ArgumentValue(KProfileId), profileIdInt ) != KErrNone ) - { - OstTrace1( TRACE_ERROR, CUPNPTMCLIENTPROFILESERVICE_SETCLIENTPROFILEACTIONL, "CUpnpTmClientProfileService::SetClientProfileActionL;profileIdInt=%d", profileIdInt ); - return EInvalidArgs; // invalid profile ID - } + // Fetch the value for profile ID argument + TLex8 lex( aAction->ArgumentValue(KProfileId) ); + lex.Val(profileIdInt); + OstTrace1( TRACE_ERROR, CUPNPTMCLIENTPROFILESERVICE_SETCLIENTPROFILEACTIONL, "CUpnpTmClientProfileService::SetClientProfileActionL;profileIdInt=%d", profileIdInt ); + + // Fetch the value for client profile argument const TDesC8& clientProfile = aAction->ArgumentValue(KClientProfile); RBuf8 resultProfileBuf; @@ -211,13 +211,11 @@ { OstTraceFunctionEntry0( CUPNPTMCLIENTPROFILESERVICE_GETCLIENTPROFILEACTIONL_ENTRY ); TUint profileIdInt; - // Validates the input parameter(profileID) - if ( ConvertDescriptorToInt( aAction->ArgumentValue(KProfileId), profileIdInt ) != KErrNone ) - { - OstTrace1( TRACE_ERROR, CUPNPTMCLIENTPROFILESERVICE_GETCLIENTPROFILEACTIONL, "CUpnpTmClientProfileService::GetClientProfileActionL;profileIdInt=%d", profileIdInt ); - return EInvalidArgs; // invalid profile ID - } - + // Fetch the value for profile ID argument + TLex8 lex( aAction->ArgumentValue(KProfileId) ); + lex.Val(profileIdInt); + OstTrace1( TRACE_ERROR, CUPNPTMCLIENTPROFILESERVICE_GETCLIENTPROFILEACTIONL, "CUpnpTmClientProfileService::GetClientProfileActionL;profileIdInt=%d", profileIdInt ); + RBuf8 resultProfileBuf; TTerminalModeErrorCode ret = iTmServerImpl.GetClientProfile(profileIdInt,resultProfileBuf ); @@ -247,22 +245,4 @@ OstTraceFunctionExit0( CUPNPTMCLIENTPROFILESERVICE_UNUSEDPROFILEIDEVENTL_EXIT ); } -// --------------------------------------------------------------------------------- -// CUpnpTmClientProfileService::ConvertDescriptorToInt -// Utility method to convert descriptor to integer -// @param aDes descriptor -// @param[out] aIntVal Integer value -// @return Returns error code -// --------------------------------------------------------------------------------- -// -TInt CUpnpTmClientProfileService::ConvertDescriptorToInt( const TDesC8& aDes, TUint& aIntVal ) - { - OstTraceFunctionEntry0( CUPNPTMCLIENTPROFILESERVICE_CONVERTDESCRIPTORTOINT_ENTRY ); - aIntVal = KErrNone; - TLex8 lex( aDes ); - OstTrace1( TRACE_NORMAL, CUPNPTMCLIENTPROFILESERVICE_CONVERTDESCRIPTORTOINT, "CUpnpTmClientProfileService::ConvertDescriptorToInt;aIntVal=%u", aIntVal ); - OstTraceFunctionExit0( CUPNPTMCLIENTPROFILESERVICE_CONVERTDESCRIPTORTOINT_EXIT ); - return lex.Val(aIntVal); - } - //End of File diff -r e9457ebcc4df -r b6b8e90f9863 services/terminalmodeservice/tsrc/upnptmservertest/src/tmservertestcases.cpp --- a/services/terminalmodeservice/tsrc/upnptmservertest/src/tmservertestcases.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/services/terminalmodeservice/tsrc/upnptmservertest/src/tmservertestcases.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -18,13 +18,14 @@ // INCLUDE FILES #include -#include "tmservertest.h" #include -#include "testtimer.h" -#include "discoverytesttimer.h" #include #include #include +#include "testtimer.h" +#include "discoverytesttimer.h" +#include "tmservertest.h" + // LOCAL CONSTANTS AND MACROS _LIT8(KTestSvgMimeType, "image/svg+xml"); @@ -55,9 +56,9 @@ _LIT8(KBackground, "Background"); _LIT8(KForeground, "Foreground"); _LIT8(KAppListFilterValue1, "\"icon@mimetype=\"*svg+xml*\",icon@width=\"*\",icon@height=\"*\",icon@depth=\"*\"\""); -_LIT8(KAppListFilterValue2, "\"name=\"*nav*\",description=\"*\",appInfo@appCategory=\"*\",displayInfo@contentCategory=\"*\",allowedProfileIDs=\"*\"\""); -_LIT8(KAppListFilterValue3, "\"name=\"*bluetooth*\",description=\"*\",icon@mimetype=\"*svg+xml*\",remotingInfo@protocolID=\"*\",appInfo@appCategory=\"*\",audioInfo@audioType=\"*\",resourceStatus=\"free\",signature=\"*\"\""); -_LIT8(KAppListFilterValue4, "\"name=\"*\",description=\"*Audio*\",icon@mimetype=\"*svg+xml*\",remotingInfo@protocolID=\"*\",appInfo@appCategory=\"*\",audioInfo@audioType=\"*\",resourceStatus=\"free\",signature=\"*\"\""); +_LIT8(KAppListFilterValue2, "\"name=\"*nav*\",description=\"*\",appInfo@appCategory=\"*\",appInfo@trustLevel=\"*\",displayInfo@contentCategory=\"*\",displayInfo@contentRules=\"*\",displayInfo@trustLevel=\"*\",allowedProfileIDs=\"*\"\""); +_LIT8(KAppListFilterValue3, "\"name=\"*bluetooth*\",description=\"*\",icon@mimetype=\"*svg+xml*\",remotingInfo@protocolID=\"*\",remotingInfo@direction=\"*\",appInfo@appCategory=\"*\",audioInfo@audioType=\"*\",resourceStatus=\"free\",signature=\"*\"\""); +_LIT8(KAppListFilterValue4, "\"name=\"*\",description=\"*Audio*\",icon@mimetype=\"*svg+xml*\",remotingInfo@protocolID=\"*\",remotingInfo@format=\"*\",appInfo@appCategory=\"*\",audioInfo@audioType=\"*\",resourceStatus=\"free\",signature=\"*\"\""); _LIT8(KWildCard, "*"); _LIT(KIconPathMusicUnLaunched, "c:\\upnptmserver\\icons\\music_unlaunched.svg"); _LIT(KIconPathMusicLaunched, "c:\\upnptmserver\\icons\\music_launched.svg"); @@ -245,8 +246,7 @@ iSearchDevice = CDiscoverDevice::NewL(*this); iTestTimer = CTestTimer::NewL(*this); iTestTimer->After(15); - CActiveScheduler::Start(); - + CActiveScheduler::Start(); if ( iDeviceVerified) { _LIT( KDescription , "Terminalmode Server Device started successfully"); @@ -287,8 +287,7 @@ iSearchDevice = CDiscoverDevice::NewL(*this); iTestTimer = CTestTimer::NewL(*this); iTestTimer->After(15); - CActiveScheduler::Start(); - + CActiveScheduler::Start(); if ( iServiceVerified) { _LIT( KDescription , "Terminalmode server Service published successfully"); @@ -328,18 +327,15 @@ iSearchDevice = CDiscoverDevice::NewL(*this); iDiscoveryTestTimer = CDiscoveryTestTimer::NewL(*this); iDiscoveryTestTimer->AfterDiscovery(15); - CActiveScheduler::Start(); - + CActiveScheduler::Start(); if ( iDeviceVerified ) { //Stop the tmserver device and its services iTmServer->StopL(); - } - + } iTestTimer = CTestTimer::NewL(*this); iTestTimer->After(15); - CActiveScheduler::Start(); - + CActiveScheduler::Start(); if ( iDeviceLostVerified ) { _LIT( KDescription , "Terminalmode server Device stopped successfully"); @@ -353,7 +349,6 @@ aResult.SetResult( KErrNone, KDescription ); iLog->Log( KDescription ); } - delete iDiscoveryTestTimer; iDiscoveryTestTimer = NULL; delete iTestTimer; @@ -362,7 +357,6 @@ return KErrNone; } - TInt CTmServerTest::ReStartTmServerDeviceL ( TTestResult& aResult ) { _LIT( KLogInfo, "ReStart Terminalmode server Device" ); @@ -386,8 +380,7 @@ iSearchDevice = CDiscoverDevice::NewL(*this); iTestTimer = CTestTimer::NewL(*this); iTestTimer->After(15); - CActiveScheduler::Start(); - + CActiveScheduler::Start(); if ( iDeviceVerified) { _LIT( KDescription , "Terminalmode server Device re-started successfully"); @@ -400,14 +393,12 @@ _LIT( KDescription , "Re-starting of Terminalmode server Device Failed"); aResult.SetResult( KErrNone, KDescription ); iLog->Log( KDescription ); - } - + } delete iTestTimer; iTestTimer = NULL; REComSession::FinalClose(); return KErrNone; - } - + } TInt CTmServerTest::RegisterDuplicateAppL( TTestResult& aResult ) { @@ -548,7 +539,6 @@ return KErrNone; } - TInt CTmServerTest::UnRegisterAppL( TTestResult& aResult ) { _LIT( KLogInfo, "UnRegister Application" ); @@ -678,7 +668,7 @@ } TInt CTmServerTest::HandleEventDuplicateAppStatusUpdateL( TTestResult& aResult ) - { + { _LIT( KLogInfo, "Handle Event For Duplicate AppStatus Update" ); iLog->Log( KLogInfo ); @@ -696,14 +686,13 @@ iSearchDevice = CDiscoverDevice::NewL(*this); iDiscoveryTestTimer = CDiscoveryTestTimer::NewL(*this); iDiscoveryTestTimer->AfterDiscovery(15); - CActiveScheduler::Start(); - + CActiveScheduler::Start(); + if ( iDeviceVerified ) { //Subscribe to Services iSearchDevice->SubscribeToServiceL(); - } - + } RArray updatedAppIdList; updatedAppIdList.Append(KAppId1Value); updatedAppIdList.Append(KAppId1Value); @@ -737,7 +726,7 @@ } TInt CTmServerTest::HandleEventProfileIdListStatusUpdateL( TTestResult& aResult ) - { + { _LIT( KLogInfo, "Handle Event For ProfileIdList Status Update" ); iLog->Log( KLogInfo ); @@ -767,8 +756,7 @@ UnusedProfileIdList.Append(5); UnusedProfileIdList.Append(6); //Update the list of profile IDs for profiles which are not used - iTmServer->UpdateUnusedProfileIdsL(UnusedProfileIdList); - + iTmServer->UpdateUnusedProfileIdsL(UnusedProfileIdList); iTestTimer = CTestTimer::NewL(*this); iTestTimer->After(15); CActiveScheduler::Start(); @@ -794,11 +782,11 @@ iTestTimer = NULL; REComSession::FinalClose(); return KErrNone; -} + } TInt CTmServerTest::HandleLaunchAppActionL ( TTestResult& aResult ) { - _LIT( KLogInfo, "Handle LaunchApp Command" ); + _LIT( KLogInfo , "Handle LaunchApp Command" ); iLog->Log( KLogInfo ); iTmServerDeviceType = ETrue; @@ -817,7 +805,7 @@ iDiscoveryTestTimer = CDiscoveryTestTimer::NewL(*this); iDiscoveryTestTimer->AfterDiscovery(15); CActiveScheduler::Start(); - + if ( iDeviceVerified ) { //Launch the application remotely by specifying appId and profileId @@ -1661,8 +1649,8 @@ iSearchDevice = CDiscoverDevice::NewL(*this); iDiscoveryTestTimer = CDiscoveryTestTimer::NewL(*this); iDiscoveryTestTimer->AfterDiscovery(15); - CActiveScheduler::Start(); - + CActiveScheduler::Start(); + if ( iDeviceVerified ) { //Subscribes to a service @@ -1702,7 +1690,7 @@ } TInt CTmServerTest::HandleEventAppListUpdateL( TTestResult& aResult ) - { + { _LIT( KLogInfo, "Handle Event For AppList Update" ); iLog->Log( KLogInfo ); @@ -3680,8 +3668,8 @@ // different mime type and different dimension clientIconPref = CUpnpTmClientIconPref::NewL(1); clientIconPref->SetMimeTypeL(_L8("image/bmp")); - clientIconPref->SetWidth(60); - clientIconPref->SetHeight(60); + clientIconPref->SetWidth(70); + clientIconPref->SetHeight(80); } else if ( aProfileId == 2 ) { @@ -3694,8 +3682,8 @@ // same mime type but different dimension clientIconPref = CUpnpTmClientIconPref::NewL(3); clientIconPref->SetMimeTypeL(_L8("image/svg+xml")); - clientIconPref->SetWidth(36); - clientIconPref->SetHeight(44); + clientIconPref->SetWidth(100); + clientIconPref->SetHeight(100); } else if ( aProfileId == 4 ) { diff -r e9457ebcc4df -r b6b8e90f9863 upnp/upnpstack/controlpointbase/src/upnpcpbdescriptionagent.cpp --- a/upnp/upnpstack/controlpointbase/src/upnpcpbdescriptionagent.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/upnp/upnpstack/controlpointbase/src/upnpcpbdescriptionagent.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -215,7 +215,7 @@ RBuf8 description; if(deviceDescription->UrlBase().Length()!=0) { - description.Create(aDeviceDescPath.Length()+deviceDescription->UrlBase().Length()); + description.CreateL(aDeviceDescPath.Length()+deviceDescription->UrlBase().Length()); description.Copy(deviceDescription->UrlBase()); TInt firstSlash(aDeviceDescPath.Locate( KSlash8()[0] ) ); if(firstSlash==0) @@ -228,7 +228,7 @@ else { TBuf<25> ipBuf; - description.Create(KUrlMaxLength); + description.CreateL(KUrlMaxLength); description.Copy(KHttp()); aAddr.Output ( ipBuf); diff -r e9457ebcc4df -r b6b8e90f9863 upnp/upnpstack/dlnawebserver/src/upnphttpbuffer.cpp --- a/upnp/upnpstack/dlnawebserver/src/upnphttpbuffer.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/upnp/upnpstack/dlnawebserver/src/upnphttpbuffer.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -87,7 +87,7 @@ // void CUpnpHttpBuffer::ConstructL() { - iBuffer.Create( 0 ); + iBuffer.CreateL( 0 ); iChunkParser = CUpnpHttpChunkParser::NewL(); } diff -r e9457ebcc4df -r b6b8e90f9863 upnp/upnpstack/dlnawebserver/src/upnptcpserver.cpp --- a/upnp/upnpstack/dlnawebserver/src/upnptcpserver.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/upnp/upnpstack/dlnawebserver/src/upnptcpserver.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -330,7 +330,7 @@ #endif CUpnpTcpSession* sess = ConnectionAcceptedL( iClientSocket ); - iSessionList.Append( sess ); + iSessionList.AppendL( sess ); } else diff -r e9457ebcc4df -r b6b8e90f9863 upnp/upnpstack/messagehandler/src/upnpipfiltering.cpp --- a/upnp/upnpstack/messagehandler/src/upnpipfiltering.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/upnp/upnpstack/messagehandler/src/upnpipfiltering.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -241,7 +241,7 @@ } // create heap descriptor - iListBuf.Create( buf->Size() ); + iListBuf.CreateL( buf->Size() ); buf->Read( 0, iListBuf, buf->Size() ); // clean up; diff -r e9457ebcc4df -r b6b8e90f9863 upnp/upnpstack/serviceframework/src/upnpdevice.cpp --- a/upnp/upnpstack/serviceframework/src/upnpdevice.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/upnp/upnpstack/serviceframework/src/upnpdevice.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -544,7 +544,7 @@ for (TInt i = 0; i < iDeviceList.Count(); i++ ) { - aDevices.Append( iDeviceList[i] ); + TRAP_IGNORE(aDevices.AppendL( iDeviceList[i] )); iDeviceList[i]->GetAllDevices(aDevices); } diff -r e9457ebcc4df -r b6b8e90f9863 upnp/upnpstack/serviceframework/src/upnpdispatcherengine.cpp --- a/upnp/upnpstack/serviceframework/src/upnpdispatcherengine.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/upnp/upnpstack/serviceframework/src/upnpdispatcherengine.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -174,7 +174,7 @@ // adds a new customer for CUpnpDispatcherEngine if ( iCustomers.Find( &aCustomer ) == KErrNotFound ) { - iCustomers.Append( &aCustomer ); + TRAP_IGNORE(iCustomers.AppendL( &aCustomer )); } } // ----------------------------------------------------------------------------- @@ -352,7 +352,7 @@ CleanupClosePushL( currServs ); for ( TInt j = 0; j < iDevs[i].iServiceCount; j++ ) { - currServs.Append( (const TUpnpService*)&iServs[servIndex+j] ); + currServs.AppendL( (const TUpnpService*)&iServs[servIndex+j] ); } CleanupStack::Check(&currServs); servIndex += iDevs[i].iServiceCount; @@ -366,7 +366,7 @@ currServs.Reset(); CleanupStack::Pop( &currServs ); - iNewDevices.Append( device ); + iNewDevices.AppendL( device ); } delete[] iDevs; @@ -542,7 +542,7 @@ request->AddServices(array); CleanupStack::Pop(request); - iPendingRequests.Append(request); + iPendingRequests.AppendL(request); } } @@ -693,7 +693,7 @@ request->AddArgumentL( aString ); CleanupStack::Pop(request); - iPendingRequests.Append(request); + iPendingRequests.AppendL(request); } } @@ -837,7 +837,7 @@ } CleanupStack::Pop(request); - iPendingRequests.Append(request); + iPendingRequests.AppendL(request); } } diff -r e9457ebcc4df -r b6b8e90f9863 upnp/upnpstack/upnphttptransfer/src/httpfile.cpp --- a/upnp/upnpstack/upnphttptransfer/src/httpfile.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/upnp/upnpstack/upnphttptransfer/src/httpfile.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -231,7 +231,7 @@ } } - iHeaderArray.Append( CHttpHeader::NewL( aFieldName, aFieldValue ) ); + iHeaderArray.AppendL( CHttpHeader::NewL( aFieldName, aFieldValue ) ); } // -------------------------------------------------------------------------- diff -r e9457ebcc4df -r b6b8e90f9863 upnp/upnpstack/upnputils/src/upnpdevicelibrary.cpp --- a/upnp/upnpstack/upnputils/src/upnpdevicelibrary.cpp Fri Jul 23 08:57:49 2010 +0300 +++ b/upnp/upnpstack/upnputils/src/upnpdevicelibrary.cpp Fri Aug 06 18:27:32 2010 +0300 @@ -631,7 +631,7 @@ element->SetRenew(CUpnpTimeoutElement::EOnce); element->SetTimeout(aMessage->CacheControl()); element->SetLocal(EFalse); - iElementArray.Append(element); + iElementArray.AppendL(element); CleanupStack::Pop(); // element } @@ -662,7 +662,7 @@ element->SetRenew(CUpnpTimeoutElement::EOnce); element->SetTimeout(aMessage->CacheControl()); element->SetLocal(EFalse); - iElementArray.Append(element); + iElementArray.AppendL(element); CleanupStack::Pop(); // element } @@ -679,7 +679,7 @@ element->SetRenew(CUpnpTimeoutElement::EOnce); element->SetTimeout(aMessage->CacheControl()); element->SetLocal(EFalse); - iElementArray.Append(element); + iElementArray.AppendL(element); CleanupStack::Pop(); // element }