--- a/cmmanager/cmmgr/cmmapi/src/cmdestination.cpp Thu Jun 17 22:32:02 2010 +0100
+++ b/cmmanager/cmmgr/cmmapi/src/cmdestination.cpp Thu Jul 22 16:37:38 2010 +0100
@@ -151,7 +151,8 @@
if ( existingHandle )
{
CleanupStack::PopAndDestroy( cmWrapper );
- cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL( existingHandle );
+ cmWrapper = iCmDestinationWrapper->GetMainSession()->GetConnMethodWrapperL(
+ existingHandle );
cmWrapper->IncreaseReferenceCounter();
}
else
@@ -796,21 +797,44 @@
{
OstTraceFunctionEntry0( RCMDESTINATION_GETICONL_ENTRY );
- User::Leave( KErrNotSupported );
+ if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+ {
+ User::Leave( KErrBadHandle );
+ }
+
+ HBufC* buffer = HBufC::NewLC( KCmmStringLengthMax );
+ TInt err = iCmDestinationWrapper->GetIcon( buffer );
+ User::LeaveIfError( err );
+
+ if ( buffer->Length() > 0 )
+ {
+ CleanupStack::Pop( buffer );
+ }
+ else
+ {
+ CleanupStack::PopAndDestroy( buffer );
+ buffer = KNullDesC().AllocL();
+ }
OstTraceFunctionExit0( RCMDESTINATION_GETICONL_EXIT );
- return NULL;
+ return buffer;
}
//-----------------------------------------------------------------------------
// RCmDestination::SetIconL()
//-----------------------------------------------------------------------------
//
-EXPORT_C void RCmDestination::SetIconL( const TDesC& /*aIcon*/ )
+EXPORT_C void RCmDestination::SetIconL( const TDesC& aIcon )
{
OstTraceFunctionEntry0( RCMDESTINATION_SETICONL_ENTRY );
- User::Leave( KErrNotSupported );
+ if ( !iCmDestinationWrapper || !iCmDestinationWrapper->SessionConnected() )
+ {
+ User::Leave( KErrBadHandle );
+ }
+
+ TInt err = iCmDestinationWrapper->SetIcon( aIcon );
+ User::LeaveIfError( err );
OstTraceFunctionExit0( RCMDESTINATION_SETICONL_EXIT );
}