diff -r 502e5d91ad42 -r 15e4dd19031c idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp --- a/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp Mon Mar 15 12:41:53 2010 +0200 +++ b/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp Wed Mar 31 22:04:35 2010 +0300 @@ -34,6 +34,7 @@ #include #include #include +#include #include "sapidatapluginconst.h" #include "sapidatapluginuids.hrh" @@ -78,7 +79,7 @@ // --------------------------------------------------------------------------- // CSapiDataPlugin::CSapiDataPlugin() - : iNetworkStatus( EUnknown ), iPluginState( ENone ) + : iNetworkStatus( EUnknown ), iPluginState( ENone ) { } @@ -101,16 +102,9 @@ CSapiDataPlugin::~CSapiDataPlugin() { // deactivate the publishers - if ( iData ) - { - TRAP_IGNORE( iData->ChangePublisherStatusL( KDeActive )); - - delete iData; - } - + delete iData; iObservers.Close(); Release( iContent ); - iDataArray.ResetAndDestroy(); if ( iContentModel ) @@ -124,7 +118,6 @@ } iIconArray.Reset(); - iRfs.Close(); } @@ -152,9 +145,8 @@ // Release memory of the published text iDataArray.ResetAndDestroy(); // Release memory of the published icons - iIconArray.Reset(); - - } + iIconArray.Reset(); + } } // --------------------------------------------------------------------------- @@ -359,13 +351,18 @@ } // --------------------------------------------------------------------------- -//Refresh a specific image of text in the widget +//Refresh a specific image or text in the widget // --------------------------------------------------------------------------- // void CSapiDataPlugin::RefreshL( TDesC& aContentType, TDesC& aOperation, CLiwDefaultMap* aDataMap ) - { + { + __PRINTS("*** CSapiDataPlugin::RefreshL ***"); + + __PRINT( __DBG_FORMAT( "* Publisher name: %S, uid: 0x%x, content type: %S, operation: %S" ), + &PublisherInfo().Name(), PublisherInfo().Uid().iUid, &aContentType, &aOperation ); + const TInt observerCount( iObservers.Count() ); const TInt transactionId = reinterpret_cast( this ); @@ -398,6 +395,8 @@ iDataArray.ResetAndDestroy(); iIconArray.Reset(); } + + __PRINTS("*** CSapiDataPlugin::RefreshL - done ***"); } // --------------------------------------------------------------------------- @@ -455,6 +454,11 @@ { TRAP_IGNORE( iData->ChangePublisherStatusL( KPluginShutdown )); } + + if ( iData ) + { + TRAP_IGNORE( iData->ChangePublisherStatusL( KDeActive )); + } } // ---------------------------------------------------------------------------- @@ -633,6 +637,18 @@ } // ---------------------------------------------------------------------------- +// CSapiDataPlugin::SetProperty +// +// ---------------------------------------------------------------------------- +// +void CSapiDataPlugin::SetProperty( TProperty aProperty, TAny* aAny ) + { + if (aProperty == ECpsCmdBuffer ) + { + iData->SetCommandBuffer( aAny ); + } + } +// ---------------------------------------------------------------------------- // CSapiDataPlugin::GetProperty // // ----------------------------------------------------------------------------