--- a/contentcontrolsrv/hsccclient/hsccapiclient/inc/hsccapiclient.h Wed Apr 14 16:16:44 2010 +0300
+++ b/contentcontrolsrv/hsccclient/hsccapiclient/inc/hsccapiclient.h Tue Apr 27 16:57:49 2010 +0300
@@ -93,7 +93,12 @@
* See from API documentation
*/
TInt ViewListL( CHsContentInfoArray& aArray );
-
+
+ /**
+ * See from API documentation
+ */
+ TInt ViewListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray );
+
/**
* See from API documentation
*/
--- a/contentcontrolsrv/hsccclient/hsccapiclient/src/hsccapiclient.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/contentcontrolsrv/hsccclient/hsccapiclient/src/hsccapiclient.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -329,6 +329,64 @@
}
// -----------------------------------------------------------------------------
+// CHsCcApiClient::ViewListL
+// -----------------------------------------------------------------------------
+//
+TInt CHsCcApiClient::ViewListL(
+ CHsContentInfo& aInfo, CHsContentInfoArray& aArray )
+ {
+ TInt err( KErrNone );
+
+ // Create ViewListReq API request
+ CCcSrvMsg* reqMsg = CCcSrvMsg::NewL();
+ CleanupStack::PushL( reqMsg );
+ reqMsg->SetMsgId( EHsCcViewListReq );
+ reqMsg->SetTrId( 0 );
+
+ // Marshal ViewListReq data to a descriptor
+ HBufC8* dataBuf = aInfo.MarshalL();
+ TPtr8 dataPtr( NULL, 0 );
+ dataPtr.Set( dataBuf->Des() );
+ reqMsg->SetData( dataPtr );
+
+ delete dataBuf;
+ dataBuf = NULL;
+
+ // Marshal API request
+ HBufC8* msgBuf = reqMsg->MarshalL();
+ CleanupStack::PushL( msgBuf );
+ TPtr8 msgPtr( NULL, 0 );
+ msgPtr.Set( msgBuf->Des() );
+
+ // Send API request
+ // Sender and receiver address not defined -> message is routed
+ // according to the provider id
+ TPckgBuf<TUint32> provider( ECcHomescreen );
+ TPckgBuf<TUint32> sender;
+ TPckgBuf<TUint32> receiver;
+ err = iSession.Send( ECcApiReq, provider, sender, receiver, msgPtr );
+
+ if ( !err )
+ {
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
+ if ( !err && dataSize )
+ {
+ // Internalize API response data
+ err = InternalizeContentInfoArrayL( aArray, trId, dataSize );
+ }
+ }
+
+ // Cleanup
+ CleanupStack::PopAndDestroy( msgBuf );
+ CleanupStack::PopAndDestroy( reqMsg );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
// CHsCcApiClient::AppListL
// -----------------------------------------------------------------------------
//
--- a/contentcontrolsrv/hsccclient/hsccproviderclient/src/hsccproviderclient.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/contentcontrolsrv/hsccclient/hsccproviderclient/src/hsccproviderclient.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -457,11 +457,33 @@
TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
+ TInt err( KErrNone );
// Get view list
CHsContentInfoArray* views = CHsContentInfoArray::NewL();
CleanupStack::PushL( views );
- TInt err = iController.ViewListL( *views );
+
+ if ( aMessage.DataSize() )
+ {
+ // Internalize message data
+ RDesReadStream dataStream( aMessage.Data() );
+ CleanupClosePushL( dataStream );
+ CHsContentInfo* info = CHsContentInfo::NewL( dataStream );
+ CleanupStack::PopAndDestroy( &dataStream );
+ CleanupStack::PushL( info );
+ // Get list of views included in the defined
+ // application configuration
+ err = iController.ViewListL( *info, *views );
+
+ CleanupStack::PopAndDestroy( info );
+ }
+ else
+ {
+ // Get list of available views
+ err = iController.ViewListL( *views );
+ }
+
+
// Create and send ViewListResp
CCcSrvMsg* message = CCcSrvMsg::NewL();
CleanupStack::PushL( message );
--- a/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserverdatamanager.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserverdatamanager.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -331,11 +331,13 @@
{
CP_DEBUG( _L8("CCPDataManager::RemoveObserver()") );
TInt index = iNotificationsArray.Find( aNotificationHandler );
- __ASSERT_DEBUG( index >= 0 , User::Panic( _L("cpserver"), 0 ) );
- iNotificationsArray.Remove( index );
- if ( iNotificationsArray.Count( ) == 0 )
+ if (index != KErrNotFound)
{
- iStorage->SetCallback( 0 );
+ iNotificationsArray.Remove( index );
+ if ( iNotificationsArray.Count( ) == 0 )
+ {
+ iStorage->SetCallback( 0 );
+ }
}
}
--- a/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -383,6 +383,7 @@
iServer->PanicClient( aMessage, ECPServerBadRequest );
User::Leave( KErrGeneral );
}
+ isRegister = ETrue;
if ( !iNotificationHandler )
{
iNotificationHandler = CCPNotificationHandler::NewL(
@@ -390,7 +391,6 @@
iDataManager->AddObserverL( iNotificationHandler );
}
iNotificationHandler->SaveMessageL( aMessage );
- isRegister = ETrue;
}
else
{
@@ -432,7 +432,7 @@
void CCPServerSession::UnregisterObserverL()
{
CP_DEBUG( _L8("CCPServerSession::UnregisterObserverL()" ) );
- if ( isRegister )
+ if ( isRegister && iNotificationHandler )
{
//remove notification handler from an array of sessions in data manager
iDataManager->RemoveObserver( iNotificationHandler );
@@ -457,10 +457,10 @@
CP_DEBUG( _L8("CCPServerSession::GetChangeInfoData()" ) );
if( iNotificationHandler )
{
- isRegister = EFalse;
ExternalizeAndWriteToClientL( aMessage,
iNotificationHandler->GetPointerToChangeInfoList( ) );
iNotificationHandler->Reset( );
+ isRegister = EFalse;
}
}
--- a/contentpublishingsrv/contentpublishingutils/contentpublishingmap/src/cpliwmap.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/contentpublishingsrv/contentpublishingutils/contentpublishingmap/src/cpliwmap.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -333,6 +333,7 @@
for (TInt i = 0; i < count; i++)
{
TLiwVariant trigger;
+ trigger.PushL();
sourceList->AtL(i,trigger);
if (trigger.TypeId() == EVariantTypeDesC8)
{
@@ -347,6 +348,7 @@
list->AppendL(TLiwVariant(desc8));
CleanupStack::PopAndDestroy( &desc8 );
}
+ CleanupStack::PopAndDestroy(&trigger);
}
}
}
--- a/contentpublishingsrv/contentpublishingutils/pluginvalidator/inc/charvesterpluginvalidator.h Wed Apr 14 16:16:44 2010 +0300
+++ b/contentpublishingsrv/contentpublishingutils/pluginvalidator/inc/charvesterpluginvalidator.h Tue Apr 27 16:57:49 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
#include <e32hashtab.h>
-#include "cpluginvalidator.h"
+#include "cpluginvalidator.h"
// FORWARD DECLARATIONS
class CBlacklistHandler;
@@ -41,7 +41,7 @@
/**
* Class used to maintain required ECOM plugins implementations
*
- *
+ *
* @lib cpclient.dll
* @since S60 v 5.0
*/
@@ -51,21 +51,21 @@
/**
* Two-phased constructor.
- *
- */
- IMPORT_C static CHarvesterPluginValidator* NewL( TUid aUid,
+ *
+ */
+ IMPORT_C static CHarvesterPluginValidator* NewL( TUid aUid,
TAny *aParameter = NULL );
/**
* Two-phased constructor.
- *
- */
+ *
+ */
IMPORT_C static CHarvesterPluginValidator* NewLC( TUid aUid,
TAny *aParameter = NULL );
-
+
/**
* Desctructor.
- */
+ */
~CHarvesterPluginValidator();
@@ -73,39 +73,33 @@
/**
* C++ default constructor.
- */
- CHarvesterPluginValidator( TUid aUid, TAny *aParameter );
+ */
+ CHarvesterPluginValidator( TUid aUid, TAny *aParameter );
/**
* Perform the second phase construction of a CPluginValidator object.
- */
+ */
void ConstructL();
/**
* Loads or destroys plugins
- */
+ */
void ManagePluginsL();
-
+
/**
* Loads ECOM plugins
- */
+ */
void LoadPluginL( TPluginInfo& aPluginInfo );
private:
-
+
/**
* Blacklist Handler
* Own
*/
CBlacklistHandler* iBlacklist;
-
- /*
- * Startup flag
- *
- */
- TBool iStartup;
-
+
/*
* Property indicating the status of load operation
* Own
--- a/contentpublishingsrv/contentpublishingutils/pluginvalidator/src/charvesterpluginvalidator.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/contentpublishingsrv/contentpublishingutils/pluginvalidator/src/charvesterpluginvalidator.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -32,11 +32,11 @@
//
// ----------------------------------------------------------------------------
//
-EXPORT_C CHarvesterPluginValidator* CHarvesterPluginValidator::NewL( TUid aUid,
+EXPORT_C CHarvesterPluginValidator* CHarvesterPluginValidator::NewL( TUid aUid,
TAny *aParameter )
{
- CHarvesterPluginValidator* self =
- CHarvesterPluginValidator::NewLC( aUid , aParameter );
+ CHarvesterPluginValidator* self =
+ CHarvesterPluginValidator::NewLC( aUid , aParameter );
CleanupStack::Pop( self );
return self;
}
@@ -48,8 +48,8 @@
EXPORT_C CHarvesterPluginValidator* CHarvesterPluginValidator::NewLC( TUid aUid,
TAny *aParameter )
{
- CHarvesterPluginValidator* self = new( ELeave )
- CHarvesterPluginValidator( aUid, aParameter );
+ CHarvesterPluginValidator* self = new( ELeave )
+ CHarvesterPluginValidator( aUid, aParameter );
CleanupStack::PushL( self );
self->ConstructL();
return self;
@@ -70,12 +70,12 @@
//
// ----------------------------------------------------------------------------
//
-CHarvesterPluginValidator::CHarvesterPluginValidator( TUid aUid, TAny* aParameter ):
- CPluginValidator(aUid, aParameter),
- iStartup( ETrue )
- {
-
- }
+CHarvesterPluginValidator::CHarvesterPluginValidator(TUid aUid,
+ TAny* aParameter) :
+ CPluginValidator(aUid, aParameter)
+{
+
+}
// ----------------------------------------------------------------------------
//
@@ -83,7 +83,7 @@
//
void CHarvesterPluginValidator::ConstructL()
{
- iBlacklist = CBlacklistHandler::NewL( );
+ iBlacklist = CBlacklistHandler::NewL();
CPluginValidator::ConstructL();
}
@@ -92,76 +92,70 @@
//
// ----------------------------------------------------------------------------
//
-void CHarvesterPluginValidator::ManagePluginsL()
+void CHarvesterPluginValidator::ManagePluginsL()
{
- TInt errorCode = iInProgressProperty.Define( TUid::Uid( KHarvesterUid ),
- KInProgressPropertyKey, RProperty::EInt );
-
+ TInt errorCode = iInProgressProperty.Define( TUid::Uid( KHarvesterUid ),
+ KInProgressPropertyKey, RProperty::EInt );
+
if ( KErrAlreadyExists == errorCode )
- {
- TInt value(-1);
- iInProgressProperty.Get( TUid::Uid( KHarvesterUid ),
- KInProgressPropertyKey, value);
- if ( value == 1 )
- {
- // property value == inprogress
- // there was a panic in the previous startup
- // so we make unofficial blacklist official
- iBlacklist->CopyBlacklistL( EFalse );
- }
- }
+ {
+ TInt value(-1);
+ iInProgressProperty.Get( TUid::Uid( KHarvesterUid ),
+ KInProgressPropertyKey, value);
+ if ( value == 1 )
+ {
+ // property value == inprogress
+ // there was a panic in the previous startup
+ // so we make unofficial blacklist official
+ iBlacklist->CopyBlacklistL( EFalse );
+ }
+ }
else
- {
- User::LeaveIfError( errorCode );
- }
+ {
+ User::LeaveIfError( errorCode );
+ }
// copy blacklisted plugins to unoffical blacklist at startup
iBlacklist->CopyBlacklistL( ETrue );
-
+
// set property value to 1 (which means "in progress")
- iInProgressProperty.Set( TUid::Uid( KHarvesterUid ),
- KInProgressPropertyKey, 1 );
-
+ iInProgressProperty.Set( TUid::Uid( KHarvesterUid ),
+ KInProgressPropertyKey, 1 );
+
CPluginValidator::ManagePluginsL();
-
- if ( iStartup )
- {
- RProperty::Set( KPSUidActiveIdle2,
- KActiveIdleCpsPluginsUpdated , EPSAiPluginsUpdated );
- iStartup = EFalse;
- }
+
// set property value to 0 (which means "finished")
- iInProgressProperty.Set( TUid::Uid( KHarvesterUid ),
- KInProgressPropertyKey, 0 );
+ iInProgressProperty.Set( TUid::Uid( KHarvesterUid ),
+ KInProgressPropertyKey, 0 );
}
// ----------------------------------------------------------------------------
//
// ----------------------------------------------------------------------------
//
-void CHarvesterPluginValidator::LoadPluginL( TPluginInfo& aPluginInfo )
+void CHarvesterPluginValidator::LoadPluginL( TPluginInfo& aPluginInfo )
{
if ( !iBlacklist->IsPresentL( aPluginInfo.iImplementationUid ) )
- {
- //first we append UID to the blacklist
- iBlacklist->AppendL( aPluginInfo.iImplementationUid );
- TAny* plug ( NULL );
- TInt err( KErrNone );
- TRAP( err, plug = REComSession::CreateImplementationL(
- aPluginInfo.iImplementationUid,
- aPluginInfo.iDtor_ID_Key, iParameter ) );
- if( err==KErrNone && plug )
- {
- TRAP_IGNORE(
- CleanupStack::PushL( plug );
- aPluginInfo.iPlugin = plug;
- iPluginArray.AppendL( aPluginInfo );
- CleanupStack::Pop( plug );
- static_cast<CContentHarvesterPlugin*>( plug )->UpdateL()
- );
- }
- //no panic during load so we can remove UID from blacklist
- iBlacklist->RemoveL( aPluginInfo.iImplementationUid );
- }
+ {
+ //first we append UID to the blacklist
+ iBlacklist->AppendL( aPluginInfo.iImplementationUid );
+ TAny* plug ( NULL );
+ TInt err( KErrNone );
+ TRAP( err, plug = REComSession::CreateImplementationL(
+ aPluginInfo.iImplementationUid,
+ aPluginInfo.iDtor_ID_Key, iParameter ) );
+ if( err==KErrNone && plug )
+ {
+ TRAP_IGNORE(
+ CleanupStack::PushL( plug );
+ aPluginInfo.iPlugin = plug;
+ iPluginArray.AppendL( aPluginInfo );
+ CleanupStack::Pop( plug );
+ static_cast<CContentHarvesterPlugin*>( plug )->UpdateL()
+ );
+ }
+ //no panic during load so we can remove UID from blacklist
+ iBlacklist->RemoveL( aPluginInfo.iImplementationUid );
+ }
}
--- a/homescreenpluginsrv/hspsmanager/inc/hspsserverutil.h Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsserverutil.h Tue Apr 27 16:57:49 2010 +0300
@@ -468,7 +468,7 @@
* @param aFilename Referred file name or NULL
* @return True if a file was referred from the declaration
*/
- static TBool hspsServerUtil::IsLogoFile(
+ static TBool IsLogoFile(
const TDesC& aFileDeclaration,
TFileName& aFilename );
--- a/homescreenpluginsrv/hspsmanager/src/hspsmaintenancehandler.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsmaintenancehandler.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -4278,12 +4278,16 @@
{
ChspsODT* header = iHeaderListCache.At( i );
+ // Header clone is needed because it prevents modifying list cache
+ ChspsODT* clone = header->CloneL();
+ CleanupStack::PushL( clone );
+
// Check whether the header matches the search criteria (family etc)
- if ( FilterHeader( aSearchMask, *header ) )
+ if ( FilterHeader( aSearchMask, *clone ) )
{
// Update file paths into the existing logo declarations
- if( header->LogoFile().Length() &&
+ if( clone->LogoFile().Length() &&
iMaintainLogoResources &&
( header->ConfigurationType() == EhspsWidgetConfiguration ||
header->ConfigurationType() == EhspsTemplateConfiguration ) )
@@ -4299,11 +4303,11 @@
RBuf newDeclaration;
CleanupClosePushL( newDeclaration );
- newDeclaration.CreateL( header->LogoFile().Length() + KMaxFileName );
+ newDeclaration.CreateL( clone->LogoFile().Length() + KMaxFileName );
// Find location of the logo file and location where it shold be copied
hspsServerUtil::PopulateLogoPathsL(
- header->LogoFile(),
+ clone->LogoFile(),
iSecureId,
targetFile,
sourceFile,
@@ -4314,7 +4318,7 @@
&& newDeclaration.Length() )
{
// Update private path information to the logo declaration
- header->SetLogoFileL( newDeclaration );
+ clone->SetLogoFileL( newDeclaration );
hspsServerUtil::CopyResourceFileL(
iServerSession->FileSystem(),
@@ -4327,7 +4331,7 @@
}
// Convert the header to a descriptor
- HBufC8* data = header->MarshalHeaderL();
+ HBufC8* data = clone->MarshalHeaderL();
if ( data )
{
// Append to the search results
@@ -4336,6 +4340,7 @@
CleanupStack::Pop( data );
}
}
+ CleanupStack::PopAndDestroy( clone );
}
}
--- a/homescreenpluginsrv/hspsresult/src/hspspluginidlist.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreenpluginsrv/hspsresult/src/hspspluginidlist.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -10,6 +10,7 @@
* Nokia Corporation - initial contribution.
*
* Contributors:
+* Leo Zheng - GCC-E compilation error fix (2098)
*
* Description: Class ChspsPluginIdList is a HSPS utility class for passing
* plugin ids from a client process to the server process.
@@ -30,7 +31,7 @@
// might leave.
// -----------------------------------------------------------------------------
//
-EXPORT_C ChspsPluginIdList::ChspsPluginIdList( TInt aGranularity ) : CArrayFixFlat( aGranularity )
+EXPORT_C ChspsPluginIdList::ChspsPluginIdList( TInt aGranularity ) : CArrayFixFlat<TInt>( aGranularity )
{
}
--- a/homescreensrv_plat/ai_utilities_api/inc/aicpscommandbuffer.h Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreensrv_plat/ai_utilities_api/inc/aicpscommandbuffer.h Tue Apr 27 16:57:49 2010 +0300
@@ -25,7 +25,9 @@
// User includes
// Forward declarations
+class MLiwInterface;
class CLiwDefaultMap;
+class CLiwServiceHandler;
/**
* AI Cps command buffer interface
@@ -49,8 +51,24 @@
*/
virtual void AddCommand( const TDesC& aPluginId,
const TDesC& aType, CLiwDefaultMap* aFilter,
- const TDesC8& aAction) = 0;
-
+ const TDesC8& aAction ) = 0;
+
+ /**
+ * Gets Service Handler
+ *
+ * @since S60 5.2
+ * @return Service handler
+ */
+ virtual CLiwServiceHandler* ServiceHandler() const = 0;
+
+ /**
+ * Gets IContentPublishing Interface
+ *
+ * @since S60 5.2
+ * @return Interface
+ */
+ virtual MLiwInterface* CpsInterface() const = 0;
+
protected:
// destructor
--- a/homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h Tue Apr 27 16:57:49 2010 +0300
@@ -86,6 +86,15 @@
virtual TInt ViewListL( CHsContentInfoArray& aArray ) = 0;
/**
+ * Returns the list of available Home screen views included in an
+ * application configuration
+ * @param aInfo Content info defining the application configuration
+ * @param aArray List of views
+ * @return KErrNone on success, any of system wide error codes
+ */
+ virtual TInt ViewListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ) = 0;
+
+ /**
* Returns the list of available Home screen application configurations
* @param aArray List of application configurations
* @return KErrNone on success, any of system wide error codes
--- a/homescreensrv_plat/sapi_actionhandler/actionhandlerplugins/group/ahplugins.mmp Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreensrv_plat/sapi_actionhandler/actionhandlerplugins/group/ahplugins.mmp Tue Apr 27 16:57:49 2010 +0300
@@ -57,7 +57,5 @@
LIBRARY sendui.lib
LIBRARY hlplch.lib
LIBRARY ws32.lib
-LIBRARY gfxtrans.lib
-
// End of File
--- a/homescreensrv_plat/sapi_actionhandler/actionhandlerplugins/src/ahpapplauncher.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreensrv_plat/sapi_actionhandler/actionhandlerplugins/src/ahpapplauncher.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -23,8 +23,6 @@
#include <eikenv.h>
#include <eikappui.h>
#include <liwvariant.h>
-#include <gfxtranseffect/gfxtranseffect.h>
-#include <akntranseffect.h>
#include "ahproperties.hrh"
#include "ahpapplauncher.h"
@@ -108,45 +106,29 @@
if ( !ExtractUidL( aMap, appUid, KApplicationUid ) )
{
- TApaTaskList taskList( iEnv->WsSession() );
- TApaTask task = taskList.FindApp( appUid );
- if ( task.Exists( ) )
- {
- GfxTransEffect::BeginFullScreen(
- AknTransEffect::EApplicationStart,
- TRect(),
- AknTransEffect::EParameterType,
- AknTransEffect::GfxTransParam( appUid,
- AknTransEffect::TParameter::EActivateExplicitContinue ));
-
- errCode = KErrNone;
- task.BringToForeground();
- }
- else
+ // app not yet running
+ RApaLsSession appSession;
+ CleanupClosePushL( appSession );
+ User::LeaveIfError( appSession.Connect( ) );
+
+ CApaCommandLine* cmd = CApaCommandLine::NewLC( );
+ cmd->SetCommandL( GetCommandL( aMap ) );
+ RBuf documentNameValue;
+ CleanupClosePushL( documentNameValue );
+ if( !ExtractDesL( aMap, documentNameValue, KDocumentName ) )
{
- // app not yet running
- RApaLsSession appSession;
- CleanupClosePushL( appSession );
- User::LeaveIfError( appSession.Connect( ) );
-
- CApaCommandLine* cmd = CApaCommandLine::NewLC( );
- cmd->SetCommandL( GetCommandL( aMap ) );
- RBuf documentNameValue;
- CleanupClosePushL( documentNameValue );
- if( !ExtractDesL( aMap, documentNameValue, KDocumentName ) )
- {
- cmd->SetDocumentNameL( documentNameValue );
- }
- TApaAppInfo appInfo;
- appSession.GetAppInfo( appInfo, appUid );
- cmd->SetExecutableNameL( appInfo.iFullName );
- errCode = appSession.StartApp( *cmd );
-
- CleanupStack::PopAndDestroy( &documentNameValue );
- CleanupStack::PopAndDestroy( cmd );
- CleanupStack::PopAndDestroy( &appSession );
+ cmd->SetDocumentNameL( documentNameValue );
}
+ TApaAppInfo appInfo;
+ appSession.GetAppInfo( appInfo, appUid );
+ cmd->SetExecutableNameL( appInfo.iFullName );
+ errCode = appSession.StartApp( *cmd );
+
+ CleanupStack::PopAndDestroy( &documentNameValue );
+ CleanupStack::PopAndDestroy( cmd );
+ CleanupStack::PopAndDestroy( &appSession );
}
+
return errCode;
}
--- a/homescreensrv_plat/sapi_contentpublishing/src/cpclientactivenotifier.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreensrv_plat/sapi_contentpublishing/src/cpclientactivenotifier.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -204,8 +204,10 @@
iSizeDes = NULL;
CleanupStack::PopAndDestroy(&outbuf);
}
- RegisterAgainL();
-
+ if (KErrNoMemory!=iStatus.Int())
+ {
+ RegisterAgainL();
+ }
NotifyObserversL(error, eventParamList);
CleanupStack::PopAndDestroy(eventParamList);
}
@@ -292,9 +294,12 @@
//
// ----------------------------------------------------------------------------
//
-TInt CCPActiveNotifier::RunError( TInt /*aError*/)
+TInt CCPActiveNotifier::RunError( TInt aError )
{
- TRAP_IGNORE( RegisterAgainL( ) );
+ if (KErrNoMemory!=aError)
+ {
+ TRAP_IGNORE( RegisterAgainL( ) );
+ }
return KErrNone;
}
// ----------------------------------------------------------------------------
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_restoreconfigurations_1.h Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_restoreconfigurations_1.h Tue Apr 27 16:57:49 2010 +0300
@@ -25,10 +25,7 @@
Test purpose
-Verify that HSPS removes all plugin configurations from the active view
-or that all but one view are removed from the application configuration.
-Activity should be maintained. First locked view should remain or if not found,
-first unlocked view.
+Verify that "restore active" and "restore all" functionality works as specified.
Pre-conditions
• There must be installed test themes for Active Idle application and Typical
@@ -46,14 +43,13 @@
• Input:
GetActiveAppConf
• Expected output:
- There are still two views of which the first view remains active
+ ROM configuration is restored and returned.
Test step 3:
• Input:
GetPluginConf(“Typical - View1”)
• Expected output:
- There are no plugins (widgets) in the first view
-
+ ROM view configuration is returned.
Test step 4:
• Input:
@@ -71,8 +67,7 @@
• Input:
GetPluginConf(“Typical - View1”)
• Expected output:
- There are no plugins (widgets) in the remaining view
-
+ There are no plugins (widgets) in the remaining view
*/
// Test step 1 method:
@@ -1104,7 +1099,340 @@
// - Version 1.0
// - Item count (LE)
10,
+3,0,0,0,
+// - appConf::plugins
+// - Version 1.0
+// - List item starts
+10,
0,0,0,0,
+// - appConf::plugins[0]
+// - Version 1.0
+// - Variant value type, EVariantTypeMap
+10,
+8,
+// - plugins[0] map
+// - Version 1.0
+// - Item count (LE)
+10,
+4,0,0,0,
+// - plugins[0]::id
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+2,0,0,0,
+10,
+'i','d',
+// - plugins[0]::id
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+1,0,0,0,
+6,
+'2',
+// - plugins[0]::uid
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+3,0,0,0,
+14,
+'u','i','d',
+// - plugins[0]::uid
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+10,0,0,0,
+42,
+'0','x','2','0','0','0','B','1','2','0',
+// - plugins[0]::activationstate
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+15,0,0,0,
+62,
+'a','c','t','i','v','a','t','i','o','n','s','t','a','t','e',
+// - plugins[0]::activationstate
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+1,0,0,0,
+6,
+'1',
+// - plugins[0]::locking_status
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+14,0,0,0,
+58,
+'l','o','c','k','i','n','g','_','s','t','a','t','u','s',
+// - plugins[0]::locking_status
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+4,0,0,0,
+18,
+'n','o','n','e',
+// - appConf::plugins
+// - Version 1.0
+// - List item starts
+10,
+0,0,0,0,
+// - appConf::plugins[1]
+// - Version 1.0
+// - Variant value type, EVariantTypeMap
+10,
+8,
+// - plugins[1] map
+// - Version 1.0
+// - Item count (LE)
+10,
+4,0,0,0,
+// - plugins[1]::id
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+2,0,0,0,
+10,
+'i','d',
+// - plugins[1]::id
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+1,0,0,0,
+6,
+'3',
+// - plugins[1]::uid
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+3,0,0,0,
+14,
+'u','i','d',
+// - plugins[1]::uid
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+10,0,0,0,
+42,
+'0','x','2','0','0','0','B','1','2','0',
+// - plugins[1]::activationstate
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+15,0,0,0,
+62,
+'a','c','t','i','v','a','t','i','o','n','s','t','a','t','e',
+// - plugins[1]::activationstate
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+1,0,0,0,
+6,
+'0',
+// - plugins[1]::locking_status
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+14,0,0,0,
+58,
+'l','o','c','k','i','n','g','_','s','t','a','t','u','s',
+// - plugins[1]::locking_status
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+4,0,0,0,
+18,
+'n','o','n','e',
+// - appConf::plugins
+// - Version 1.0
+// - List item starts
+10,
+0,0,0,0,
+// - appConf::plugins[2]
+// - Version 1.0
+// - Variant value type, EVariantTypeMap
+10,
+8,
+// - plugins[2] map
+// - Version 1.0
+// - Item count (LE)
+10,
+4,0,0,0,
+// - plugins[2]::id
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+2,0,0,0,
+10,
+'i','d',
+// - plugins[2]::id
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+1,0,0,0,
+6,
+'4',
+// - plugins[2]::uid
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+3,0,0,0,
+14,
+'u','i','d',
+// - plugins[2]::uid
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+10,0,0,0,
+42,
+'0','x','2','0','0','0','B','1','2','0',
+// - plugins[2]::activationstate
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+15,0,0,0,
+62,
+'a','c','t','i','v','a','t','i','o','n','s','t','a','t','e',
+// - plugins[2]::activationstate
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+1,0,0,0,
+6,
+'0',
+// - plugins[2]::locking_status
+// - Variant name
+// - Version 1.0
+// - Semantic ID (LE)
+// - Variant name length (LE)
+// - Variant name descriptor maximum length ( ( variant name length * 4 ) + 2 )
+// - Variant name
+10,
+12,0,0,0,
+14,0,0,0,
+58,
+'l','o','c','k','i','n','g','_','s','t','a','t','u','s',
+// - plugins[2]::locking_status
+// - Variant value
+// - Version 1.0
+// - Variant value type, EVariantTypeDesC
+// - Variant value length (LE)
+// - Variant value descriptor maximum length ( ( variant value length * 4 ) + 2 )
+// - Variant value
+10,
+5,
+4,0,0,0,
+18,
+'n','o','n','e',
// - pluginConf::settings
// - Variant name
// - Version 1.0
@@ -1133,7 +1461,6 @@
// - List item starts
10,
0,0,0,0,
-
// - items[0]
// - Version 1.0
// - Variant value type, EVariantTypeMap
--- a/homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsiconutility.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/homescreensrv_plat/sapi_menucontent/mcsservice/src/mcsiconutility.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -22,7 +22,7 @@
#include <mcsmenu.h>
#include <mcsmenuitem.h>
#include <mcsmenuutils.h>
-#include <SATDomainPSKeys.h>
+#include <satdomainpskeys.h>
#include <e32property.h>
#include <apgcli.h>
#include <AknInternalIconUtils.h>
--- a/idlefw/inc/framework/aipluginfactory.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/inc/framework/aipluginfactory.h Tue Apr 27 16:57:49 2010 +0300
@@ -29,7 +29,7 @@
// Forward declarations
class CAiUiControllerManager;
class CAiStateManager;
-class MAiCpsCommandBuffer;
+class CAiCpsCommandBuffer;
class CHsContentPublisher;
class THsPublisherInfo;
@@ -122,7 +122,7 @@
* @since S60 5.2
* @param aCommanddBuffer Command buffer
*/
- void SetCommandBuffer( MAiCpsCommandBuffer* aCommanddBuffer );
+ void SetCommandBuffer( CAiCpsCommandBuffer* aCommanddBuffer );
private:
// private constructors
@@ -159,7 +159,7 @@
/** UI Controller Manager, Not owned */
CAiUiControllerManager& iUiControllerManager;
/** Cps command buffer, Not owned */
- MAiCpsCommandBuffer* iCommandBuffer;
+ CAiCpsCommandBuffer* iCommandBuffer;
/** Array of loaded data plugins, Owned */
mutable RPointerArray< CHsContentPublisher > iPublishers;
/** Ecom implementation info, Owned */
--- a/idlefw/inc/framework/caicpscommandbuffer.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/inc/framework/caicpscommandbuffer.h Tue Apr 27 16:57:49 2010 +0300
@@ -79,6 +79,13 @@
*/
void Flush();
+ /**
+ * Gets the CPS interface
+ *
+ * @since S60 5.2
+ */
+ void GetCPSInterfaceL();
+
private:
// from MAiCpsCommandBuffer
@@ -86,16 +93,27 @@
* @see MAiCpsCommandBuffer
*/
void AddCommand( const TDesC& aPluginId, const TDesC& aType,
- CLiwDefaultMap* aFilter, const TDesC8& aAction);
+ CLiwDefaultMap* aFilter, const TDesC8& aAction);
+
+ /**
+ * @see MAiCpsCommandBuffer
+ */
+ CLiwServiceHandler* ServiceHandler() const;
+
+ /**
+ * @see MAiCpsCommandBuffer
+ */
+ MLiwInterface* CpsInterface() const;
private:
// new functions
+
/**
- * Gets the CPS interface
+ * Detach the CPS interface
*
* @since S60 5.2
- */
- void GetCPSInterfaceL();
+ */
+ void DetachL();
/**
* Adds a CPS command execute commnad for a spcific Plugin
--- a/idlefw/plugins/devicestatus/inc/aibtsappublisher.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/aibtsappublisher.h Tue Apr 27 16:57:49 2010 +0300
@@ -23,13 +23,13 @@
// System includes
#include <e32base.h>
#include <coemain.h>
+#include <aidevicestatuscontentmodel.h>
#include <RSSSettings.h>
#include <MSSSettingsObserver.h>
#include <MProfileChangeObserver.h>
// User includes
#include "aidevicestatuspublisher.h"
-#include "aidevicestatuscontentmodel.h"
// Forward declarations
class MAiDeviceStatusContentObserver;
--- a/idlefw/plugins/devicestatus/inc/aicugmcnpublisher.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/aicugmcnpublisher.h Tue Apr 27 16:57:49 2010 +0300
@@ -21,12 +21,12 @@
// System includes
#include <e32base.h>
+#include <aidevicestatuscontentmodel.h>
#include <RSSSettings.h>
#include <MSSSettingsObserver.h>
// User includes
#include "aidevicestatuspublisher.h"
-#include "aidevicestatuscontentmodel.h"
#include "ainetworkinfoobserver.h"
// Forward declarations
--- a/idlefw/plugins/devicestatus/inc/aicugpublisher.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/aicugpublisher.h Tue Apr 27 16:57:49 2010 +0300
@@ -21,12 +21,12 @@
// System includes
#include <e32base.h>
+#include <aidevicestatuscontentmodel.h>
#include <RSSSettings.h>
#include <MSSSettingsObserver.h>
// User includes
#include "aidevicestatuspublisher.h"
-#include "aidevicestatuscontentmodel.h"
// Forward declarations
class MAiDeviceStatusContentObserver;
--- a/idlefw/plugins/devicestatus/inc/aidatepublisher.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/aidatepublisher.h Tue Apr 27 16:57:49 2010 +0300
@@ -22,10 +22,10 @@
// System includes
#include <e32base.h>
#include <coemain.h>
+#include <aidevicestatuscontentmodel.h>
// User includes
#include "aidevicestatuspublisher.h"
-#include "aidevicestatuscontentmodel.h"
// Forward declarations
class MAiDeviceStatusContentObserver;
--- a/idlefw/plugins/devicestatus/inc/aidevicestatuscontentmodel.h Wed Apr 14 16:16:44 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Device Status plug-in content model
-*
-*/
-
-
-#ifndef AIDEVICESTATUSCONTENTMODEL_H
-#define AIDEVICESTATUSCONTENTMODEL_H
-
-#include <aicontentmodel.h>
-
-/**
- * Content model for Device Status plug-in.
- * This header defines which information Device Status publishes
- */
-
-// ================================= CONTENT ===================================
-
-//content item id's
-enum TAiDeviceStatusContentIds
- {
- EAiDeviceStatusContentNetworkIdentity,
- EAiDeviceStatusContentProfileName,
- EAiDeviceStatusContentGeneralProfileName,
- EAiDeviceStatusContentDate,
- EAiDeviceStatusContentSilentIndicator,
- EAiDeviceStatusContentTimedProfileIndicator,
- EAiDeviceStatusContentSIMRegStatus,
- EAiDeviceStatusContentNWStatus,
- EAiDeviceStatusContentMCNIndicator,
- EAiDeviceStatusContentVHZIndicator,
- EAiDeviceStatusContentCUGIndicator,
- EAiDeviceStatusContentGeneralIndicator,
- EAiDeviceStatusContentVHZText,
- EAiDeviceStatusContentCUGMCNIndicator
- };
-
-
-//content item textual id's
-const wchar_t KAiDeviceStatusContentNetworkIdentity_Cid[] = L"NetworkIdentity";
-const wchar_t KAiDeviceStatusContentProfileName_Cid[] = L"ProfileName";
-const wchar_t KAiDeviceStatusContentGeneralProfileName_Cid[] = L"GeneralProfileName";
-const wchar_t KAiDeviceStatusContentDate_Cid[] = L"Date";
-const wchar_t KAiDeviceStatusContentSilentIndicator_Cid[] = L"SilentIndicator";
-const wchar_t KAiDeviceStatusContentTimedProfileIndicator_Cid[] = L"TimedProfileIndicator";
-const wchar_t KAiDeviceStatusContentSIMRegStatus_Cid[] = L"SIMRegStatus";
-const wchar_t KAiDeviceStatusContentNWStatus_Cid[] = L"NWStatus";
-const wchar_t KAiDeviceStatusContentMCNIndicator_Cid[] = L"MCNIndicator";
-const wchar_t KAiDeviceStatusContentVHZIndicator_Cid[] = L"VHZIndicator";
-const wchar_t KAiDeviceStatusContentCUGIndicator_Cid[] = L"CUGIndicator";
-const wchar_t KAiDeviceStatusContentGeneralIndicator_Cid[] = L"GeneralIndicator";
-const wchar_t KAiDeviceStatusContentVHZText_Cid[] = L"VHZText";
-const wchar_t KAiDeviceStatusContentCUGMCNIndicator_Cid[] = L"CUGMCNIndicator";
-
-
-const char KAiDeviceStatusMimeTypeTextPlain[] = "text/plain";
-
-/**
-* Content what device status plugin publishes
-*/
-
-const TAiContentItem KAiDeviceStatusContent[] =
- {
- //Published data can be service provider name, offline profile,
- //operator logo or anything related to network status
- { EAiDeviceStatusContentNetworkIdentity, KAiDeviceStatusContentNetworkIdentity_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data is name of the profile from profiles engine
- { EAiDeviceStatusContentProfileName, KAiDeviceStatusContentProfileName_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data is name of the general profile from profiles engine
- { EAiDeviceStatusContentGeneralProfileName, KAiDeviceStatusContentGeneralProfileName_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data is current date as a text. Formatted according to current locale
- { EAiDeviceStatusContentDate, KAiDeviceStatusContentDate_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data silent indicator as a text
- { EAiDeviceStatusContentSilentIndicator, KAiDeviceStatusContentSilentIndicator_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data timed profile indicator as a text
- { EAiDeviceStatusContentTimedProfileIndicator, KAiDeviceStatusContentTimedProfileIndicator_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data is resource id
- { EAiDeviceStatusContentSIMRegStatus, KAiDeviceStatusContentSIMRegStatus_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data is resource id
- { EAiDeviceStatusContentNWStatus, KAiDeviceStatusContentNWStatus_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data is MCN message
- { EAiDeviceStatusContentMCNIndicator, KAiDeviceStatusContentMCNIndicator_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data is VHZ name
- { EAiDeviceStatusContentVHZIndicator, KAiDeviceStatusContentVHZIndicator_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data is localized text, for example "Group 1"
- { EAiDeviceStatusContentCUGIndicator, KAiDeviceStatusContentCUGIndicator_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data general indicator as a text
- { EAiDeviceStatusContentGeneralIndicator, KAiDeviceStatusContentGeneralIndicator_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data VHZ text
- { EAiDeviceStatusContentVHZText, KAiDeviceStatusContentVHZText_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-
- //Published data is localized text, for example "Group 1" or MCN message
- { EAiDeviceStatusContentCUGMCNIndicator, KAiDeviceStatusContentCUGMCNIndicator_Cid,
- KAiDeviceStatusMimeTypeTextPlain }
- };
-
-const TInt KAiDeviceStatusContentCount = sizeof( KAiDeviceStatusContent ) /
- sizeof( KAiDeviceStatusContent[0] );
-
-
-
-//content item id's
-enum TAiDeviceStatusResourceIds
- {
- EAiDeviceStatusResourceSIMRegFail,
- EAiDeviceStatusResourceNWOk,
- EAiDeviceStatusResourceNWLost
- };
-
-const wchar_t KAiDeviceStatusResourceSIMRegFail_Cid[] = L"SIMRegFail";
-const wchar_t KAiDeviceStatusResourceShowNWLost_Cid[] = L"NWLost";
-
-
-const TAiContentItem KAiDeviceStatusResources[] =
-{
- //Published data is resource id
- { EAiDeviceStatusResourceSIMRegFail, KAiDeviceStatusResourceSIMRegFail_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
- { EAiDeviceStatusResourceNWLost, KAiDeviceStatusResourceShowNWLost_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
-};
-
-const TInt KAiDeviceStatusResourceCount = sizeof( KAiDeviceStatusResources ) /
- sizeof( KAiDeviceStatusResources[0] );
-
-
-#endif // AIDEVICESTATUSCONTENTMODEL_H
--- a/idlefw/plugins/devicestatus/inc/aimcnpublisher.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/aimcnpublisher.h Tue Apr 27 16:57:49 2010 +0300
@@ -21,10 +21,10 @@
// System includes
#include <e32base.h>
+#include <aidevicestatuscontentmodel.h>
// User includes
#include "aidevicestatuspublisher.h"
-#include "aidevicestatuscontentmodel.h"
#include "ainetworkinfoobserver.h"
// Forward declarations
--- a/idlefw/plugins/devicestatus/inc/ainwspublisher.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/ainwspublisher.h Tue Apr 27 16:57:49 2010 +0300
@@ -21,10 +21,10 @@
// System includes
#include <e32base.h>
+#include <aidevicestatuscontentmodel.h>
// User includes
#include "aidevicestatuspublisher.h"
-#include "aidevicestatuscontentmodel.h"
#include "ainetworkinfoobserver.h"
// Forward declarations
--- a/idlefw/plugins/devicestatus/inc/aiprofilepublisher.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/aiprofilepublisher.h Tue Apr 27 16:57:49 2010 +0300
@@ -20,11 +20,11 @@
#define C_AIPROFILEPUBLISHER_H
#include <e32base.h>
+#include <aidevicestatuscontentmodel.h>
#include <RSSSettings.h>
#include <MSSSettingsObserver.h>
#include <MProfileChangeObserver.h>
#include "aidevicestatuspublisher.h"
-#include "aidevicestatuscontentmodel.h"
class MProfileEngine;
class MAiDeviceStatusContentObserver;
--- a/idlefw/plugins/devicestatus/inc/aisimregpublisher.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/aisimregpublisher.h Tue Apr 27 16:57:49 2010 +0300
@@ -21,10 +21,10 @@
// System includes
#include <e32base.h>
+#include <aidevicestatuscontentmodel.h>
// User includes
#include "aidevicestatuspublisher.h"
-#include "aidevicestatuscontentmodel.h"
#include "ainetworkinfoobserver.h"
// Forward declarations
--- a/idlefw/plugins/devicestatus/inc/aivhzpublisher.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/inc/aivhzpublisher.h Tue Apr 27 16:57:49 2010 +0300
@@ -21,10 +21,10 @@
// System includes
#include <e32base.h>
+#include <aidevicestatuscontentmodel.h>
// User includes
#include "aidevicestatuspublisher.h"
-#include "aidevicestatuscontentmodel.h"
#include "ainetworkinfoobserver.h"
// Forward declarations
--- a/idlefw/plugins/devicestatus/src/aidevicestatusplugin.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/src/aidevicestatusplugin.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -23,12 +23,12 @@
#include <bautils.h>
#include <aiutility.h>
#include <featmgr.h>
+#include <aidevicestatuscontentmodel.h>
// User includes
#include "aidevicestatusplugin.h"
#include "aidevicestatuspluginengine.h"
#include "aipublishprioritizer.h"
-#include "aidevicestatuscontentmodel.h"
#include "aimulticontentobserver.h"
#include "aipluginsettings.h"
#include "ainetworkinfolistener.h"
--- a/idlefw/plugins/devicestatus/src/aioperatorlogopublisher.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/src/aioperatorlogopublisher.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -35,9 +35,9 @@
#include <AknStatuspaneUtils.h>
#include <AknUtils.h>
#include <aipspropertyobserver.h>
+#include <aidevicestatuscontentmodel.h>
#include "aioperatorlogopublisher.h"
#include "ainetworkinfolistener.h"
-#include "aidevicestatuscontentmodel.h"
#include "aiprioritizer.h"
#include "ainwidpriorities.h"
#include "debug.h"
--- a/idlefw/plugins/devicestatus/src/aioperatornamepublisher.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/src/aioperatornamepublisher.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -20,6 +20,7 @@
#include <centralrepository.h>
#include <avkondomainpskeys.h>
#include <e32property.h>
+#include <aidevicestatuscontentmodel.h>
#include <ProEngFactory.h>
#include <MProfileEngine.h>
#include <MProfile.h>
@@ -29,7 +30,6 @@
#include <aidevstaplgres.rsg>
#include "aioperatornamepublisher.h"
#include "ainetworkinfolistener.h"
-#include "aidevicestatuscontentmodel.h"
#include "aiprioritizer.h"
#include "ainwidpriorities.h"
#include "activeidle2domaincrkeys.h"
--- a/idlefw/plugins/devicestatus/src/aipublishprioritizer.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/devicestatus/src/aipublishprioritizer.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -18,7 +18,7 @@
#include "aipublishprioritizer.h"
#include "ainwidpriorities.h"
-#include "aidevicestatuscontentmodel.h"
+#include <aidevicestatuscontentmodel.h>
#include <aicontentrequest.h>
#include "aipublisherbroadcaster.h"
--- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -45,11 +45,27 @@
// ======== LOCAL FUNCTIONS ========
-static void ItemMapArrayCleanupFunc( TAny* aPointerArray )
+// ----------------------------------------------------------------------------
+// CleanupResetAndDestroy()
+// ----------------------------------------------------------------------------
+//
+template<class T>
+static void CleanupResetAndDestroy( TAny* aObj )
{
- RPointerArray<CItemMap>* p = static_cast<RPointerArray<CItemMap>*>( aPointerArray );
- p->ResetAndDestroy();
- p->Close();
+ if( aObj )
+ {
+ static_cast<T*>( aObj )->ResetAndDestroy();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CleanupResetAndDestroyPushL
+// ----------------------------------------------------------------------------
+//
+template<class T>
+static void CleanupResetAndDestroyPushL(T& aArray)
+ {
+ CleanupStack::PushL( TCleanupItem( &CleanupResetAndDestroy<T>, &aArray ) );
}
// ======== MEMBER FUNCTIONS ========
@@ -211,8 +227,8 @@
void CMCSPluginData::UpdateDataL()
{
RPointerArray<CItemMap> settings;
- TCleanupItem settingsCleanupItem( ItemMapArrayCleanupFunc, &settings );
- CleanupStack::PushL( settingsCleanupItem );
+ CleanupResetAndDestroyPushL( settings );
+
iPluginSettings->GetSettingsL( iInstanceUid, settings );
TInt count = settings.Count();
TBool wasEmpty = !iData.Count();
@@ -249,7 +265,9 @@
}
}
}
- CleanupStack::PopAndDestroy(); // settingsCleanupItem
+
+ // Cleanup.
+ CleanupStack::PopAndDestroy(); // settings
}
// ---------------------------------------------------------------------------
@@ -471,7 +489,8 @@
void CMCSPluginData::SaveUndefinedItemL( const TInt& aIndex )
{
RPointerArray<CItemMap> settingItems;
- CleanupClosePushL( settingItems );
+ CleanupResetAndDestroyPushL( settingItems );
+
iPluginSettings->GetSettingsL( iInstanceUid, settingItems );
if ( aIndex >= 0 && aIndex < settingItems.Count() )
{
@@ -504,9 +523,7 @@
}
// ETrue tells that modified settings are stored also to plugin reference
iPluginSettings->SetSettingsL( iInstanceUid, settingItems, ETrue );
- CleanupStack::Pop( &settingItems );
- settingItems.ResetAndDestroy();
-
+ CleanupStack::PopAndDestroy(); // settingItems
}
// End of file
--- a/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -387,7 +387,7 @@
{
CMenuItem* menuItem;
-
+
// check if item exists in MCS
if ( aMenuItem )
{
@@ -708,6 +708,9 @@
CMCSData& data( iPluginData->DataItemL( i ) );
data.SetDirty( ETrue );
}
+
+ iPlugin.PublishL();
+
// Notification must be activated again
iNotifyWatcher->Cancel();
iNotifier.Notify( 0,
--- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsbkmlist.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsbkmlist.h Tue Apr 27 16:57:49 2010 +0300
@@ -95,7 +95,7 @@
* @param aIndex Setting item to find
* @return MCS menu item
*/
- CMenuItem& ItemL( TInt aIndex );
+ CMenuItem* ItemL( TInt aIndex );
/**
* Returns target bookmark data from the given index
--- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsmodel.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsmodel.h Tue Apr 27 16:57:49 2010 +0300
@@ -152,12 +152,12 @@
/**
* Update application list
*/
- void UpdateAppListL();
+ void UpdateAppListL( TBool aUpdateSettings = ETrue );
/**
* Update bookmark list
*/
- void UpdateBkmListL();
+ void UpdateBkmListL( TBool aUpdateSettings = ETrue );
/**
* Update settings container
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettings.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettings.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -190,9 +190,10 @@
}
cba->DrawDeferred();
}
- iModel->UpdateAppListL();
- iModel->UpdateBkmListL();
+
iModel->SetPluginIdL( aCustomMessage );
+ iModel->UpdateAppListL( EFalse );
+ iModel->UpdateBkmListL( EFalse );
iModel->UpdateSettingsL();
CGSBaseView::DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage );
}
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsapplist.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -146,10 +146,11 @@
CMenuItem* item = iListItems[ aIndex ];
TBool attrExists;
- TPtrC itm;
+ TPtrC itm( KNullDesC );
TRAP_IGNORE(
itm.Set( item->GetAttributeL( KMenuAttrLongName, attrExists ) );
)
+
return itm;
}
@@ -195,14 +196,13 @@
{
if( aProperties[j]->Name() == KType )
{
-
if ( aProperties[j]->Value() == KProperValueFolder )
{
isFolder = ETrue;
}
break;
}
- }
+ }
TBool itemFound( EFalse );
@@ -211,7 +211,6 @@
{
TBool match( ETrue );
CMenuItem* item = iListItems[ i ];
-
for ( TInt j = 0; j < aProperties.Count() && match; j++ )
{
// type and locked properties skipped
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsbkmlist.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsbkmlist.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -181,7 +181,6 @@
//
void CMCSPluginSettingsBkmList::GetBookmarksFromMCSL()
{
- TBool exists( EFalse );
CMenuFilter* filter = CMenuFilter::NewL();
CleanupStack::PushL( filter );
filter->SetType( KMenuUrl );
@@ -192,17 +191,20 @@
TInt count( itemArray.Count() );
for ( TInt i = 0; i < count; i++ )
{
+ TBool uidExists( EFalse );
+ TBool nameExists( EFalse );
+ TBool urlExists( EFalse );
CMenuItem* menuItem = CMenuItem::OpenL( iMenu, itemArray[i] );
CleanupStack::PushL( menuItem );
- TPtrC uid = menuItem->GetAttributeL( KMenuAttrUid, exists );
- TPtrC name = menuItem->GetAttributeL( KMenuAttrLongName, exists );
- TPtrC url = menuItem->GetAttributeL( KUrl, exists );
- // if exists, add it
- if ( exists )
+ TPtrC uid = menuItem->GetAttributeL( KMenuAttrUid, uidExists );
+ TPtrC name = menuItem->GetAttributeL( KMenuAttrLongName, nameExists );
+ TPtrC url = menuItem->GetAttributeL( KUrl, urlExists );
+ // if all attrib exists, add it ( url ignored )
+ if ( uidExists && uid.Length() > 0 &&
+ nameExists && name.Length() > 0 )
{
AddBookmarkL( uid, name, url, EMCSBookmark );
}
-
CleanupStack::PopAndDestroy( menuItem );
}
@@ -216,7 +218,7 @@
// If predefined bookmark was selected, MCS menu item is retrieved
// ---------------------------------------------------------------------------
//
-CMenuItem& CMCSPluginSettingsBkmList::ItemL( TInt aIndex )
+CMenuItem* CMCSPluginSettingsBkmList::ItemL( TInt aIndex )
{
CMenuItem* menuItem( NULL );
CBkmListItem* listItem = iListItems[aIndex];
@@ -228,7 +230,7 @@
{
menuItem = MCSMenuItemL( *listItem->iUid, *listItem->iCaption, *listItem->iUrl );
}
- return *menuItem;
+ return menuItem;
}
// ---------------------------------------------------------------------------
@@ -275,9 +277,12 @@
if( itemArray.Count() > 0 )
{
item = CMenuItem::OpenL( iMenu, itemArray[0] );
- CleanupStack::PushL( item );
- iMenuItems.AppendL( item );
- CleanupStack::Pop( item );
+ if ( item )
+ {
+ CleanupStack::PushL( item );
+ iMenuItems.AppendL( item );
+ CleanupStack::Pop( item );
+ }
}
CleanupStack::PopAndDestroy( &itemArray );
CleanupStack::PopAndDestroy( filter );
@@ -300,6 +305,11 @@
{
listItem->iUrl = aUrl.AllocL();
}
+ else
+ {
+ listItem->iUrl = KNullDesC().AllocL();
+ }
+
TLinearOrder<CBkmListItem> sortMethod(CBkmListItem::CompareCaption);
User::LeaveIfError(iListItems.InsertInOrderAllowRepeats(listItem, sortMethod));
CleanupStack::Pop(listItem);
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -296,7 +296,6 @@
case EMsvEntriesChanged:
{
iModel->UpdateAppListL();
- iModel->UpdateSettingsL();
}
break;
default:
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -52,6 +52,33 @@
using namespace HSPluginSettingsIf;
+// ======== LOCAL FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// CleanupResetAndDestroy()
+// ----------------------------------------------------------------------------
+//
+template<class T>
+static void CleanupResetAndDestroy( TAny* aObj )
+ {
+ if( aObj )
+ {
+ static_cast<T*>( aObj )->ResetAndDestroy();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CleanupResetAndDestroyPushL
+// ----------------------------------------------------------------------------
+//
+template<class T>
+static void CleanupResetAndDestroyPushL(T& aArray)
+ {
+ CleanupStack::PushL( TCleanupItem( &CleanupResetAndDestroy<T>, &aArray ) );
+ }
+
+// ======== MEMBER FUNCTIONS ========
+
// -----------------------------------------------------------------------------
// Creates a formatted listbox line.
// -----------------------------------------------------------------------------
@@ -161,6 +188,7 @@
//
void CMCSPluginSettingsModel::UpdateSettingsL()
{
+ iSettings.Reset();
if( !iPluginId )
{
return;
@@ -170,15 +198,13 @@
{
iContainer->CloseChangeDialog();
}
-
- iSettings.Reset();
+
RPointerArray<CItemMap> settingItems;
- CleanupClosePushL( settingItems );
+ CleanupResetAndDestroyPushL( settingItems );
iPluginSettings->GetSettingsL( *iPluginId, settingItems );
- TInt count = settingItems.Count();
- for ( TInt i = 0; i < count; i++ )
+ for ( TInt i = 0; i < settingItems.Count(); i++ )
{
CItemMap* itemMap = settingItems[i];
RPointerArray<HSPluginSettingsIf::CPropertyMap> properties;
@@ -186,8 +212,8 @@
TSettingItem item = ItemL( properties );
iSettings.AppendL( item );
}
- CleanupStack::Pop( &settingItems );
- settingItems.ResetAndDestroy();
+
+ CleanupStack::PopAndDestroy(); // settingItems
if (iContainer)
{
@@ -283,16 +309,51 @@
{
return;
}
-
- RPointerArray<CItemMap> settingItems;
- CleanupClosePushL( settingItems );
+
+ RPointerArray<CItemMap> settingItems;
+ CleanupResetAndDestroyPushL( settingItems );
iPluginSettings->GetSettingsL( *iPluginId, settingItems );
+
if ( aIndex >= 0 && aIndex < settingItems.Count() )
{
TBool exists( EFalse );
CItemMap* itemMap = settingItems[ aIndex ];
RPointerArray<HSPluginSettingsIf::CPropertyMap> properties;
properties = itemMap->Properties();
+
+ const TInt KGranularity = 6;
+ CDesC8Array* propertiesList = new ( ELeave ) CDesC8ArrayFlat( KGranularity );
+ CleanupStack::PushL( propertiesList );
+ propertiesList->AppendL( KProperNameType );
+ propertiesList->AppendL( KProperNameParam );
+ propertiesList->AppendL( KProperNameUid );
+ propertiesList->AppendL( KProperNameView );
+ // skip KProperNameLocked property, attribute may be missing. results into
+ // leave with -1 when saving settings
+
+ // add missing properties
+ for ( TInt i=0; i<propertiesList->Count(); i++ )
+ {
+ TBool found( EFalse );
+ const TPtrC8 namePtr = propertiesList->MdcaPoint( i );
+ for ( TInt j=0; j<properties.Count() && !found; j++ )
+ {
+ found = ( (namePtr == properties[ j ]->Name() ) ? ETrue : EFalse );
+ }
+ if ( !found )
+ {
+ CPropertyMap* property = CPropertyMap::NewLC();
+ property->SetNameL( namePtr );
+ property->SetValueL( KNullDesC8 );
+ itemMap->AddPropertyMapL( property );
+ CleanupStack::Pop( property );
+
+ // get updated list
+ properties = itemMap->Properties();
+ }
+ }
+ CleanupStack::PopAndDestroy( propertiesList );
+
for ( TInt i = 0; i < properties.Count(); i++ )
{
if ( properties[ i ]->Name() == KProperNameType )
@@ -322,7 +383,7 @@
else if ( properties[ i ]->Name() == KProperNameUid )
{
TPtrC uid = aMenuItem.GetAttributeL( KMenuAttrUid, exists );
- if ( exists )
+ if ( exists && uid.Length() > 0 )
{
HBufC8* uid8( NULL );
uid8 = AiUtility::CopyToBufferL( uid8, uid );
@@ -338,7 +399,7 @@
else if ( properties[ i ]->Name() == KProperNameView )
{
TPtrC view = aMenuItem.GetAttributeL( KMenuAttrView, exists );
- if( exists )
+ if( exists && view.Length() > 0 )
{
HBufC8* view8( NULL );
view8 = AiUtility::CopyToBufferL( view8, view );
@@ -364,7 +425,7 @@
isFolder = ETrue;
}
- if ( exists || isFolder )
+ if ( (exists && param.Length() > 0) || (isFolder) )
{
// the folder id is stored
// in param attribute in HSPS
@@ -389,7 +450,7 @@
else if ( properties[ i ]->Name() == KProperNameLocked )
{
TPtrC locked = aMenuItem.GetAttributeL( KMenuAttrLocked, exists );
- if ( exists )
+ if ( exists && locked.Length() > 0 )
{
HBufC8* locked8( NULL );
locked8 = AiUtility::CopyToBufferL( locked8, locked );
@@ -404,11 +465,10 @@
}
}
}
+
// ETrue tells that modified settings are stored also to plugin reference
- iPluginSettings->SetSettingsL( *iPluginId, settingItems, ETrue );
- CleanupStack::Pop( &settingItems );
- settingItems.ResetAndDestroy();
-
+ User::LeaveIfError( iPluginSettings->SetSettingsL( *iPluginId, settingItems, ETrue ) );
+ CleanupStack::PopAndDestroy(); // settingItems
}
// ---------------------------------------------------------------------------
@@ -438,12 +498,14 @@
// ---------------------------------------------------------------------------
//
TPtrC CMCSPluginSettingsModel::MdcaPoint( TInt aIndex ) const
-{
+ {
if (aIndex < 0 || aIndex >= iSettings.Count())
- {
+ {
TPtrC ret(KNullDesC);
return ret;
- }
+ }
+
+ TPtrC line( KNullDesC );
if ( iSettings[aIndex].type == EApplication )
{
// first, we need to check if the item is missing
@@ -452,26 +514,22 @@
if ( iSettings[ aIndex ].id == KErrNotFound )
{
const TDesC& caption = iAppList->UndefinedText();
- TPtrC line;
TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) )
- return line;
}
else
{
const TDesC& caption = iAppList->MdcaPoint( iSettings[ aIndex ].id );
- TPtrC line;
TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) )
- return line;
}
}
else
{
const TDesC& caption = iBkmList->MdcaPoint( iSettings[aIndex].id );
- TPtrC line;
TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) )
- return line;
}
-}
+
+ return line;
+ }
// ---------------------------------------------------------------------------
// Returns a setting ID for the given index.
@@ -511,24 +569,28 @@
TInt aId,
TSettingType aType )
{
+ TBool replaced( EFalse );
if (aSettingIndex >= 0 && aSettingIndex < iSettings.Count())
{
- iSettings[ aSettingIndex ].id = aId;
- iSettings[ aSettingIndex ].type = aType;
-
+ CMenuItem* item( NULL );
if ( aType == EApplication )
{
- CMenuItem* item = iAppList->ItemL( aId );
- SaveSettingsL( aSettingIndex, *item );
+ item = iAppList->ItemL( aId );
}
else
{
- CMenuItem& item = iBkmList->ItemL( aId );
- SaveSettingsL( aSettingIndex, item );
+ item = iBkmList->ItemL( aId );
}
- return ETrue;
+
+ if ( item )
+ {
+ SaveSettingsL( aSettingIndex, *item );
+ iSettings[ aSettingIndex ].id = aId;
+ iSettings[ aSettingIndex ].type = aType;
+ replaced = ETrue;
+ }
}
- return EFalse;
+ return replaced;
}
// ---------------------------------------------------------------------------
@@ -562,24 +624,32 @@
// Updates application list
// ---------------------------------------------------------------------------
//
-void CMCSPluginSettingsModel::UpdateAppListL()
+void CMCSPluginSettingsModel::UpdateAppListL( TBool aUpdateSettings )
{
if( !iAppList )
{
iAppList = CMCSPluginSettingsAppList::NewL();
}
iAppList->StartL();
+ if ( aUpdateSettings )
+ {
+ UpdateSettingsL();
+ }
}
// ---------------------------------------------------------------------------
// Updates bookmark list
// ---------------------------------------------------------------------------
//
-void CMCSPluginSettingsModel::UpdateBkmListL()
-{
+void CMCSPluginSettingsModel::UpdateBkmListL( TBool aUpdateSettings )
+ {
delete iBkmList;
iBkmList = NULL;
iBkmList = CMCSPluginSettingsBkmList::NewL();
-}
+ if ( aUpdateSettings )
+ {
+ UpdateSettingsL();
+ }
+ }
// End of File.
--- a/idlefw/plugins/sapidataplugin/group/sapidataplugin.mmp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/sapidataplugin/group/sapidataplugin.mmp Tue Apr 27 16:57:49 2010 +0300
@@ -54,9 +54,12 @@
LIBRARY charconv.lib
LIBRARY estor.lib
-// End of File
+// Debugging dependencies
+LIBRARY flogger.lib
+
SOURCEPATH ../src
-
SOURCE sapidataplugin.cpp
SOURCE sapidata.cpp
SOURCE sapidataobserver.cpp
+
+// End of File
\ No newline at end of file
--- a/idlefw/plugins/sapidataplugin/inc/sapidata.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/sapidataplugin/inc/sapidata.h Tue Apr 27 16:57:49 2010 +0300
@@ -371,24 +371,20 @@
// data
/** CPS Command Buffer Interface, Not Owned */
MAiCpsCommandBuffer* iCpsExecute;
- /** Subscriber interface, owned */
- MLiwInterface* iInterface;
+ /** Subscriber interface, Not owned */
+ MLiwInterface* iInterface;
+ /** Service handler, Not owned */
+ CLiwServiceHandler* iServiceHandler;
/** Data Observer to CPS content registry, owned */
CSapiDataObserver* iContentObserver;
/** Data Observer to CPS publisher registry, owned */
CSapiDataObserver* iPubObserver;
- /** Service handler, owned */
- CLiwServiceHandler* iServiceHandler;
/** Array of configurations, owned */
RPointerArray<CContentItem> iItemList;
/** Number of configurations */
TInt iItemCount;
- /** Command name in configuration Array, owned */
- HBufC8* iCommandName;
/** publisher id, owned */
HBufC* iPublisher;
- /** content type, owned */
- HBufC* iContentType;
/** content id, owned */
HBufC* iContentId;
/** Startup reason, owned */
@@ -401,6 +397,8 @@
RPointerArray<HBufC8> iMenuTriggers;
/** Store the status of update needed on resume */
TBool iUpdateNeeded;
+ // Is Menu item read.
+ TBool iGetMenuItems;
};
#endif // SAPIDATA_H
--- a/idlefw/plugins/sapidataplugin/src/sapidata.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/sapidataplugin/src/sapidata.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -105,6 +105,7 @@
{
iPlugin = aPlugin;
iUpdateNeeded = EFalse;
+ iGetMenuItems = ETrue;
}
// ---------------------------------------------------------------------------
@@ -114,9 +115,7 @@
//
CSapiData::~CSapiData()
{
- delete iCommandName;
delete iPublisher;
- delete iContentType;
delete iContentId;
delete iStartupReason;
@@ -130,24 +129,15 @@
delete iContentObserver;
iContentObserver = NULL;
}
- if( iInterface )
- {
- // This will also release all the registered observers
- iInterface->Close();
- iInterface = NULL;
- }
- if( iServiceHandler )
- {
- iServiceHandler->Reset();
- delete iServiceHandler;
- iServiceHandler = NULL;
- }
- iCpsExecute = NULL;
iMenuItems.ResetAndDestroy();
iMenuTriggers.ResetAndDestroy();
iItemList.ResetAndDestroy();
// not owned
iPlugin = NULL;
+ iInterface = NULL;
+ iServiceHandler = NULL;
+ iCpsExecute = NULL;
+
}
// ---------------------------------------------------------------------------
@@ -156,30 +146,13 @@
//
void CSapiData::ConfigureL(RAiSettingsItemArray& aConfigurations )
{
- HBufC8* serviceName = NULL;
- HBufC8* interfaceName = NULL;
-
TInt count = aConfigurations.Count();
-
for(TInt i = 0;i<count;i++)
{
MAiPluginConfigurationItem& confItem = ( aConfigurations[i] )->AiPluginConfigurationItem();
- // if owner is plugin then it (key,value) is for plugin configurations items
if(confItem.Owner() == KPlugin())
{
- if(confItem.Name() == KService())
- {
- serviceName = CnvUtfConverter::ConvertFromUnicodeToUtf8L(confItem.Value());
- }
- else if( confItem.Name() == KInterface() )
- {
- interfaceName = CnvUtfConverter::ConvertFromUnicodeToUtf8L(confItem.Value());
- }
- else if( confItem.Name() == KCommand() )
- {
- iCommandName = CnvUtfConverter::ConvertFromUnicodeToUtf8L(confItem.Value());
- }
- else if( confItem.Name() == KPublisher16() )
+ if( confItem.Name() == KPublisher16() )
{
iPublisher = confItem.Value().AllocL();
}
@@ -199,54 +172,12 @@
CleanupStack::PopAndDestroy(objectId);
}
}
-
iItemCount = iItemList.Count();
-
- if( !serviceName || !interfaceName || !iCommandName
- || !iContentId || !iPublisher || !iItemCount )
+ if( iPublisher->Des().Length() == 0 )
{
// No service to offer without plugin configurations
User::Leave( KErrNotSupported );
}
- iServiceHandler = CLiwServiceHandler::NewL();
-
- // for convenience keep pointers to Service Handler param lists
- CLiwGenericParamList* inParamList = &iServiceHandler->InParamListL();
- CLiwGenericParamList* outParamList = &iServiceHandler->OutParamListL();
-
- CLiwCriteriaItem* criteriaItem = CLiwCriteriaItem::NewLC( KLiwCmdAsStr, *interfaceName , *serviceName );
- criteriaItem->SetServiceClass( TUid::Uid( KLiwClassBase ) );
- // Interface name
- RCriteriaArray criteriaArray;
- criteriaArray.AppendL( criteriaItem );
- // attach Liw criteria
- iServiceHandler->AttachL( criteriaArray );
- iServiceHandler->ExecuteServiceCmdL( *criteriaItem, *inParamList, *outParamList );
-
- CleanupStack::PopAndDestroy(criteriaItem);
- criteriaArray.Reset();
-
- // extract CPS interface from output params
- TInt pos( 0 );
- outParamList->FindFirst( pos, *interfaceName );
- if( pos != KErrNotFound )
- {
- //iInterface is MLiwInterface*
- iInterface = (*outParamList)[pos].Value().AsInterface();
- User::LeaveIfNull( iInterface );
- }
- else
- {
- User::Leave( KErrNotFound );
- }
- inParamList->Reset();
- outParamList->Reset();
- delete interfaceName;
- delete serviceName;
-
- //Gets the menu items from the publisher registry
- GetMenuItemsL();
-
iContentObserver = CSapiDataObserver::NewL( iInterface, this );
iPubObserver = CSapiDataObserver::NewL( iInterface, this );
}
@@ -440,6 +371,13 @@
//
TBool CSapiData::HasMenuItem(const TDesC& aMenuItem )
{
+ if ( iGetMenuItems )
+ {
+ //Gets the menu items from the publisher registry
+ TRAP_IGNORE( GetMenuItemsL() );
+ iGetMenuItems = EFalse;
+ }
+
TBool found = EFalse;
for (TInt i = 0; i < iMenuItems.Count(); i++ )
{
@@ -582,7 +520,7 @@
inParamList->AppendL( item );
// execute service.It is assumed that iInterface is already initiated
- iInterface->ExecuteCmdL( *iCommandName, *inParamList, *aOutParamList);
+ iInterface->ExecuteCmdL( KGetList, *inParamList, *aOutParamList);
type.Reset();
item.Reset();
inParamList->Reset();
@@ -765,6 +703,7 @@
TLiwGenericParam item( KFilter, TLiwVariant( filter ));
inParamList->AppendL( item );
+
iInterface->ExecuteCmdL( KExecuteAction, *inParamList, *outParamList);
CleanupStack::PopAndDestroy( filter );
outParamList->Reset();
@@ -934,6 +873,11 @@
void CSapiData::SetCommandBuffer(TAny* aAny)
{
iCpsExecute = reinterpret_cast <MAiCpsCommandBuffer* > ( aAny );
+ if ( iCpsExecute )
+ {
+ iInterface = iCpsExecute->CpsInterface();
+ iServiceHandler = iCpsExecute->ServiceHandler();
+ }
}
// End of file
--- a/idlefw/plugins/sapidataplugin/src/sapidataobserver.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/sapidataplugin/src/sapidataobserver.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -38,6 +38,7 @@
//
CSapiDataObserver ::~CSapiDataObserver ()
{
+ TRAP_IGNORE( ReleaseL() );
iInterface = NULL;
iData = NULL;
}
@@ -68,6 +69,30 @@
}
// ---------------------------------------------------------------------------
+// Sing off to notification
+// ---------------------------------------------------------------------------
+//
+void CSapiDataObserver::ReleaseL()
+ {
+ if( iInterface )
+ {
+ CLiwGenericParamList* inParamList = CLiwGenericParamList::NewL();
+ CleanupStack::PushL( inParamList );
+ CLiwGenericParamList* outParamList = CLiwGenericParamList::NewL();
+ CleanupStack::PushL( outParamList );
+
+ TRAP_IGNORE( iInterface->ExecuteCmdL( KRequestNotification,
+ *inParamList,
+ *outParamList,
+ KLiwOptCancel,
+ this ));
+
+ CleanupStack::PopAndDestroy( outParamList );
+ CleanupStack::PopAndDestroy( inParamList );
+ }
+ }
+
+// ---------------------------------------------------------------------------
// Factory method construction
// ---------------------------------------------------------------------------
//
--- a/idlefw/plugins/wrtdataplugin/group/wrtdataplugin.mmp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/group/wrtdataplugin.mmp Tue Apr 27 16:57:49 2010 +0300
@@ -53,9 +53,13 @@
LIBRARY estor.lib
LIBRARY apgrfx.lib
-// End of File
+// Debugging dependencies
+LIBRARY flogger.lib
+
SOURCEPATH ../src
-
SOURCE wrtdataplugin.cpp
SOURCE wrtdata.cpp
SOURCE wrtdataobserver.cpp
+
+// End of File
+
--- a/idlefw/plugins/wrtdataplugin/inc/wrtdata.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/inc/wrtdata.h Tue Apr 27 16:57:49 2010 +0300
@@ -85,14 +85,6 @@
* @return void
*/
void ConfigureL(RAiSettingsItemArray& aConfigurations);
-
- /**
- * Checks is this menu item is supported by the publisher
- *
- * @param aMenuItem menu item name.
- * @return boolean (ETrue/EFalse)
- */
- TBool HasMenuItem(const TDesC16& aMenuItem );
/**
* Register to CPS for all (add/delete/update/execute) action
@@ -109,7 +101,15 @@
* @return void
*/
void UpdatePublisherStatusL();
-
+
+ /**
+ * Publish initial data for all the items in the widget
+ *
+ * @param aObserver to publish data
+ * @return void
+ */
+ void PublishInitialDataL( MAiContentObserver* aObserver );
+
/**
* Publish updated data for all the items in the widget
*
@@ -193,14 +193,6 @@
CLiwDefaultMap* aOutDataMap, const TDesC16& aRegistry );
/**
- * Gets the menu item from the publisher
- *
- * @param none
- * @return void
- */
- void GetMenuItemsL();
-
- /**
* Gets the widgent name and uid
*
* @param aName - widget name
@@ -241,22 +233,18 @@
TBuf<KHsPublisherNamespaceMaxLength> iPluginId;
/** CPS Command Buffer Interface, Not Owned */
MAiCpsCommandBuffer* iCpsExecute;
- /** Subscriber interface, owned */
- MLiwInterface* iInterface;
+ /** Subscriber interface, Not owned */
+ MLiwInterface* iInterface;
+ /** Service handler, Not owned */
+ CLiwServiceHandler* iServiceHandler;
/** Data Observer to CPS, owned */
CWrtDataObserver* iObserver;
- /** Service handler, owned */
- CLiwServiceHandler* iServiceHandler;
- /** Command name in configuration Array, owned */
- HBufC8* iCommandName;
/** Reference of the wrt data plugin, not owned */
CWrtDataPlugin* iPlugin;
- /** Menu item names, owned */
- RPointerArray<HBufC16> iMenuItems;
- /** Trigger names for the menu items, owned */
- RPointerArray<HBufC8> iMenuTriggers;
/** Content id, owned */
HBufC* iContentId;
+ /** Widget's UID */
+ TUid iAppUid;
};
#endif /*WRTDATA_H*/
--- a/idlefw/plugins/wrtdataplugin/inc/wrtdataobserver.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/inc/wrtdataobserver.h Tue Apr 27 16:57:49 2010 +0300
@@ -107,6 +107,12 @@
* @return void.
*/
void RegisterL( CLiwDefaultMap* aFilter );
+
+ /**
+ * Cancel all the registered notifications.
+ * @return void.
+ */
+ void ReleaseL();
private:
// data
--- a/idlefw/plugins/wrtdataplugin/inc/wrtdataplugin.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/inc/wrtdataplugin.h Tue Apr 27 16:57:49 2010 +0300
@@ -151,12 +151,7 @@
* @see CHsContentPublisher
*/
void HandleEvent( const TDesC& aEventName, const TDesC& aParam );
-
- /**
- * @see CHsContentPublisher
- */
- TBool HasMenuItem( const TDesC& aMenuItem );
-
+
public:
/**
@@ -265,16 +260,21 @@
*/
TPluginNetworkStatus NetworkStatus() const;
+ /**
+ * Creates initial data republishing timer if needed and starts it
+ */
+ void StartTimer();
+
private:
// new functions
/**
- * Publishes widget's texts and images
+ * Publishes widget's initial texts and images
*
* @param void
* @return void
*/
- void PublishL();
+ void PublishInitialDataL();
/**
* Resolves skin item id and Mif id from pattern
@@ -290,7 +290,32 @@
*/
TBool ResolveSkinIdAndMifId( const TDesC& aPath, TAknsItemID& aItemId,
TInt& aMifId, TInt& aMaskId, TDes& aFilename );
-
+
+ /**
+ * Cancels transaction in case of leave
+ *
+ * @param aObserver Transaction target
+ */
+ static void CancelTransaction( TAny* aObserver );
+
+ /**
+ * Cancels initial data republishing timer
+ */
+ void CancelTimer();
+
+ /**
+ * Stops and deletes initial data republishing timer.
+ */
+ void StopTimer();
+
+ /**
+ * Timeout callback from timer. Used if publishing of initial data has failed.
+ *
+ * @param aPtr Contains pointer to instance of this class
+ */
+ static TInt Timeout( TAny* aPtr );
+
+
private:
// data
@@ -314,6 +339,8 @@
TPluginStates iPluginState;
/** File server session handle, owned */
RFs iRfs;
+ /** Timer for initial data republishing, owned */
+ CPeriodic* iTimer;
};
#endif // WRTDATAPLUGIN_H
--- a/idlefw/plugins/wrtdataplugin/inc/wrtdatapluginconst.h Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/inc/wrtdatapluginconst.h Tue Apr 27 16:57:49 2010 +0300
@@ -61,8 +61,6 @@
_LIT8( KContentType, "content_type" );
_LIT8( KContentId, "content_id" );
_LIT8( KResults, "results");
-_LIT8( KMenuItems, "menuitems");
-_LIT( KMenuItem16, "menuitem");
_LIT( KAll, "all");
_LIT8( KOperation, "operation" );
_LIT8( KFLAG, "flag");
--- a/idlefw/plugins/wrtdataplugin/src/wrtdata.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/src/wrtdata.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -51,6 +51,7 @@
// ---------------------------------------------------------------------------
//
CWrtData::CWrtData()
+ : iAppUid( KNullUid )
{
}
@@ -61,7 +62,6 @@
void CWrtData::ConstructL(CWrtDataPlugin* aPlugin)
{
iPlugin = aPlugin;
- iCommandName = HBufC8::NewL( KWRTContentValueMaxLength );
}
// ---------------------------------------------------------------------------
@@ -71,36 +71,19 @@
//
CWrtData::~CWrtData()
{
- if( iCommandName )
- {
- delete iCommandName;
- iCommandName = NULL;
- }
if(iObserver)
- {
+ {
delete iObserver;
iObserver = NULL;
}
- if( iInterface )
- {
- // This will also release all the registered observers
- iInterface->Close();
- iInterface = NULL;
- }
- if( iServiceHandler )
- {
- iServiceHandler->Reset();
- delete iServiceHandler;
- iServiceHandler = NULL;
- }
if ( iContentId )
{
delete iContentId;
iContentId = NULL;
}
- iMenuItems.ResetAndDestroy();
- iMenuTriggers.ResetAndDestroy();
// not owned
+ iInterface = NULL;
+ iServiceHandler = NULL;
iCpsExecute = NULL;
iPlugin = NULL;
}
@@ -111,111 +94,25 @@
//
void CWrtData::ConfigureL(RAiSettingsItemArray& aConfigurations )
{
- HBufC8* serviceName = HBufC8::NewLC( KWRTContentValueMaxLength );
- HBufC8* interfaceName = HBufC8::NewLC( KWRTContentValueMaxLength );
-
- // Interface name
- RCriteriaArray criteriaArray;
-
TInt count = aConfigurations.Count();
-
- for(TInt i = 0;i<count;i++)
+ for(TInt i = 0; i<count; i++ )
{
MAiPluginConfigurationItem& confItem = ( aConfigurations[i] )->AiPluginConfigurationItem();
// if owner is plugin then it (key,value) is for plugin configurations items
- if(confItem.Owner() == KPlugin())
+ if(confItem.Owner() == KPlugin() && confItem.Name() == KPubData())
{
- if(confItem.Name() == KService())
- {
- serviceName->Des().Copy(confItem.Value());
- }
- else if( confItem.Name() == KInterface() )
- {
- interfaceName->Des().Copy(confItem.Value());
- }
- else if( confItem.Name() == KCommand() )
- {
- iCommandName->Des().Copy(confItem.Value());
- }
- else if( confItem.Name() == KMenuItem16() )
- {
- iMenuItems.AppendL( confItem.Value().AllocL() );
- }
- else if( confItem.Name() == KPubData() )
- {
- iContentId = confItem.Value().AllocL();
- }
- }
+ iContentId = confItem.Value().AllocL();
+ }
}
-
- if( !( serviceName->Des().Length() >= 0 && interfaceName->Des().Length() >= 0
- && iCommandName->Des().Length() >= 0 ) )
+ if( iContentId->Des().Length() == 0 )
{
// No service to offer without plugin configurations
User::Leave( KErrNotSupported );
}
-
- iServiceHandler = CLiwServiceHandler::NewL();
-
- // for convenience keep pointers to Service Handler param lists
- CLiwGenericParamList* inParamList = &iServiceHandler->InParamListL();
- CLiwGenericParamList* outParamList = &iServiceHandler->OutParamListL();
-
- CLiwCriteriaItem* criteriaItem = CLiwCriteriaItem::NewLC( KLiwCmdAsStr, *interfaceName , *serviceName );
- criteriaItem->SetServiceClass( TUid::Uid( KLiwClassBase ) );
- criteriaArray.AppendL( criteriaItem );
-
-
- // attach Liw criteria
- iServiceHandler->AttachL( criteriaArray );
- iServiceHandler->ExecuteServiceCmdL( *criteriaItem, *inParamList, *outParamList );
-
- CleanupStack::PopAndDestroy(criteriaItem);
- criteriaArray.Reset();
-
- // extract CPS interface from output params
- TInt pos( 0 );
- outParamList->FindFirst( pos, *interfaceName );
- if( pos != KErrNotFound )
- {
- //iInterface is MLiwInterface*
- iInterface = (*outParamList)[pos].Value().AsInterface();
- User::LeaveIfNull( iInterface );
- }
- else
- {
- User::Leave( KErrNotFound );
- }
- inParamList->Reset();
- outParamList->Reset();
- CleanupStack::PopAndDestroy( interfaceName );
- CleanupStack::PopAndDestroy( serviceName );
-
- //Gets the menu items from the publisher registry
- GetMenuItemsL();
-
iObserver = CWrtDataObserver::NewL( iInterface, this );
}
// ---------------------------------------------------------------------------
-// CWrtData::HasMenuItem
-// ---------------------------------------------------------------------------
-//
-TBool CWrtData::HasMenuItem(const TDesC16& aMenuItem )
- {
- TBool found = EFalse;
- for (TInt i = 0; i < iMenuItems.Count(); i++ )
- {
- if( aMenuItem == iMenuItems[i] )
- {
- found = ETrue;
- break;
- }
- }
- return found;
- }
-
-// ---------------------------------------------------------------------------
// CWrtData::RegisterL
// ---------------------------------------------------------------------------
//
@@ -259,69 +156,54 @@
}
// ---------------------------------------------------------------------------
+// CWrtData::PublishInitialDataL
+// ---------------------------------------------------------------------------
+//
+void CWrtData::PublishInitialDataL( MAiContentObserver* aObserver )
+ {
+ // Show loading animation
+ iPlugin->ShowLoadingIcon( aObserver );
+
+ TBuf<KWRTContentValueMaxLength> appName;
+ TBuf<KWRTAppUidLenth> appUidStr;
+ GetWidgetNameAndUidL( appName, appUidStr );
+
+ // Publish widget's name
+ if ( appName.Length() > 0 )
+ {
+ iPlugin->PublishTextL( aObserver, CWrtDataPlugin::EDefaultText, appName );
+ }
+
+ // Publish widget's apparc image. This might fail if there is application
+ // list population ongoing in AppFW and then we have to try again later
+ if ( ResolveUid ( appUidStr, iAppUid ) )
+ {
+ TRAPD( err, PublishDefaultImageL( aObserver ) );
+ if ( KErrNone != err )
+ {
+ iPlugin->StartTimer();
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
// CWrtData::PublishDefaultImageL
// ---------------------------------------------------------------------------
//
void CWrtData::PublishDefaultImageL( MAiContentObserver* aObserver )
{
- TBuf<KWRTAppUidLenth> appUidStr;
- TBuf<KWRTContentValueMaxLength> appName;
- GetWidgetNameAndUidL( appName, appUidStr );
-
- TUid appUid;
- if ( ResolveUid (appUidStr, appUid ) )
- {
-#ifdef WRT_PREDEFINED_IMAGE
- RFs rfs;
- User::LeaveIfError( rfs.Connect() );
+ // Publish widget's apparc image
+ TInt handle = KErrNotFound;
+ TInt mask = KErrNotFound;
+ // create icon from application UID
+ CreateIconFromUidL( handle, mask, iAppUid );
+ // Publish apparc image
+ iPlugin->PublishImageL( aObserver,
+ CWrtDataPlugin::EDefaultImage,
+ handle,
+ mask );
+ }
- TFileName privatePath;
- rfs.PrivatePath(privatePath);
- privatePath.Insert(0,KDrive);
- privatePath.Append( KImgFolder );
-
- appUidStr.Copy( appUid.Name());
- appUidStr.Delete(0,1);
- appUidStr.Delete( appUidStr.Length() -1, 1);
- privatePath.Append (appUidStr );
- privatePath.Append ( KJPEG );
- if ( BaflUtils::FileExists(rfs,privatePath) )
- {
- // Publish predefined jpeg image
- iPlugin->PublishImageL( aObserver, CWrtDataPlugin::EImage1,privatePath);
- }
- else
- {
- privatePath.Delete( privatePath.Length() - 4 , 4);
- privatePath.Append( KPNG );
- if ( BaflUtils::FileExists(rfs,privatePath) )
- {
- // Publish predefined image
- iPlugin->PublishImageL( aObserver, CWrtDataPlugin::EImage1,privatePath);
- }
- else
- {
-#endif
- TInt handle = KErrNotFound;
- TInt mask = KErrNotFound;
- CreateIconFromUidL( handle, mask, appUid );
- // Publish widget apparc image
- iPlugin->PublishImageL( aObserver, CWrtDataPlugin::EDefaultImage,handle,mask);
- if ( appName.Length() > 0)
- {
- // Publish Widget Name
- iPlugin->PublishTextL( aObserver, CWrtDataPlugin::EDefaultText, appName);
- }
-#ifdef WRT_PREDEFINED_IMAGE
- }
- }
- rfs.Close();
-#endif
- }
-
- // Show loading animation
- iPlugin->ShowLoadingIcon(aObserver);
- }
// ---------------------------------------------------------------------------
// CWrtData::PublishL
@@ -388,7 +270,9 @@
CLiwGenericParamList* inParamList = &iServiceHandler->InParamListL();
CLiwGenericParamList* outParamList = &iServiceHandler->OutParamListL();
- CLiwDefaultMap* filter = NULL;
+
+ // use the first item configuration to create the filter
+ CLiwDefaultMap* filter = CreateFilterLC();
triggerName->Des().Copy(aTrigger);
if ( aObjectId == KPubData )
@@ -399,37 +283,10 @@
TLiwGenericParam cptype( KType, TLiwVariant( KPubData ) );
inParamList->AppendL( cptype );
cptype.Reset();
- // use the first item configuration to create the filter
- filter = CreateFilterLC();
}
else
{
- if ( aObjectId == KMenuItem16 )
- {
- TInt pos = KErrNotFound;
- for (TInt i = 0; i < iMenuItems.Count(); i++)
- {
- if ( aTrigger == iMenuItems[i] )
- {
- pos = i;
- break;
- }
- }
- if( pos == KErrNotFound )
- {
- // No such menu items
- CleanupStack::PopAndDestroy( triggerName );
- return;
- }
- triggerName->Des().Copy( iMenuTriggers[pos]->Des() );
- filter = CreateFilterLC();
- }
- else
- {
- //Create filter criteria for requested entries in form of LIW map:
- filter = CreateFilterLC();
- }
- //append type to inparam list
+ //append type to inparam list
TLiwGenericParam cptype( KType, TLiwVariant( KCpData ) );
inParamList->AppendL( cptype );
cptype.Reset();
@@ -441,13 +298,11 @@
inParamList->AppendL( item );
iInterface->ExecuteCmdL( KExecuteAction, *inParamList, *outParamList );
+ item.Reset();
CleanupStack::PopAndDestroy( filter );
CleanupStack::PopAndDestroy( triggerName );
- item.Reset();
-
+ outParamList->Reset();
inParamList->Reset();
- outParamList->Reset();
-
}
// ---------------------------------------------------------------------------
@@ -491,7 +346,7 @@
// execute service.It is assumed that iInterface is already initiatedd
if(iInterface)
{
- iInterface->ExecuteCmdL( *iCommandName, *inParamList, *outParamList);
+ iInterface->ExecuteCmdL( KGetList, *inParamList, *outParamList);
}
else
{
@@ -548,56 +403,6 @@
}
// ---------------------------------------------------------------------------
-// CWrtData::GetMenuItemsL
-// ---------------------------------------------------------------------------
-//
-void CWrtData::GetMenuItemsL()
- {
- if(iInterface)
- {
- CLiwDefaultMap *outDataMap = CLiwDefaultMap::NewLC();
- CLiwDefaultMap* filter = CreateFilterLC( );
- //append filter to input param
- ExecuteCommandL( filter, outDataMap, KPubData );
- CleanupStack::PopAndDestroy( filter );
-
- TLiwVariant variant;
- TInt pos = outDataMap->FindL( KMenuItems, variant ) ;
-
- if ( pos )
- {
- CLiwDefaultMap *menuMap = CLiwDefaultMap::NewLC();
- variant.Get( *menuMap );
- for ( TInt i = 0; i < menuMap->Count(); i++)
- {
- menuMap->FindL(menuMap->AtL(i), variant );
- HBufC8* value = HBufC8::NewL( KWRTContentValueMaxLength );
- CleanupStack::PushL( value );
- TPtr8 valPtr = value->Des();
- variant.Get( valPtr);
- if ( valPtr.Length() > 0 )
- {
- iMenuTriggers.AppendL( value );
- CleanupStack::Pop( value );
- HBufC16* triggerName = HBufC16::NewLC( KWRTContentNameMaxLength );
- triggerName->Des().Copy( menuMap->AtL(i) );
- iMenuItems.AppendL( triggerName );
- CleanupStack::Pop( triggerName );
- }
- else
- {
- CleanupStack::PopAndDestroy( value );
- }
- variant.Reset();
- }
- CleanupStack::PopAndDestroy( menuMap );
- }
- variant.Reset();
- CleanupStack::PopAndDestroy( outDataMap );
- }
- }
-
-// ---------------------------------------------------------------------------
// CWrtData::GetWidgetNameAndUidL
// ---------------------------------------------------------------------------
//
@@ -670,14 +475,14 @@
}
}
}
- return (error == KErrNone );
+ return ( error == KErrNone );
}
// ---------------------------------------------------------------------------
// CWrtData::CreateIconFromUidL
// ---------------------------------------------------------------------------
//
-void CWrtData::CreateIconFromUidL(TInt& aHandle, TInt& aMaskHandle, const TUid& aAppUid )
+void CWrtData::CreateIconFromUidL( TInt& aHandle, TInt& aMaskHandle, const TUid& aAppUid )
{
RApaLsSession lsSession;
User::LeaveIfError( lsSession.Connect() );
@@ -685,32 +490,30 @@
CArrayFixFlat<TSize>* sizeArray = new(ELeave) CArrayFixFlat<TSize>( 5 );
CleanupStack::PushL( sizeArray );
- if ( KErrNone == lsSession.GetAppIconSizes(aAppUid, *sizeArray) )
+
+ User::LeaveIfError( lsSession.GetAppIconSizes( aAppUid, *sizeArray ) );
+
+ if ( sizeArray->Count() )
{
- if ( sizeArray->Count() )
+ // There are other icon sizes
+ TInt idx = 0;
+ TInt size( sizeArray->At(idx).iWidth * sizeArray->At(idx).iHeight );
+ for ( TInt i = 1; i < sizeArray->Count(); i++ )
{
- // There are other icon sizes
- TInt idx = 0;
- TInt size( sizeArray->At(idx).iWidth * sizeArray->At(idx).iHeight );
- for ( TInt i = 1; i < sizeArray->Count(); i++ )
+ if ( ( sizeArray->At(i).iWidth * sizeArray->At(i).iHeight ) > size )
{
- if ( ( sizeArray->At(i).iWidth * sizeArray->At(i).iHeight ) > size )
- {
- idx = i;
- size = sizeArray->At(idx).iWidth * sizeArray->At(idx).iHeight;
- }
+ idx = i;
+ size = sizeArray->At(idx).iWidth * sizeArray->At(idx).iHeight;
}
+ }
- CApaMaskedBitmap* appBitMap = CApaMaskedBitmap::NewLC();
- if ( KErrNone == lsSession.GetAppIcon( aAppUid, sizeArray->At(idx),
- *appBitMap ) )
- {
- aHandle = appBitMap->Handle();
- aMaskHandle = appBitMap->Mask()->Handle();
- }
- CleanupStack::PopAndDestroy( appBitMap );
- }
+ CApaMaskedBitmap* appBitMap = CApaMaskedBitmap::NewLC();
+ User::LeaveIfError( lsSession.GetAppIcon( aAppUid, sizeArray->At(idx), *appBitMap ) );
+ aHandle = appBitMap->Handle();
+ aMaskHandle = appBitMap->Mask()->Handle();
+ CleanupStack::PopAndDestroy( appBitMap );
}
+
CleanupStack::PopAndDestroy( sizeArray );
CleanupStack::PopAndDestroy( &lsSession );
}
@@ -754,6 +557,11 @@
{
iPluginId.Copy(aNameSpace);
iCpsExecute = reinterpret_cast <MAiCpsCommandBuffer* > ( aAny );
+ if ( iCpsExecute )
+ {
+ iInterface = iCpsExecute->CpsInterface();
+ iServiceHandler = iCpsExecute->ServiceHandler();
+ }
}
// End of file
--- a/idlefw/plugins/wrtdataplugin/src/wrtdataobserver.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/src/wrtdataobserver.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -55,8 +55,7 @@
// ---------------------------------------------------------------------------
//
CWrtDataObserver::CWrtDataObserver ()
- {
-
+ {
}
// ---------------------------------------------------------------------------
@@ -65,6 +64,8 @@
//
CWrtDataObserver ::~CWrtDataObserver ()
{
+ TRAP_IGNORE( ReleaseL() );
+
iInterface = NULL;
iData = NULL;
}
@@ -185,5 +186,31 @@
CleanupStack::PopAndDestroy( inParamList );
}
+// ---------------------------------------------------------------------------
+// CWrtDataObserver ::ReleaseL
+// Sing off to notification
+// ---------------------------------------------------------------------------
+//
+void CWrtDataObserver::ReleaseL()
+ {
+ if( iInterface )
+ {
+ CLiwGenericParamList* inParamList = CLiwGenericParamList::NewL();
+ CleanupStack::PushL( inParamList );
+ CLiwGenericParamList* outParamList = CLiwGenericParamList::NewL();
+ CleanupStack::PushL( outParamList );
+
+ TInt err(KErrNone);
+ TRAP(err, iInterface->ExecuteCmdL(
+ KRequestNotification,
+ *inParamList,
+ *outParamList,
+ KLiwOptCancel,
+ this ));
+
+ CleanupStack::PopAndDestroy( outParamList );
+ CleanupStack::PopAndDestroy( inParamList );
+ }
+ }
+
// End of file
-
--- a/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -47,6 +47,8 @@
IMPLEMENTATION_PROXY_ENTRY( KImplUidDataPlugin, CWrtDataPlugin::NewL )
};
+const TInt KTryAgainDelay( 3000000 ); // 3 sec
+
// ======== MEMBER FUNCTIONS ========
// ---------------------------------------------------------------------------
// ImplementationGroupProxy
@@ -105,6 +107,12 @@
//
CWrtDataPlugin::~CWrtDataPlugin()
{
+ if ( iTimer )
+ {
+ iTimer->Cancel();
+ delete iTimer;
+ }
+
delete iData;
iObservers.Close();
Release( iContent );
@@ -133,8 +141,8 @@
if( aReason == ESystemStartup ||
aReason == EPluginStartup )
{
- // publish the initial data
- TRAP_IGNORE( PublishL());
+ // Publish the initial data
+ TRAP_IGNORE( PublishInitialDataL() );
}
}
@@ -230,8 +238,6 @@
RAiSettingsItemArray contentItemsArr;
RAiSettingsItemArray configurationItemsArr;
- RAiSettingsItemArray settingItemsArr;
-
TInt count( aSettings.Count() );
for ( TInt i = 0; i < count; i++ )
@@ -246,10 +252,6 @@
{
configurationItemsArr.Append( setting );
}
- else
- {
- settingItemsArr.Append( setting );
- }
}
iDataCount = contentItemsArr.Count();
@@ -311,11 +313,9 @@
iData->NotifyPublisherL( KActive );
}
- settingItemsArr.Reset();
contentItemsArr.Reset();
configurationItemsArr.Reset();
-
- // We own the array so destroy it
+ // We own the array so destroy it
aSettings.ResetAndDestroy();
}
@@ -359,16 +359,6 @@
}
// ----------------------------------------------------------------------------
-// CWrtDataPlugin::HasMenuItem
-//
-// ----------------------------------------------------------------------------
-//
-TBool CWrtDataPlugin::HasMenuItem( const TDesC& aMenuItem )
- {
- return iData->HasMenuItem ( aMenuItem );
- }
-
-// ----------------------------------------------------------------------------
// CWrtDataPlugin::IsActive
//
// ----------------------------------------------------------------------------
@@ -679,13 +669,16 @@
void CWrtDataPlugin::HideLoadingIcon(MAiContentObserver* aObserver)
{
aObserver->SetProperty( *this, KElement , KDisplay , KHide );
+
+ // Do not try to publish initial data anymore
+ StopTimer();
}
// ---------------------------------------------------------------------------
// Publishes widget's texts and images
// ---------------------------------------------------------------------------
//
-void CWrtDataPlugin::PublishL()
+void CWrtDataPlugin::PublishInitialDataL()
{
TInt observers( iObservers.Count() );
TInt transactionId = reinterpret_cast<TInt>( this );
@@ -693,13 +686,17 @@
for ( int i = 0; i < observers; i++ )
{
MAiContentObserver* observer = iObservers[i];
-
+
+ CleanupStack::PushL( TCleanupItem( CancelTransaction, observer ) );
+
if ( observer->StartTransaction( transactionId ) == KErrNone )
{// Publish default data
- iData->PublishDefaultImageL(observer);
+ iData->PublishInitialDataL(observer);
observer->Commit( transactionId );
}
+ CleanupStack::Pop( observer );
+
// Release memory of the published text
iDataArray.ResetAndDestroy();
// Release memory of the published icons
@@ -787,4 +784,119 @@
return (error == KErrNone );
}
+// ---------------------------------------------------------------------------
+// Cleanup callback for cancelling a transactions in case of leave
+// ---------------------------------------------------------------------------
+//
+void CWrtDataPlugin::CancelTransaction( TAny* aObserver )
+ {
+ if ( aObserver )
+ {
+ MAiContentObserver* obs = reinterpret_cast< MAiContentObserver*>( aObserver );
+ TInt transactionId = reinterpret_cast<TInt>( aObserver );
+ obs->CancelTransaction( transactionId );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Create and start republish timer
+// ---------------------------------------------------------------------------
+//
+void CWrtDataPlugin::StartTimer()
+ {
+ TRAP_IGNORE(
+ if ( !iTimer )
+ {
+ iTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+ }
+
+ if ( !iTimer->IsActive() )
+ {
+ TTimeIntervalMicroSeconds32 delay( KTryAgainDelay );
+ iTimer->Start( delay, delay, TCallBack( Timeout, this ) );
+ }
+ );
+ }
+
+// ---------------------------------------------------------------------------
+// Cancel republish timer
+// ---------------------------------------------------------------------------
+//
+void CWrtDataPlugin::CancelTimer()
+ {
+ if ( iTimer )
+ {
+ iTimer->Cancel();
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Stop and delete republish timer
+// ---------------------------------------------------------------------------
+//
+void CWrtDataPlugin::StopTimer()
+ {
+ if ( iTimer )
+ {
+ iTimer->Cancel();
+ delete iTimer;
+ iTimer = NULL;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Initial data republish callback
+// ---------------------------------------------------------------------------
+//
+TInt CWrtDataPlugin::Timeout( TAny* aPtr )
+ {
+ CWrtDataPlugin* self = static_cast<CWrtDataPlugin*>( aPtr );
+
+ // Cancel timer before publishing
+ self->CancelTimer();
+
+ TInt observers( self->iObservers.Count() );
+ TInt transactionId = reinterpret_cast<TInt>( self );
+ TBool success( ETrue );
+
+ // Publish for each observer
+ for ( int i = 0; i < observers; i++ )
+ {
+ MAiContentObserver* observer = self->iObservers[i];
+
+ if ( observer->StartTransaction( transactionId ) == KErrNone )
+ {
+ // Publish default image
+ TRAPD( err, self->iData->PublishDefaultImageL( observer ) );
+ if ( KErrNone != err )
+ {
+ observer->CancelTransaction( transactionId );
+ success = EFalse;
+ }
+ else
+ {
+ //
+ observer->Commit( transactionId );
+ }
+ }
+ }
+
+ // Start timer again if there is error in publishing
+ if ( !success )
+ {
+ self->StartTimer();
+ }
+ else
+ {
+ self->StopTimer();
+ }
+
+ // Release memory of the published icons
+ self->iIconArray.Reset();
+
+ return KErrNone;
+ }
+
+
+
// End of file
--- a/idlefw/src/framework/aicpscommandbuffer.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/src/framework/aicpscommandbuffer.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -17,15 +17,14 @@
// System includes
-
-// User includes
-#include <debug.h>
#include <liwservicehandler.h>
#include <liwvariant.h>
#include <liwgenericparam.h>
+// User includes
#include "caicpscommandbuffer.h"
#include "aicpsexecuteparam.h"
+#include <debug.h>
// Constants
_LIT8( KCPSConfigurationIf, "IContentPublishing" );
@@ -33,6 +32,7 @@
_LIT8( KExecuteAction, "ExecuteAction" );
_LIT8( KExecuteMultipleActions, "ExecuteMultipleActions" );
_LIT8( KFilters, "filters" );
+
// ======== LOCAL FUNCTIONS ========
// ======== MEMBER FUNCTIONS ========
@@ -88,26 +88,38 @@
{
// Flush any pending commands
Flush();
+
if ( iCpsInterface )
{
// Close interface
iCpsInterface->Close();
}
- if ( iServiceHandler && iCpsService )
- {
- // Detach services from the handler
- RCriteriaArray interestList;
-
- TRAP_IGNORE( interestList.AppendL( iCpsService );
- iServiceHandler->DetachL( interestList ); );
-
- interestList.Reset();
- }
+ TRAP_IGNORE( DetachL() );
delete iCpsService;
- delete iServiceHandler;
-
+ delete iServiceHandler;
+ }
+
+// ---------------------------------------------------------------------------
+// CAiCpsCommandBuffer::DetachL
+//
+// ---------------------------------------------------------------------------
+//
+void CAiCpsCommandBuffer::DetachL()
+ {
+ if ( iServiceHandler && iCpsService )
+ {
+ // Detach services from the handler
+ RCriteriaArray list;
+ CleanupClosePushL( list );
+
+ list.AppendL( iCpsService );
+
+ iServiceHandler->DetachL( list );
+
+ CleanupStack::PopAndDestroy( &list );
+ }
}
// ---------------------------------------------------------------------------
@@ -117,23 +129,31 @@
//
void CAiCpsCommandBuffer::GetCPSInterfaceL()
{
- iServiceHandler = CLiwServiceHandler::NewL();
+ if ( iCpsInterface )
+ {
+ return;
+ }
RCriteriaArray interestList;
+ CleanupClosePushL( interestList );
- // Attach to CPS:
- iCpsService = CLiwCriteriaItem::NewL( 1, KCPSConfigurationIf, KCPS );
- iCpsService->SetServiceClass( TUid::Uid( KLiwClassBase ) );
+ CLiwServiceHandler* serviceHandler = CLiwServiceHandler::NewL();
+ CleanupStack::PushL( serviceHandler );
+
+ // Attach to CPS:
+ CLiwCriteriaItem* cpsService = CLiwCriteriaItem::NewL( 1, KCPSConfigurationIf, KCPS );
+ CleanupStack::PushL( cpsService );
- interestList.AppendL( iCpsService );
- iServiceHandler->AttachL( interestList );
- interestList.Reset();
+ cpsService->SetServiceClass( TUid::Uid( KLiwClassBase ) );
- CLiwGenericParamList& inParamList( iServiceHandler->InParamListL() );
- CLiwGenericParamList& outParamList( iServiceHandler->OutParamListL() );
+ interestList.AppendL( cpsService );
+ serviceHandler->AttachL( interestList );
+
+ CLiwGenericParamList& inParamList( serviceHandler->InParamListL() );
+ CLiwGenericParamList& outParamList( serviceHandler->OutParamListL() );
- iServiceHandler->ExecuteServiceCmdL(
- *iCpsService,
+ serviceHandler->ExecuteServiceCmdL(
+ *cpsService,
inParamList,
outParamList );
@@ -142,17 +162,25 @@
outParamList.FindFirst( pos, KCPSConfigurationIf );
if ( pos != KErrNotFound )
- {
- iCpsInterface = (outParamList)[pos].Value().AsInterface();
- inParamList.Reset();
- outParamList.Reset();
- }
+ {
+ iCpsInterface = (outParamList)[pos].Value().AsInterface();
+ inParamList.Reset();
+ outParamList.Reset();
+ }
else
- {
- inParamList.Reset();
- outParamList.Reset();
- User::Leave( KErrNotFound );
- }
+ {
+ inParamList.Reset();
+ outParamList.Reset();
+ User::Leave( KErrNotFound );
+ }
+
+ CleanupStack::Pop( cpsService );
+ iCpsService = cpsService;
+
+ CleanupStack::Pop( serviceHandler );
+ iServiceHandler = serviceHandler;
+
+ CleanupStack::PopAndDestroy( &interestList );
}
// ---------------------------------------------------------------------------
@@ -172,16 +200,37 @@
}
// ---------------------------------------------------------------------------
+// CAiCpsCommandBuffer::ServiceHandler
+//
+// ---------------------------------------------------------------------------
+//
+CLiwServiceHandler* CAiCpsCommandBuffer::ServiceHandler() const
+ {
+ return iServiceHandler;
+ }
+
+// ---------------------------------------------------------------------------
+// CAiCpsCommandBuffer::CpsInterface
+//
+// ---------------------------------------------------------------------------
+//
+MLiwInterface* CAiCpsCommandBuffer::CpsInterface() const
+ {
+ return iCpsInterface;
+ }
+
+// ---------------------------------------------------------------------------
// CAiCpsCommandBuffer::DoAddCommandL
//
// ---------------------------------------------------------------------------
//
void CAiCpsCommandBuffer::DoAddCommandL( const TDesC& aPluginId,
- const TDesC& aType, CLiwDefaultMap* aFilter,
- const TDesC8& aAction )
+ const TDesC& aType, CLiwDefaultMap* aFilter,
+ const TDesC8& aAction )
{
- TInt found = KErrNotFound;
- for (TInt i=0; i< iPlugins.Count(); i++)
+ TInt found( KErrNotFound );
+
+ for ( TInt i = 0; i < iPlugins.Count(); i++ )
{
if ( aPluginId == iPlugins[i]->PluginId() )
{
@@ -203,8 +252,7 @@
param->AddActionL( aAction );
iPlugins.AppendL( param );
CleanupStack::Pop( param );
- }
-
+ }
}
// ---------------------------------------------------------------------------
@@ -215,10 +263,12 @@
void CAiCpsCommandBuffer::Flush()
{
__PRINTS( "CAiCpsCommandBuffer::Flush, start" );
+
if ( iPlugins.Count() > 0 )
{
TRAP_IGNORE( DoFlushL() );
}
+
__PRINTS( "CAiCpsCommandBuffer::Flush - done" );
}
@@ -229,40 +279,38 @@
//
void CAiCpsCommandBuffer::DoFlushL()
{
- if ( !iCpsInterface )
+ if ( !iCpsInterface )
{
GetCPSInterfaceL();
}
- if(iCpsInterface)
+ if ( iCpsInterface )
{
- __PRINTS( "CAiCpsCommandBuffer::DoFlush : Execute" );
- TInt pluginCount = iPlugins.Count();
+ __PRINTS( "CAiCpsCommandBuffer::DoFlush : Execute" );
+
+ TInt pluginCount( iPlugins.Count() );
+
CLiwDefaultList* pluginCmdList = CLiwDefaultList::NewLC();
- for (TInt i=0; i < pluginCount; i++ )
+ for ( TInt i = 0; i < pluginCount; i++ )
{
CLiwDefaultMap* inParamMap = iPlugins[i]->InParamMapLC();
pluginCmdList->AppendL( inParamMap );
CleanupStack::PopAndDestroy( inParamMap );
}
+
CLiwGenericParamList* inParamList = CLiwGenericParamList::NewLC();
CLiwGenericParamList* outParamList = CLiwGenericParamList::NewLC();
- TLiwGenericParam item( KFilters, TLiwVariant ( pluginCmdList));
- inParamList->AppendL( item );
+ TLiwGenericParam item( KFilters, TLiwVariant ( pluginCmdList ) );
+ inParamList->AppendL( item );
iCpsInterface->ExecuteCmdL( KExecuteMultipleActions, *inParamList, *outParamList);
- CleanupStack::PopAndDestroy( outParamList );
- CleanupStack::PopAndDestroy( inParamList );
- CleanupStack::PopAndDestroy( pluginCmdList );
- }
- else
- {
- User::Leave( KErrNotSupported );
- }
- iPlugins.ResetAndDestroy();
+ CleanupStack::PopAndDestroy( 3, pluginCmdList ); // outparamList, inParamList
+
+ iPlugins.ResetAndDestroy();
+ }
}
// End of file
--- a/idlefw/src/framework/aicpsexecuteparam.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/src/framework/aicpsexecuteparam.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -147,18 +147,27 @@
iContentId = NULL;
TLiwVariant variant;
+ variant.PushL();
+
if ( aMap->FindL(KPublisherId, variant ))
{
iPublisher = variant.AsDes().AllocL();
}
+
+ variant.Reset();
if ( aMap->FindL(KContentType, variant ))
{
iContentType= variant.AsDes().AllocL();
}
+
+ variant.Reset();
if ( aMap->FindL(KContentId, variant ))
{
iContentId= variant.AsDes().AllocL();
}
+
+ variant.Reset();
+ CleanupStack::PopAndDestroy( &variant );
}
// ---------------------------------------------------------------------------
--- a/idlefw/src/framework/aipluginfactory.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/idlefw/src/framework/aipluginfactory.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -25,7 +25,7 @@
#include <hspublisherinfo.h>
#include <aicontentobserver.h>
#include <aiuicontroller.h>
-
+#include "caicpscommandbuffer.h"
#include "aiuicontrollermanager.h"
#include "aipluginfactory.h"
#include "debug.h"
@@ -290,7 +290,11 @@
CleanupStack::PushL( plugin );
- plugin->SetProperty( CHsContentPublisher::ECpsCmdBuffer, iCommandBuffer );
+ // Ensure interface is available
+ iCommandBuffer->GetCPSInterfaceL();
+
+ plugin->SetProperty( CHsContentPublisher::ECpsCmdBuffer,
+ static_cast< MAiCpsCommandBuffer* >( iCommandBuffer ) );
__TIME( "FW: Subscribe content observers",
SubscribeContentObserversL( *plugin, aPublisherInfo ) );
@@ -432,7 +436,7 @@
//
// ----------------------------------------------------------------------------
//
-void CAiPluginFactory::SetCommandBuffer( MAiCpsCommandBuffer* aCommandBuffer )
+void CAiPluginFactory::SetCommandBuffer( CAiCpsCommandBuffer* aCommandBuffer )
{
iCommandBuffer = aCommandBuffer;
}
--- a/menucontentsrv/extinc/mcssathandler.h Wed Apr 14 16:16:44 2010 +0300
+++ b/menucontentsrv/extinc/mcssathandler.h Tue Apr 27 16:57:49 2010 +0300
@@ -21,7 +21,7 @@
#include <AknIconUtils.h>
-#include <RSatSession.h>
+#include <rsatsession.h>
#include <tsaticoninfo.h>
#ifdef SIM_ATK_SERVICE_API_V1
#include <rsatservice.h>// MCL
--- a/menucontentsrv/extsrc/mcsmenuiconutility.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/menucontentsrv/extsrc/mcsmenuiconutility.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: The API supports requesting raw bitmaps
-* Version : %version: 11 % << Don't touch! Updated by Synergy at check-out.
+* Version : %version: ou1s60ui#12 % << Don't touch! Updated by Synergy at check-out.
*
*/
@@ -24,7 +24,7 @@
#include <mcsmenu.h>
#include <mcsmenuitem.h>
#include <mcsmenuutils.h>
-#include <SATDomainPSKeys.h>
+#include <satdomainpskeys.h>
#include <e32property.h>
#include <apgcli.h>
#include <AknInternalIconUtils.h>
--- a/menucontentsrv/srvsrc/menusrvengutils.cpp Wed Apr 14 16:16:44 2010 +0300
+++ b/menucontentsrv/srvsrc/menusrvengutils.cpp Tue Apr 27 16:57:49 2010 +0300
@@ -21,7 +21,7 @@
#include <javaregistryentry.h>
#include <drmrightsinfo.h>
#include <e32property.h>
-#include <SATDomainPSKeys.h>
+#include <satdomainpskeys.h>
#include <AknTaskList.h>
#include <mmf/common/mmfcontrollerpluginresolver.h>
#include <widgetregistryclient.h>