--- a/contentcontrolsrv/ccclientsession/src/ccclientsession.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/ccclientsession/src/ccclientsession.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -30,6 +30,7 @@
const TUint KCcSrvMajorVersionNumber = 1;
const TUint KCcSrvMinorVersionNumber = 0;
const TUint KCcSrvBuildVersionNumber = 0;
+const TInt KDefaultMessageSlots = 3;
// -----------------------------------------------------------------------------
@@ -78,7 +79,7 @@
TInt retry=2;
for (;;)
{
- TInt r = CreateSession( KCcSrvName, ver );
+ TInt r = CreateSession( KCcSrvName, ver, KDefaultMessageSlots );
if (r != KErrNotFound && r != KErrServerTerminated)
{
--- a/contentcontrolsrv/ccsrv/inc/ccsrv.h Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/ccsrv/inc/ccsrv.h Fri Mar 12 15:43:54 2010 +0200
@@ -114,13 +114,9 @@
/**
* Sends message to defined session
- * @param aSender Sender session
- * @param aReceiver Receiver session
* @param aMsgBuf Message buffer
*/
void SendMsgL(
- TUint32 aSender,
- TUint32 aReceiver,
CCcSrvMsg& aMessage );
private:
--- a/contentcontrolsrv/ccsrv/inc/ccsrvsession.h Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/ccsrv/inc/ccsrvsession.h Fri Mar 12 15:43:54 2010 +0200
@@ -90,8 +90,6 @@
*
*/
void ReceiveMsgL(
- TUint32 aSender,
- TUint32 aReceiver,
CCcSrvMsg& aMessage );
private:
--- a/contentcontrolsrv/ccsrv/src/ccsrv.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/ccsrv/src/ccsrv.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -299,16 +299,14 @@
// -----------------------------------------------------------------------------
//
void CCcSrv::SendMsgL(
- TUint32 aSender,
- TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
TBool found( EFalse );
for ( TUint32 i = 0; i < iSessions.Count() && !found; i++ )
{
- if ( iSessions[ i ]->Id() == aReceiver )
+ if ( iSessions[ i ]->Id() == aMessage.Receiver() )
{
- iSessions[ i ]->ReceiveMsgL( aSender, aReceiver, aMessage );
+ iSessions[ i ]->ReceiveMsgL( aMessage );
found = ETrue;
}
}
--- a/contentcontrolsrv/ccsrv/src/ccsrvsession.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/ccsrv/src/ccsrvsession.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -215,11 +215,35 @@
void CCcSrvSession::HandleWaitForApiReqL(
RMessage2& aMessage )
{
+ // Wait for the next API request or Observer notification
CCcSrvMsg* tr = CCcSrvMsg::NewL();
CleanupStack::PushL( tr );
tr->SetMessage( aMessage );
iRequests.AppendL( tr );
CleanupStack::Pop( tr );
+
+ // Check if there is outstanding requests
+ for ( TInt i = 0; i < iRequests.Count(); i++ )
+ {
+ CCcSrvMsg* req = iRequests[ i ];
+ if ( req->MsgId() == ECcRegisterObserverNtf ||
+ req->MsgId() == ECcUnregisterObserverNtf )
+ {
+ iRequests.Remove( i );
+ CleanupStack::PushL( req );
+ SendObserverNtfL( req->Sender(), req->MsgId() );
+ CleanupStack::PopAndDestroy( req );
+ break;
+ }
+ else if ( req->Function() == ECcApiReq )
+ {
+ iRequests.Remove( i );
+ CleanupStack::PushL( req );
+ ReceiveMsgL( *req );
+ CleanupStack::PopAndDestroy( req );
+ break;
+ }
+ }
}
// -----------------------------------------------------------------------
@@ -234,6 +258,20 @@
tr->SetMessage( aMessage );
iRequests.AppendL( tr );
CleanupStack::Pop( tr );
+
+ // Check if there is outstanding API notifications
+ for ( TInt i = 0; i < iRequests.Count(); i++ )
+ {
+ CCcSrvMsg* req = iRequests[ i ];
+ if ( req->Function() == ECcApiNtf )
+ {
+ iRequests.Remove( i );
+ CleanupStack::PushL( req );
+ ReceiveMsgL( *req );
+ CleanupStack::PopAndDestroy( req );
+ break;
+ }
+ }
}
// -----------------------------------------------------------------------
@@ -289,12 +327,14 @@
message->InternalizeL( stream );
message->SetTrId( Server().GetTrId() );
message->SetMessage( aMessage );
+ message->SetSender( iId );
+ message->SetReceiver( providerAddress );
- Server().SendMsgL( iId, providerAddress, *message );
+ iRequests.AppendL( message );
+ CleanupStack::Pop( message );
- iRequests.AppendL( message );
+ Server().SendMsgL( *message );
- CleanupStack::Pop( message );
CleanupStack::PopAndDestroy( msgBuf );
}
@@ -325,9 +365,11 @@
CleanupStack::PushL( message );
message->InternalizeL( stream );
message->SetMessage( aMessage );
+ message->SetSender( sender );
+ message->SetReceiver( receiver );
// Forward message to receiver
- Server().SendMsgL( sender, receiver, *message );
+ Server().SendMsgL( *message );
CleanupStack::PopAndDestroy( message );
CleanupStack::PopAndDestroy( msgBuf );
@@ -396,11 +438,13 @@
CleanupStack::PushL( message );
message->InternalizeL( stream );
message->SetMessage( aMessage );
+ message->SetSender( iId );
// Forward notification to observers
for ( TInt i = 0; i < iObservers.Count(); i++ )
{
- Server().SendMsgL( iId, iObservers[ i ], *message );
+ message->SetReceiver( iObservers[ i ] );
+ Server().SendMsgL( *message );
}
message->Message().Complete( KErrNone );
@@ -414,49 +458,48 @@
// -----------------------------------------------------------------------
//
void CCcSrvSession::ReceiveMsgL(
- TUint32 aSender,
- TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
TBool found( EFalse );
CCcSrvMsg* req( NULL );
- TInt index( 0 );
for ( TInt i = 0; i < iRequests.Count() && !found; i++ )
{
req = iRequests[ i ];
- if ( aMessage.Message().Function() == ECcApiReq &&
- req->Message().Function() == ECcWaitForApiReq &&
+ if ( aMessage.Function() == ECcApiReq &&
+ req->Function() == ECcWaitForApiReq &&
!req->Message().IsNull() )
{
// Pending WaitForApiReq transaction found
- index = i;
+ iRequests.Remove( i );
found = ETrue;
}
- else if ( aMessage.Message().Function() == ECcApiResp &&
+ else if ( aMessage.Function() == ECcApiResp &&
req->TrId() == aMessage.TrId() )
{
// Pending ApiReq transaction found
- index = i;
+ iRequests.Remove( i );
found = ETrue;
}
- else if ( aMessage.Message().Function() == ECcApiNtf &&
- req->Message().Function() == ECcWaitForApiNtf &&
+ else if ( aMessage.Function() == ECcApiNtf &&
+ req->Function() == ECcWaitForApiNtf &&
!req->Message().IsNull() )
{
// Pending WaitForApiNtf transaction found
- index = i;
+ iRequests.Remove( i );
found = ETrue;
}
}
if ( found )
{
+ CleanupStack::PushL( req );
+
// Write sender of message
- TPckgBuf<TUint32> packagedSender( aSender );
+ TPckgBuf<TUint32> packagedSender( aMessage.Sender() );
req->Message().WriteL( 1, packagedSender, 0 );
// Write receiver of message
- TPckgBuf<TUint32> packagedReceiver( aReceiver );
+ TPckgBuf<TUint32> packagedReceiver( aMessage.Receiver() );
req->Message().WriteL( 2, packagedReceiver, 0 );
// Externalize message header
@@ -477,27 +520,43 @@
req->Message().WriteL( 3, ptr, 0);
CleanupStack::PopAndDestroy( des );
CleanupStack::PopAndDestroy( buf );
-
+
// Complete request
req->Message().Complete( KErrNone );
+
if ( aMessage.DataSize() )
{
// Store request data to be read later
// with GetMsgData()
req->SetTrId( aMessage.TrId() );
req->SetData( aMessage.Data() );
+ iRequests.AppendL( req );
+ CleanupStack::Pop( req );
}
else
{
- // Received request does not contain any data
- // -> remove it from request array
- iRequests.Remove( index );
- delete req;
+ CleanupStack::PopAndDestroy( req );
}
}
else
{
- User::Leave( KErrNotFound );
+ if ( aMessage.Function() == ECcApiReq ||
+ aMessage.Function() == ECcApiNtf )
+ {
+ // Store message to handled later
+ CCcSrvMsg* msg = CCcSrvMsg::NewL();
+ CleanupStack::PushL( msg );
+ msg->SetFunction( aMessage.Function() );
+ msg->SetSender( aMessage.Sender() );
+ msg->SetReceiver( aMessage.Receiver() );
+ msg->SetMsgId( aMessage.MsgId() );
+ msg->SetTrId( aMessage.TrId() );
+ msg->SetStatus( aMessage.Status() );
+ msg->SetData( aMessage.Data() );
+ iRequests.AppendL( msg );
+ CleanupStack::Pop( msg );
+ }
+ // ECcApiResp are ignored
}
}
@@ -509,25 +568,30 @@
TUint32 aSender,
TUint32 aNtf )
{
+ // Create notification
+ CCcSrvMsg* ntf = CCcSrvMsg::NewL();
+ CleanupStack::PushL( ntf );
+ ntf->SetMsgId( aNtf );
+ ntf->SetSender( aSender );
+
// Notify provider of registered observer
TBool found( EFalse );
CCcSrvMsg* req( NULL );
- TInt index( 0 );
for ( TInt i = 0; i < iRequests.Count() && !found; i++ )
{
req = iRequests[ i ];
- if ( req->Message().Function() == ECcWaitForApiReq &&
+ if ( req->Function() == ECcWaitForApiReq &&
!req->Message().IsNull() )
{
// Pending WaitForApiReq transaction found
- index = i;
+ iRequests.Remove( i );
found = ETrue;
}
}
if ( found )
{
// Write sender of message
- TPckgBuf<TUint32> packagedSender( aSender );
+ TPckgBuf<TUint32> packagedSender( ntf->Sender() );
req->Message().WriteL( 1, packagedSender, 0 );
// Write receiver of message
@@ -535,9 +599,6 @@
req->Message().WriteL( 2, packagedReceiver, 0 );
// Externalize notification
- CCcSrvMsg* ntf = CCcSrvMsg::NewL();
- CleanupStack::PushL( ntf );
- ntf->SetMsgId( aNtf );
HBufC8* ntfBuf = ntf->MarshalL();
CleanupStack::PushL( ntfBuf );
TPtr8 ntfPtr( NULL, 0);
@@ -550,13 +611,14 @@
// Complete request
req->Message().Complete( KErrNone );
- iRequests.Remove( index );
delete req;
-
+
}
else
{
- User::Leave( KErrNotFound );
+ // Store notification to be sent later
+ iRequests.AppendL( ntf );
+ CleanupStack::Pop( ntf );
}
}
--- a/contentcontrolsrv/ccsrvapi/bwins/ccsrvapiu.def Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/ccsrvapi/bwins/ccsrvapiu.def Fri Mar 12 15:43:54 2010 +0200
@@ -2,18 +2,24 @@
?SetStatus@CCcSrvMsg@@QAEXH@Z @ 1 NONAME ; void CCcSrvMsg::SetStatus(int)
?ExternalizeHeaderL@CCcSrvMsg@@QAEXAAVRWriteStream@@@Z @ 2 NONAME ; void CCcSrvMsg::ExternalizeHeaderL(class RWriteStream &)
?DataSize@CCcSrvMsg@@QAEHXZ @ 3 NONAME ; int CCcSrvMsg::DataSize(void)
- ?MsgId@CCcSrvMsg@@QAEKXZ @ 4 NONAME ; unsigned long CCcSrvMsg::MsgId(void)
- ?SetMsgId@CCcSrvMsg@@QAEXK@Z @ 5 NONAME ; void CCcSrvMsg::SetMsgId(unsigned long)
- ?Data@CCcSrvMsg@@QAE?AVTPtrC8@@XZ @ 6 NONAME ; class TPtrC8 CCcSrvMsg::Data(void)
- ?MarshalL@CCcSrvMsg@@QAEPAVHBufC8@@XZ @ 7 NONAME ; class HBufC8 * CCcSrvMsg::MarshalL(void)
- ?SetTrId@CCcSrvMsg@@QAEXK@Z @ 8 NONAME ; void CCcSrvMsg::SetTrId(unsigned long)
- ?InternalizeHeaderL@CCcSrvMsg@@QAEXAAVRReadStream@@@Z @ 9 NONAME ; void CCcSrvMsg::InternalizeHeaderL(class RReadStream &)
- ?NewL@CCcSrvMsg@@SAPAV1@XZ @ 10 NONAME ; class CCcSrvMsg * CCcSrvMsg::NewL(void)
- ?InternalizeL@CCcSrvMsg@@QAEXAAVRReadStream@@@Z @ 11 NONAME ; void CCcSrvMsg::InternalizeL(class RReadStream &)
- ?TrId@CCcSrvMsg@@QAEKXZ @ 12 NONAME ; unsigned long CCcSrvMsg::TrId(void)
- ?Message@CCcSrvMsg@@QAE?AVRMessage2@@XZ @ 13 NONAME ; class RMessage2 CCcSrvMsg::Message(void)
- ?SetData@CCcSrvMsg@@QAEXABVTDesC8@@@Z @ 14 NONAME ; void CCcSrvMsg::SetData(class TDesC8 const &)
- ?ExternalizeL@CCcSrvMsg@@QAEXAAVRWriteStream@@@Z @ 15 NONAME ; void CCcSrvMsg::ExternalizeL(class RWriteStream &)
- ?SetMessage@CCcSrvMsg@@QAEXAAVRMessage2@@@Z @ 16 NONAME ; void CCcSrvMsg::SetMessage(class RMessage2 &)
- ?Status@CCcSrvMsg@@QAEHXZ @ 17 NONAME ; int CCcSrvMsg::Status(void)
+ ?SetSender@CCcSrvMsg@@QAEXK@Z @ 4 NONAME ; void CCcSrvMsg::SetSender(unsigned long)
+ ?Sender@CCcSrvMsg@@QAEKXZ @ 5 NONAME ; unsigned long CCcSrvMsg::Sender(void)
+ ?MsgId@CCcSrvMsg@@QAEKXZ @ 6 NONAME ; unsigned long CCcSrvMsg::MsgId(void)
+ ?Receiver@CCcSrvMsg@@QAEKXZ @ 7 NONAME ; unsigned long CCcSrvMsg::Receiver(void)
+ ?SetFunction@CCcSrvMsg@@QAEXH@Z @ 8 NONAME ; void CCcSrvMsg::SetFunction(int)
+ ?SetMsgId@CCcSrvMsg@@QAEXK@Z @ 9 NONAME ; void CCcSrvMsg::SetMsgId(unsigned long)
+ ?Data@CCcSrvMsg@@QAE?AVTPtrC8@@XZ @ 10 NONAME ; class TPtrC8 CCcSrvMsg::Data(void)
+ ?MarshalL@CCcSrvMsg@@QAEPAVHBufC8@@XZ @ 11 NONAME ; class HBufC8 * CCcSrvMsg::MarshalL(void)
+ ?SetTrId@CCcSrvMsg@@QAEXK@Z @ 12 NONAME ; void CCcSrvMsg::SetTrId(unsigned long)
+ ?Function@CCcSrvMsg@@QAEHXZ @ 13 NONAME ; int CCcSrvMsg::Function(void)
+ ?InternalizeHeaderL@CCcSrvMsg@@QAEXAAVRReadStream@@@Z @ 14 NONAME ; void CCcSrvMsg::InternalizeHeaderL(class RReadStream &)
+ ?SetReceiver@CCcSrvMsg@@QAEXK@Z @ 15 NONAME ; void CCcSrvMsg::SetReceiver(unsigned long)
+ ?NewL@CCcSrvMsg@@SAPAV1@XZ @ 16 NONAME ; class CCcSrvMsg * CCcSrvMsg::NewL(void)
+ ?InternalizeL@CCcSrvMsg@@QAEXAAVRReadStream@@@Z @ 17 NONAME ; void CCcSrvMsg::InternalizeL(class RReadStream &)
+ ?TrId@CCcSrvMsg@@QAEKXZ @ 18 NONAME ; unsigned long CCcSrvMsg::TrId(void)
+ ?Message@CCcSrvMsg@@QAE?AVRMessage2@@XZ @ 19 NONAME ; class RMessage2 CCcSrvMsg::Message(void)
+ ?SetData@CCcSrvMsg@@QAEXABVTDesC8@@@Z @ 20 NONAME ; void CCcSrvMsg::SetData(class TDesC8 const &)
+ ?ExternalizeL@CCcSrvMsg@@QAEXAAVRWriteStream@@@Z @ 21 NONAME ; void CCcSrvMsg::ExternalizeL(class RWriteStream &)
+ ?SetMessage@CCcSrvMsg@@QAEXAAVRMessage2@@@Z @ 22 NONAME ; void CCcSrvMsg::SetMessage(class RMessage2 &)
+ ?Status@CCcSrvMsg@@QAEHXZ @ 23 NONAME ; int CCcSrvMsg::Status(void)
--- a/contentcontrolsrv/ccsrvapi/eabi/ccsrvapiu.def Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/ccsrvapi/eabi/ccsrvapiu.def Fri Mar 12 15:43:54 2010 +0200
@@ -1,21 +1,27 @@
EXPORTS
_ZN9CCcSrvMsg10SetMessageER9RMessage2 @ 1 NONAME
- _ZN9CCcSrvMsg12ExternalizeLER12RWriteStream @ 2 NONAME
- _ZN9CCcSrvMsg12InternalizeLER11RReadStream @ 3 NONAME
- _ZN9CCcSrvMsg18ExternalizeHeaderLER12RWriteStream @ 4 NONAME
- _ZN9CCcSrvMsg18InternalizeHeaderLER11RReadStream @ 5 NONAME
- _ZN9CCcSrvMsg4DataEv @ 6 NONAME
- _ZN9CCcSrvMsg4NewLEv @ 7 NONAME
- _ZN9CCcSrvMsg4TrIdEv @ 8 NONAME
- _ZN9CCcSrvMsg5MsgIdEv @ 9 NONAME
- _ZN9CCcSrvMsg6StatusEv @ 10 NONAME
- _ZN9CCcSrvMsg7MessageEv @ 11 NONAME
- _ZN9CCcSrvMsg7SetDataERK6TDesC8 @ 12 NONAME
- _ZN9CCcSrvMsg7SetTrIdEm @ 13 NONAME
- _ZN9CCcSrvMsg8DataSizeEv @ 14 NONAME
- _ZN9CCcSrvMsg8MarshalLEv @ 15 NONAME
- _ZN9CCcSrvMsg8SetMsgIdEm @ 16 NONAME
- _ZN9CCcSrvMsg9SetStatusEi @ 17 NONAME
- _ZTI9CCcSrvMsg @ 18 NONAME
- _ZTV9CCcSrvMsg @ 19 NONAME
+ _ZN9CCcSrvMsg11SetFunctionEi @ 2 NONAME
+ _ZN9CCcSrvMsg11SetReceiverEm @ 3 NONAME
+ _ZN9CCcSrvMsg12ExternalizeLER12RWriteStream @ 4 NONAME
+ _ZN9CCcSrvMsg12InternalizeLER11RReadStream @ 5 NONAME
+ _ZN9CCcSrvMsg18ExternalizeHeaderLER12RWriteStream @ 6 NONAME
+ _ZN9CCcSrvMsg18InternalizeHeaderLER11RReadStream @ 7 NONAME
+ _ZN9CCcSrvMsg4DataEv @ 8 NONAME
+ _ZN9CCcSrvMsg4NewLEv @ 9 NONAME
+ _ZN9CCcSrvMsg4TrIdEv @ 10 NONAME
+ _ZN9CCcSrvMsg5MsgIdEv @ 11 NONAME
+ _ZN9CCcSrvMsg6SenderEv @ 12 NONAME
+ _ZN9CCcSrvMsg6StatusEv @ 13 NONAME
+ _ZN9CCcSrvMsg7MessageEv @ 14 NONAME
+ _ZN9CCcSrvMsg7SetDataERK6TDesC8 @ 15 NONAME
+ _ZN9CCcSrvMsg7SetTrIdEm @ 16 NONAME
+ _ZN9CCcSrvMsg8DataSizeEv @ 17 NONAME
+ _ZN9CCcSrvMsg8FunctionEv @ 18 NONAME
+ _ZN9CCcSrvMsg8MarshalLEv @ 19 NONAME
+ _ZN9CCcSrvMsg8ReceiverEv @ 20 NONAME
+ _ZN9CCcSrvMsg8SetMsgIdEm @ 21 NONAME
+ _ZN9CCcSrvMsg9SetSenderEm @ 22 NONAME
+ _ZN9CCcSrvMsg9SetStatusEi @ 23 NONAME
+ _ZTI9CCcSrvMsg @ 24 NONAME
+ _ZTV9CCcSrvMsg @ 25 NONAME
--- a/contentcontrolsrv/ccsrvapi/inc/ccsrvapi.h Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/ccsrvapi/inc/ccsrvapi.h Fri Mar 12 15:43:54 2010 +0200
@@ -46,7 +46,7 @@
// - Arg[1]: Registered provider address (out), TUint32
// - Arg[2]: Not used
// - Arg[2]: Not used
- ECcReqisterProvider = ECcIPCFunctionBase,
+ ECcReqisterProvider,
// ----------------------------------------------------------------------------
// RegisterObserver
// ----------------------------------------------------------------------------
@@ -179,7 +179,7 @@
// ----------------------------------------------------------------------------
enum TCcSrvMessages
{
- ECcMessageBase = 0,
+ ECcMessageBase,
// ----------------------------------------------------------------------------
// RegisterObserverNtf
// ----------------------------------------------------------------------------
@@ -190,7 +190,7 @@
// - Message id: EHsCcRegisterObserverNtf
// - Transaction id: None
// - Message data: None
- ECcRegisterObserverNtf = ECcMessageBase,
+ ECcRegisterObserverNtf,
// ----------------------------------------------------------------------------
// UnregisterObserverNtf
// ----------------------------------------------------------------------------
@@ -258,6 +258,39 @@
IMPORT_C void SetMessage( RMessage2& aMessage );
/**
+ * Returns IPC function
+ */
+ IMPORT_C TInt Function();
+
+ /**
+ * Stores IPC function
+ * @param aFunction IPC function
+ */
+ IMPORT_C void SetFunction( TInt aFunction );
+
+ /**
+ * Returns sender of the message
+ */
+ IMPORT_C TUint32 Sender();
+
+ /**
+ * Stores sender of the message
+ * @param aSender Message sender
+ */
+ IMPORT_C void SetSender( TUint32 );
+
+ /**
+ * Returns receiver of the message
+ */
+ IMPORT_C TUint32 Receiver();
+
+ /**
+ * Stores receiver of the message
+ * @param aReceiver Message receiver
+ */
+ IMPORT_C void SetReceiver( TUint32 );
+
+ /**
* Returns message id
*/
IMPORT_C TUint32 MsgId();
@@ -343,6 +376,21 @@
RMessage2 iMessage;
/**
+ * IPC function
+ */
+ TInt iFunction;
+
+ /**
+ * Sender
+ */
+ TUint32 iSender;
+
+ /**
+ * Receiver
+ */
+ TUint32 iReceiver;
+
+ /**
* Message id
*/
TUint32 iMsgId;
--- a/contentcontrolsrv/ccsrvapi/src/ccsrvmsg.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/ccsrvapi/src/ccsrvmsg.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -79,6 +79,55 @@
EXPORT_C void CCcSrvMsg::SetMessage( RMessage2& aMessage )
{
iMessage = aMessage;
+ SetFunction( aMessage.Function() );
+ }
+
+// -----------------------------------------------------------------------------
+// CCcSrvMsg::Sender()
+// -----------------------------------------------------------------------------
+EXPORT_C TInt CCcSrvMsg::Function()
+ {
+ return( iFunction ) ;
+ }
+
+// -----------------------------------------------------------------------------
+// CCcSrvMsg::SetSender()
+// -----------------------------------------------------------------------------
+EXPORT_C void CCcSrvMsg::SetFunction( TInt aFunction )
+ {
+ iFunction = aFunction;
+ }
+
+// -----------------------------------------------------------------------------
+// CCcSrvMsg::Sender()
+// -----------------------------------------------------------------------------
+EXPORT_C TUint32 CCcSrvMsg::Sender()
+ {
+ return( iSender ) ;
+ }
+
+// -----------------------------------------------------------------------------
+// CCcSrvMsg::SetSender()
+// -----------------------------------------------------------------------------
+EXPORT_C void CCcSrvMsg::SetSender( TUint32 aSender )
+ {
+ iSender = aSender;
+ }
+
+// -----------------------------------------------------------------------------
+// CCcSrvMsg::Receiver()
+// -----------------------------------------------------------------------------
+EXPORT_C TUint32 CCcSrvMsg::Receiver()
+ {
+ return( iReceiver ) ;
+ }
+
+// -----------------------------------------------------------------------------
+// CCcSrvMsg::SetReceiver()
+// -----------------------------------------------------------------------------
+EXPORT_C void CCcSrvMsg::SetReceiver( TUint32 aReceiver )
+ {
+ iReceiver = aReceiver;
}
// -----------------------------------------------------------------------------
--- a/contentcontrolsrv/hsccclient/hsccapiclient/inc/hsccapiclient.h Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/hsccclient/hsccapiclient/inc/hsccapiclient.h Fri Mar 12 15:43:54 2010 +0200
@@ -80,66 +80,86 @@
public: // From MHsContentController
/**
- *
+ * See from API documentation
*/
TInt WidgetListL( CHsContentInfoArray& aArray );
-
+
/**
- *
+ * See from API documentation
+ */
+ TInt WidgetListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray );
+
+ /**
+ * See from API documentation
*/
TInt ViewListL( CHsContentInfoArray& aArray );
/**
- *
+ * See from API documentation
*/
TInt AppListL( CHsContentInfoArray& aArray );
/**
- *
+ * See from API documentation
*/
TInt AddWidgetL( CHsContentInfo& aInfo );
/**
- *
+ * See from API documentation
*/
TInt RemoveWidgetL( CHsContentInfo& aInfo );
/**
- *
+ * See from API documentation
*/
TInt AddViewL( CHsContentInfo& aInfo );
/**
- *
+ * See from API documentation
*/
TInt RemoveViewL( CHsContentInfo& aInfo );
/**
- *
+ * See from API documentation
*/
TInt ActivateViewL( CHsContentInfo& aInfo );
/**
- *
+ * See from API documentation
*/
TInt ActivateAppL( CHsContentInfo& aInfo );
- /**
- *
- */
+ /**
+ * See from API documentation
+ */
TInt ActiveViewL( CHsContentInfo& aInfo );
/**
- *
+ * See from API documentation
*/
TInt ActiveAppL( CHsContentInfo& aInfo );
private: // Functions
/**
- *
+ * Requests receiving of content change notification
*/
void WaitForApiNtfL();
+ /**
+ * Internalize received response message
+ */
+ TInt InternalizeRespL( TPtr8& aResp, TUint32& aTrId, TUint32& aDataSize );
+
+ /**
+ * Internalize received CHsContentInfo type response message data
+ */
+ TInt InternalizeContentInfoL( CHsContentInfo& aInfo, TUint32 aTrId, TUint32 aDataSize );
+
+ /**
+ * Internalize received CHsContentInfoArray type response message data
+ */
+ TInt InternalizeContentInfoArrayL( CHsContentInfoArray& aInfo, TUint32 aTrId, TUint32 aDataSize );
+
private: // Data
/**
* Session to Homescreen content control server
--- a/contentcontrolsrv/hsccclient/hsccapiclient/src/hsccapiclient.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/hsccclient/hsccapiclient/src/hsccapiclient.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -102,12 +102,27 @@
//
void CHsCcApiClient::RunL()
{
- if ( !iStatus.Int() )
+ TInt err( iStatus.Int() );
+ HBufC8* header( NULL );
+ TPtr8 headerPtr( NULL, 0 );
+
+ if ( !err )
+ {
+ // Read API request header
+ header = iApiHeader->AllocL();
+ CleanupStack::PushL( header );
+ headerPtr.Set( header->Des() );
+ }
+
+ // Receive next API notification
+ WaitForApiNtfL();
+
+ if ( !err )
{
// Get received message header
CCcSrvMsg* message = CCcSrvMsg::NewL();
CleanupStack::PushL( message );
- RDesReadStream stream( iApiHeaderPtr );
+ RDesReadStream stream( headerPtr );
CleanupClosePushL( stream );
message->InternalizeHeaderL( stream );
CleanupStack::PopAndDestroy( &stream );
@@ -138,10 +153,10 @@
}
CleanupStack::PopAndDestroy( message );
}
-
- // Receive next API notification
- WaitForApiNtfL();
-
+ if ( header )
+ {
+ CleanupStack::PopAndDestroy( header );
+ }
}
// -----------------------------------------------------------------------------
@@ -188,37 +203,73 @@
if ( !err )
{
- // Internalize WidgetListResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- if ( !err )
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
+ if ( !err && dataSize )
{
- if ( respMsg->DataSize() )
- {
- // Get API response data
- HBufC8* dataBuf = HBufC8::NewL( respMsg->DataSize() );
- CleanupStack::PushL( dataBuf );
- TPtr8 dataPtr( NULL, 0 );
- dataPtr.Set( dataBuf->Des() );
- TPckgBuf<TUint32> trId( respMsg->TrId() );
- err = iSession.GetMsgData( trId, dataPtr );
- if ( !err )
- {
- // Internalize API response data
- RDesReadStream dataStream( dataPtr );
- CleanupClosePushL( dataStream );
- aArray.InternalizeL( dataStream );
- CleanupStack::PopAndDestroy( &dataStream );
- }
- CleanupStack::PopAndDestroy( dataBuf );
- }
+ // Internalize API response data
+ err = InternalizeContentInfoArrayL( aArray, trId, dataSize );
}
- CleanupStack::PopAndDestroy( respMsg );
+ }
+
+ // Cleanup
+ CleanupStack::PopAndDestroy( msgBuf );
+ CleanupStack::PopAndDestroy( reqMsg );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsCcApiClient::WidgetListL
+// -----------------------------------------------------------------------------
+//
+TInt CHsCcApiClient::WidgetListL(
+ CHsContentInfo& aInfo, CHsContentInfoArray& aArray )
+ {
+ TInt err( KErrNone );
+
+ // Create WidgetListReq API request
+ CCcSrvMsg* reqMsg = CCcSrvMsg::NewL();
+ CleanupStack::PushL( reqMsg );
+ reqMsg->SetMsgId( EHsCcWidgetListReq );
+ reqMsg->SetTrId( 0 );
+
+ // Marshal WidgetListReq 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
@@ -259,37 +310,15 @@
if ( !err )
{
- // Internalize ViewListResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- if ( !err )
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
+ if ( !err && dataSize )
{
- if ( respMsg->DataSize() )
- {
- // Get API response data
- HBufC8* dataBuf = HBufC8::NewL( respMsg->DataSize() );
- CleanupStack::PushL( dataBuf );
- TPtr8 dataPtr( NULL, 0 );
- dataPtr.Set( dataBuf->Des() );
- TPckgBuf<TUint32> trId( respMsg->TrId() );
- err = iSession.GetMsgData( trId, dataPtr );
- if ( !err )
- {
- // Internalize API response data
- RDesReadStream dataStream( dataPtr );
- CleanupClosePushL( dataStream );
- aArray.InternalizeL( dataStream );
- CleanupStack::PopAndDestroy( &dataStream );
- }
- CleanupStack::PopAndDestroy( dataBuf );
- }
+ // Internalize API response data
+ err = InternalizeContentInfoArrayL( aArray, trId, dataSize );
}
- CleanupStack::PopAndDestroy( respMsg );
}
// Cleanup
@@ -330,37 +359,15 @@
if ( !err )
{
- // Internalize AppListResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- if ( !err )
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
+ if ( !err && dataSize )
{
- if ( respMsg->DataSize() )
- {
- // Get API response data
- HBufC8* dataBuf = HBufC8::NewL( respMsg->DataSize() );
- CleanupStack::PushL( dataBuf );
- TPtr8 dataPtr( NULL, 0 );
- dataPtr.Set( dataBuf->Des() );
- TPckgBuf<TUint32> trId( respMsg->TrId() );
- err = iSession.GetMsgData( trId, dataPtr );
- if ( !err )
- {
- // Internalize API response data
- RDesReadStream dataStream( dataPtr );
- CleanupClosePushL( dataStream );
- aArray.InternalizeL( dataStream );
- CleanupStack::PopAndDestroy( &dataStream );
- }
- CleanupStack::PopAndDestroy( dataBuf );
- }
+ // Internalize API response data
+ err = InternalizeContentInfoArrayL( aArray, trId, dataSize );
}
- CleanupStack::PopAndDestroy( respMsg );
}
// Cleanup
@@ -409,15 +416,10 @@
if ( !err )
{
- // Internalize AddWidgetResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- CleanupStack::PopAndDestroy( respMsg );
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
}
// Cleanup
@@ -466,15 +468,10 @@
if ( !err )
{
- // Internalize RemoveWidgetResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- CleanupStack::PopAndDestroy( respMsg );
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
}
// Cleanup
@@ -523,15 +520,10 @@
if ( !err )
{
- // Internalize AddViewResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- CleanupStack::PopAndDestroy( respMsg );
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
}
// Cleanup
@@ -580,15 +572,10 @@
if ( !err )
{
- // Internalize RemoveViewResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- CleanupStack::PopAndDestroy( respMsg );
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
}
// Cleanup
@@ -637,15 +624,10 @@
if ( !err )
{
- // Internalize ActivateViewResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- CleanupStack::PopAndDestroy( respMsg );
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
}
// Cleanup
@@ -694,15 +676,10 @@
if ( !err )
{
- // Internalize ActivateAppResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- CleanupStack::PopAndDestroy( respMsg );
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
}
// Cleanup
@@ -743,37 +720,15 @@
if ( !err )
{
- // Internalize AppListResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- if ( !err )
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
+ if ( !err && dataSize )
{
- if ( respMsg->DataSize() )
- {
- // Get API response data
- HBufC8* dataBuf = HBufC8::NewL( respMsg->DataSize() );
- CleanupStack::PushL( dataBuf );
- TPtr8 dataPtr( NULL, 0 );
- dataPtr.Set( dataBuf->Des() );
- TPckgBuf<TUint32> trId( respMsg->TrId() );
- err = iSession.GetMsgData( trId, dataPtr );
- if ( !err )
- {
- // Internalize API response data
- RDesReadStream dataStream( dataPtr );
- CleanupClosePushL( dataStream );
- aInfo.InternalizeL( dataStream );
- CleanupStack::PopAndDestroy( &dataStream );
- }
- CleanupStack::PopAndDestroy( dataBuf );
- }
+ // Internalize API response data
+ err = InternalizeContentInfoL( aInfo, trId, dataSize );
}
- CleanupStack::PopAndDestroy( respMsg );
}
// Cleanup
@@ -814,37 +769,15 @@
if ( !err )
{
- // Internalize AppListResp API response
- CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
- CleanupStack::PushL( respMsg );
- RDesReadStream respStream( msgPtr );
- CleanupClosePushL( respStream );
- respMsg->InternalizeHeaderL( respStream );
- CleanupStack::PopAndDestroy( &respStream );
- err = respMsg->Status();
- if ( !err )
+ // Internalize response message
+ TUint32 trId;
+ TUint32 dataSize;
+ err = InternalizeRespL( msgPtr, trId, dataSize );
+ if ( !err && dataSize )
{
- if ( respMsg->DataSize() )
- {
- // Get API response data
- HBufC8* dataBuf = HBufC8::NewL( respMsg->DataSize() );
- CleanupStack::PushL( dataBuf );
- TPtr8 dataPtr( NULL, 0 );
- dataPtr.Set( dataBuf->Des() );
- TPckgBuf<TUint32> trId( respMsg->TrId() );
- err = iSession.GetMsgData( trId, dataPtr );
- if ( !err )
- {
- // Internalize API response data
- RDesReadStream dataStream( dataPtr );
- CleanupClosePushL( dataStream );
- aInfo.InternalizeL( dataStream );
- CleanupStack::PopAndDestroy( &dataStream );
- }
- CleanupStack::PopAndDestroy( dataBuf );
- }
+ // Internalize API response data
+ err = InternalizeContentInfoL( aInfo, trId, dataSize );
}
- CleanupStack::PopAndDestroy( respMsg );
}
// Cleanup
@@ -878,4 +811,83 @@
}
+// -----------------------------------------------------------------------------
+// CHsCcApiClient::InternalizeRespL()
+// -----------------------------------------------------------------------------
+//
+TInt CHsCcApiClient::InternalizeRespL(
+ TPtr8& aResp, TUint32& aTrId, TUint32& aDataSize )
+ {
+ TInt err( KErrNone );
+
+ CCcSrvMsg* respMsg = CCcSrvMsg::NewL();
+ CleanupStack::PushL( respMsg );
+ RDesReadStream respStream( aResp );
+ CleanupClosePushL( respStream );
+ respMsg->InternalizeHeaderL( respStream );
+ CleanupStack::PopAndDestroy( &respStream );
+ err = respMsg->Status();
+ aTrId = respMsg->TrId();
+ aDataSize = respMsg->DataSize();
+ CleanupStack::PopAndDestroy( respMsg );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsCcApiClient::InternalizeContentInfoL()
+// -----------------------------------------------------------------------------
+//
+TInt CHsCcApiClient::InternalizeContentInfoL(
+ CHsContentInfo& aInfo, TUint32 aTrId, TUint32 aDataSize )
+ {
+ TInt err( KErrNone );
+
+ HBufC8* dataBuf = HBufC8::NewL( aDataSize );
+ CleanupStack::PushL( dataBuf );
+ TPtr8 dataPtr( NULL, 0 );
+ dataPtr.Set( dataBuf->Des() );
+ TPckgBuf<TUint32> trId( aTrId );
+ err = iSession.GetMsgData( trId, dataPtr );
+ if ( !err )
+ {
+ // Internalize API response data
+ RDesReadStream dataStream( dataPtr );
+ CleanupClosePushL( dataStream );
+ aInfo.InternalizeL( dataStream );
+ CleanupStack::PopAndDestroy( &dataStream );
+ }
+ CleanupStack::PopAndDestroy( dataBuf );
+
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CHsCcApiClient::InternalizeContentInfoArrayL()
+// -----------------------------------------------------------------------------
+//
+TInt CHsCcApiClient::InternalizeContentInfoArrayL(
+ CHsContentInfoArray& aInfo, TUint32 aTrId, TUint32 aDataSize )
+ {
+ TInt err( KErrNone );
+
+ HBufC8* dataBuf = HBufC8::NewL( aDataSize );
+ CleanupStack::PushL( dataBuf );
+ TPtr8 dataPtr( NULL, 0 );
+ dataPtr.Set( dataBuf->Des() );
+ TPckgBuf<TUint32> trId( aTrId );
+ err = iSession.GetMsgData( trId, dataPtr );
+ if ( !err )
+ {
+ // Internalize API response data
+ RDesReadStream dataStream( dataPtr );
+ CleanupClosePushL( dataStream );
+ aInfo.InternalizeL( dataStream );
+ CleanupStack::PopAndDestroy( &dataStream );
+ }
+ CleanupStack::PopAndDestroy( dataBuf );
+
+ return err;
+ }
+
// End of file
--- a/contentcontrolsrv/hsccclient/hsccproviderclient/inc/hsccproviderclient.h Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/hsccclient/hsccproviderclient/inc/hsccproviderclient.h Fri Mar 12 15:43:54 2010 +0200
@@ -106,84 +106,112 @@
*
*/
void HandleWidgetListReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleRegisterObserverNtfL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleUnregisterObserverNtfL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleAddWidgetReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleRemoveWidgetReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleViewListReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleAddViewReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleRemoveViewReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleActivateViewReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleActiveViewReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleAppListReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleActivateAppReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleActiveAppReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
*
*/
void HandleNotSupportedReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
/**
@@ -196,6 +224,8 @@
*
*/
void SendRespL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage );
private: // Data
--- a/contentcontrolsrv/hsccclient/hsccproviderclient/src/hsccproviderclient.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/hsccclient/hsccproviderclient/src/hsccproviderclient.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -102,12 +102,32 @@
void CHsCcProviderClient::RunL()
{
- if ( !iStatus.Int() )
+ TInt err( iStatus.Int() );
+ HBufC8* header( NULL );
+ TPtr8 headerPtr( NULL, 0 );
+ TUint32 sender( 0 );
+ TUint32 receiver( 0 );
+ if ( !err )
+ {
+ // Read API request header
+ header = iApiHeader->AllocL();
+ CleanupStack::PushL( header );
+ headerPtr.Set( header->Des() );
+ // Read sender
+ sender = iPckgSender();
+ // Read receiver
+ receiver = iPckgReceiver();
+ }
+
+ // Receive next API request
+ WaitForApiReqL();
+
+ if ( !err )
{
// Get received message header
CCcSrvMsg* message = CCcSrvMsg::NewL();
CleanupStack::PushL( message );
- RDesReadStream stream( iApiHeaderPtr );
+ RDesReadStream stream( headerPtr );
CleanupClosePushL( stream );
message->InternalizeHeaderL( stream );
CleanupStack::PopAndDestroy( &stream );
@@ -127,54 +147,54 @@
switch ( message->MsgId() )
{
case ECcRegisterObserverNtf:
- HandleRegisterObserverNtfL( *message );
+ HandleRegisterObserverNtfL( sender, receiver, *message );
break;
case ECcUnregisterObserverNtf:
- HandleUnregisterObserverNtfL( *message );
+ HandleUnregisterObserverNtfL( sender, receiver, *message );
break;
case EHsCcWidgetListReq:
- HandleWidgetListReqL( *message );
+ HandleWidgetListReqL( sender, receiver, *message );
break;
case EHsCcAddWidgetReq:
- HandleAddWidgetReqL( *message );
+ HandleAddWidgetReqL( sender, receiver, *message );
break;
case EHsCcRemoveWidgetReq:
- HandleRemoveWidgetReqL( *message );
+ HandleRemoveWidgetReqL( sender, receiver, *message );
break;
case EHsCcViewListReq:
- HandleViewListReqL( *message );
+ HandleViewListReqL( sender, receiver, *message );
break;
case EHsCcAddViewReq:
- HandleAddViewReqL( *message );
+ HandleAddViewReqL( sender, receiver, *message );
break;
case EHsCcRemoveViewReq:
- HandleRemoveViewReqL( *message );
+ HandleRemoveViewReqL( sender, receiver, *message );
break;
case EHsCcActivateViewReq:
- HandleActivateViewReqL( *message );
+ HandleActivateViewReqL( sender, receiver, *message );
break;
case EHsCcAppListReq:
- HandleAppListReqL( *message );
+ HandleAppListReqL( sender, receiver, *message );
break;
case EHsCcActivateAppReq:
- HandleActivateAppReqL( *message );
+ HandleActivateAppReqL( sender, receiver, *message );
break;
case EHsCcActiveAppReq:
- HandleActiveAppReqL( *message );
+ HandleActiveAppReqL( sender, receiver, *message );
break;
case EHsCcActiveViewReq:
- HandleActiveViewReqL( *message );
+ HandleActiveViewReqL( sender, receiver, *message );
break;
default:
- HandleNotSupportedReqL( *message );
+ HandleNotSupportedReqL( sender, receiver, *message );
break;
}
CleanupStack::PopAndDestroy( message );
}
-
- // Receive next API request
- WaitForApiReqL();
-
+ if ( header )
+ {
+ CleanupStack::PopAndDestroy( header );
+ }
}
// -----------------------------------------------------------------------------
@@ -255,6 +275,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleRegisterObserverNtfL(
+ TUint32 /* aSender */,
+ TUint32 /* aReceiver */,
CCcSrvMsg& /* aMessage */ )
{
TUint32 observer = iPckgSender();
@@ -266,6 +288,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleUnregisterObserverNtfL(
+ TUint32 /* aSender */,
+ TUint32 /* aReceiver */,
CCcSrvMsg& /* aMessage */ )
{
TUint32 observer = iPckgSender();
@@ -284,12 +308,36 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleWidgetListReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
+
+ TInt err( KErrNone );
// Get widget list
CHsContentInfoArray* widgets = CHsContentInfoArray::NewL();
CleanupStack::PushL( widgets );
- TInt err = iController.WidgetListL( *widgets );
+
+ 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 widgets included in the defined
+ // application configuration or view
+ err = iController.WidgetListL( *info, *widgets );
+
+ CleanupStack::PopAndDestroy( info );
+ }
+ else
+ {
+ // Get list of available widgets
+ err = iController.WidgetListL( *widgets );
+ }
// Create and send WidgetListResp
CCcSrvMsg* message = CCcSrvMsg::NewL();
@@ -309,7 +357,7 @@
CleanupStack::PopAndDestroy( dataBuf );
}
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
CleanupStack::PopAndDestroy( widgets );
@@ -321,6 +369,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleAddWidgetReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
TInt err( KErrNone );
@@ -352,7 +402,7 @@
message->SetStatus( err );
message->SetData( KNullDesC8() );
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
}
@@ -362,6 +412,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleRemoveWidgetReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
TInt err( KErrNone );
@@ -393,7 +445,7 @@
message->SetStatus( err );
message->SetData( KNullDesC8() );
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
}
@@ -403,6 +455,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleViewListReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
// Get view list
@@ -428,7 +482,7 @@
CleanupStack::PopAndDestroy( dataBuf );
}
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
CleanupStack::PopAndDestroy( views );
@@ -440,6 +494,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleAddViewReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
TInt err( KErrNone );
@@ -471,7 +527,7 @@
message->SetStatus( err );
message->SetData( KNullDesC8() );
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
}
@@ -481,6 +537,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleRemoveViewReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
TInt err( KErrNone );
@@ -512,7 +570,7 @@
message->SetStatus( err );
message->SetData( KNullDesC8() );
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
}
@@ -522,6 +580,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleActivateViewReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
TInt err( KErrNone );
@@ -553,7 +613,7 @@
message->SetStatus( err );
message->SetData( KNullDesC8() );
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
}
@@ -563,6 +623,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleActiveViewReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
// Get active view
@@ -588,7 +650,7 @@
CleanupStack::PopAndDestroy( dataBuf );
}
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
CleanupStack::PopAndDestroy( view );
@@ -600,6 +662,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleAppListReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
// Get app list
@@ -624,7 +688,7 @@
CleanupStack::PopAndDestroy( dataBuf );
}
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
CleanupStack::PopAndDestroy( apps );
@@ -636,6 +700,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleActivateAppReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
TInt err( KErrNone );
@@ -667,7 +733,7 @@
message->SetStatus( err );
message->SetData( KNullDesC8() );
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
}
@@ -677,6 +743,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleActiveAppReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
// Get active application info
@@ -702,7 +770,7 @@
CleanupStack::PopAndDestroy( dataBuf );
}
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
CleanupStack::PopAndDestroy( app );
@@ -713,6 +781,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::HandleNotSupportedReqL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
// Create and send NotSupportedResp
@@ -723,7 +793,7 @@
message->SetStatus( KErrNone );
message->SetData( KNullDesC8() );
- SendRespL( *message );
+ SendRespL( aReceiver, aSender, *message );
CleanupStack::PopAndDestroy( message );
@@ -759,6 +829,8 @@
// -----------------------------------------------------------------------------
//
void CHsCcProviderClient::SendRespL(
+ TUint32 aSender,
+ TUint32 aReceiver,
CCcSrvMsg& aMessage )
{
HBufC8* msgBuf = aMessage.MarshalL();
@@ -767,7 +839,9 @@
msgPtr.Set( msgBuf->Des() );
TPckgBuf<TUint32> provider( ECcHomescreen );
- iSession.Send( ECcApiResp, provider, iPckgReceiver, iPckgSender, msgPtr );
+ TPckgBuf<TUint32> sender( aSender );
+ TPckgBuf<TUint32> receiver( aReceiver );
+ iSession.Send( ECcApiResp, provider, sender, receiver, msgPtr );
CleanupStack::PopAndDestroy( msgBuf );
}
--- a/contentcontrolsrv/hscontentinfo/src/hscontentinfoarray.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentcontrolsrv/hscontentinfo/src/hscontentinfoarray.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -32,9 +32,9 @@
//
EXPORT_C CHsContentInfoArray* CHsContentInfoArray::NewL()
{
- CHsContentInfoArray* self = new ( ELeave ) CHsContentInfoArray();
- CleanupStack::PushL( self );
- self->ConstructL();
+ CHsContentInfoArray* self = new ( ELeave ) CHsContentInfoArray();
+ CleanupStack::PushL( self );
+ self->ConstructL();
CleanupStack::Pop( self );
return self;
}
@@ -44,13 +44,13 @@
// -----------------------------------------------------------------------
//
EXPORT_C CHsContentInfoArray* CHsContentInfoArray::NewL( RReadStream& aStream )
- {
- CHsContentInfoArray* self = new ( ELeave ) CHsContentInfoArray();
- CleanupStack::PushL( self );
- self->InternalizeL( aStream );
- CleanupStack::Pop( self );
- return self;
- }
+ {
+ CHsContentInfoArray* self = new ( ELeave ) CHsContentInfoArray();
+ CleanupStack::PushL( self );
+ self->InternalizeL( aStream );
+ CleanupStack::Pop( self );
+ return self;
+ }
// -----------------------------------------------------------------------
// CHsContentInfoArray::ConstructL()
@@ -74,7 +74,7 @@
//
CHsContentInfoArray::~CHsContentInfoArray()
{
- iArray.ResetAndDestroy();
+ iArray.ResetAndDestroy();
}
// -----------------------------------------------------------------------
@@ -91,15 +91,15 @@
// -----------------------------------------------------------------------
//
EXPORT_C void CHsContentInfoArray::ExternalizeL( RWriteStream& aStream )
- {
- aStream.WriteInt16L( iArray.Count() );
-
- for( int i = 0; i < iArray.Count(); i++ )
- {
- CHsContentInfo* info = iArray[i];
- info->ExternalizeL( aStream );
- }
- }
+ {
+ aStream.WriteInt16L( iArray.Count() );
+
+ for( int i = 0; i < iArray.Count(); i++ )
+ {
+ CHsContentInfo* info = iArray[i];
+ info->ExternalizeL( aStream );
+ }
+ }
// -----------------------------------------------------------------------
@@ -107,15 +107,15 @@
// -----------------------------------------------------------------------
//
EXPORT_C void CHsContentInfoArray::InternalizeL( RReadStream& aStream )
- {
- TInt count = aStream.ReadInt16L();
-
- for( int i = 0; i < count; i++ )
- {
- CHsContentInfo* info = CHsContentInfo::NewL( aStream );
- iArray.AppendL( info );
- }
- }
+ {
+ TInt count = aStream.ReadInt16L();
+
+ for( int i = 0; i < count; i++ )
+ {
+ CHsContentInfo* info = CHsContentInfo::NewL( aStream );
+ iArray.AppendL( info );
+ }
+ }
// -----------------------------------------------------------------------
// CHsContentInfoArray::Size()
@@ -123,7 +123,7 @@
//
EXPORT_C TInt CHsContentInfoArray::Size( )
{
- TInt size( 0 );
+ TInt size( sizeof( TInt16 ) );
for ( TInt i = 0; i < iArray.Count(); i++ )
{
size = size + iArray[ i ]->Size();
--- a/contentpublishingsrv/contentpublishingserver/cpserver/group/cpserver.mmp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/group/cpserver.mmp Fri Mar 12 15:43:54 2010 +0200
@@ -51,6 +51,8 @@
LIBRARY cputils.lib
LIBRARY cpstorage.lib
LIBRARY inetprotutil.lib
+LIBRARY MemMan.lib
+
#ifdef CONTENT_PUBLISHER_DEBUG
LIBRARY cpdebug.lib
#endif
--- a/contentpublishingsrv/contentpublishingserver/cpserver/inc/cpglobals.h Fri Feb 19 23:07:29 2010 +0200
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/inc/cpglobals.h Fri Mar 12 15:43:54 2010 +0200
@@ -44,6 +44,7 @@
const TInt KNameArgumentsLimit = 5;
const TInt KThreadNameLimit = 64;
const TUint KDisablePersist = 0x1000;
+const TUint KDisableNotification = 0x2000;
_LIT( KService, "CP Service" );
--- a/contentpublishingsrv/contentpublishingserver/cpserver/inc/cpserverdef.h Fri Feb 19 23:07:29 2010 +0200
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/inc/cpserverdef.h Fri Mar 12 15:43:54 2010 +0200
@@ -71,7 +71,7 @@
const TUint KDescriptorPosition( 0);
const TUint KReturnPosition( 1);
-const TUint KInfoPosition( 2);
+const TUint KOptionsPosition( 2);
const TUint KTransactionPosition( 3);
const TBool KActive( ETrue );
const TBool KInActive( EFalse );
--- a/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserver.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserver.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -15,7 +15,7 @@
*
*/
-
+#include <mw/memorymanager.h>
#include <liwcommon.h>
#include <ecom/ecom.h>
#include <fbs.h>
@@ -387,7 +387,12 @@
//
TInt E32Main()
{
- return CCPServer::ThreadStart( );
+ RAllocator* iAllocator = MemoryManager::SwitchToFastAllocator();
+
+ //Get the return value (needs to call CloseFastAllocator() before return)
+ TInt iReturnValue = CCPServer::ThreadStart( );
+ MemoryManager::CloseFastAllocator(iAllocator);
+ return iReturnValue;
}
// End of File
--- a/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/contentpublishingsrv/contentpublishingserver/cpserver/src/cpserversession.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -284,13 +284,19 @@
{
TInt error(KErrNone);
CP_DEBUG( _L8("CCPServerSession::ExecuteActionSizeL()" ) );
+
+ TUint options = static_cast<TUint>( aMessage.Int2() ); // 2 == KOptionsPosition
+
CCPLiwMap* map = UnpackFromClientLC( aMessage );
CLiwGenericParamList* paramList = CLiwGenericParamList::NewLC( );
CLiwDefaultList* list = CLiwDefaultList::NewLC();
error = iDataManager->GetActionL( *map, *paramList, list );
//we notify apart from action execution result. So in fact
- //notification means there was an attempt to execute action
- iDataManager->HandleChangeL( list );
+ //notification means there was an attempt to execute action
+ if ( !( options & KDisableNotification ) )
+ {
+ iDataManager->HandleChangeL( list );
+ }
User::LeaveIfError( error );
ExecuteL( *paramList );
CleanupStack::PopAndDestroy( list );
--- a/homescreenpluginsrv/homescreen_settings_api/bwins/hspluginsettings.def Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/homescreen_settings_api/bwins/hspluginsettings.def Fri Mar 12 15:43:54 2010 +0200
@@ -3,10 +3,10 @@
?NewLC@CPluginMap@HSPluginSettingsIf@@SAPAV12@XZ @ 2 NONAME ; class HSPluginSettingsIf::CPluginMap * HSPluginSettingsIf::CPluginMap::NewLC(void)
?SetPluginUidL@CPluginMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 3 NONAME ; class HSPluginSettingsIf::CPluginMap & HSPluginSettingsIf::CPluginMap::SetPluginUidL(class TDesC8 const &)
?NewL@CItemMap@HSPluginSettingsIf@@SAPAV12@XZ @ 4 NONAME ; class HSPluginSettingsIf::CItemMap * HSPluginSettingsIf::CItemMap::NewL(void)
- ?NewLC@CHomescreenSettings@HSPluginSettingsIf@@SAPAV12@ABVTDesC8@@0PAVMHomeScreenSettingsObserver@2@@Z @ 5 NONAME ; class HSPluginSettingsIf::CHomescreenSettings * HSPluginSettingsIf::CHomescreenSettings::NewLC(class TDesC8 const &, class TDesC8 const &, class HSPluginSettingsIf::MHomeScreenSettingsObserver *)
- ?Name@CPluginInfo@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 6 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPluginInfo::Name(void) const
- ??1CItemMap@HSPluginSettingsIf@@UAE@XZ @ 7 NONAME ; HSPluginSettingsIf::CItemMap::~CItemMap(void)
- ?NewLC@CHspsConfiguration@HSPluginSettingsIf@@SAPAV12@XZ @ 8 NONAME ; class HSPluginSettingsIf::CHspsConfiguration * HSPluginSettingsIf::CHspsConfiguration::NewLC(void)
+ ?Name@CPluginInfo@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 5 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPluginInfo::Name(void) const
+ ??1CItemMap@HSPluginSettingsIf@@UAE@XZ @ 6 NONAME ; HSPluginSettingsIf::CItemMap::~CItemMap(void)
+ ?NewLC@CHspsConfiguration@HSPluginSettingsIf@@SAPAV12@XZ @ 7 NONAME ; class HSPluginSettingsIf::CHspsConfiguration * HSPluginSettingsIf::CHspsConfiguration::NewLC(void)
+ ?InitializeL@CHomescreenSettings@HSPluginSettingsIf@@SAXABVTDesC8@@@Z @ 8 NONAME ; void HSPluginSettingsIf::CHomescreenSettings::InitializeL(class TDesC8 const &)
?AddObjectMapL@CHspsConfiguration@HSPluginSettingsIf@@QAEAAV12@PAVCObjectMap@2@@Z @ 9 NONAME ; class HSPluginSettingsIf::CHspsConfiguration & HSPluginSettingsIf::CHspsConfiguration::AddObjectMapL(class HSPluginSettingsIf::CObjectMap *)
?Value@CPropertyMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 10 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPropertyMap::Value(void) const
?PluginInfo@CHspsConfiguration@HSPluginSettingsIf@@QAEAAVCPluginInfo@2@XZ @ 11 NONAME ; class HSPluginSettingsIf::CPluginInfo & HSPluginSettingsIf::CHspsConfiguration::PluginInfo(void)
@@ -22,43 +22,45 @@
?PluginUid@CPluginMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 21 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPluginMap::PluginUid(void) const
?PluginId@CPluginMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 22 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPluginMap::PluginId(void) const
?SetMediaTypeL@CObjectMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 23 NONAME ; class HSPluginSettingsIf::CObjectMap & HSPluginSettingsIf::CObjectMap::SetMediaTypeL(class TDesC8 const &)
- ?NewL@CHspsConfiguration@HSPluginSettingsIf@@SAPAV12@XZ @ 24 NONAME ; class HSPluginSettingsIf::CHspsConfiguration * HSPluginSettingsIf::CHspsConfiguration::NewL(void)
- ?GetSettingsL@CHomescreenSettings@HSPluginSettingsIf@@UAEHABVTDesC8@@AAV?$RPointerArray@VCItemMap@HSPluginSettingsIf@@@@@Z @ 25 NONAME ; int HSPluginSettingsIf::CHomescreenSettings::GetSettingsL(class TDesC8 const &, class RPointerArray<class HSPluginSettingsIf::CItemMap> &)
- ?NewLC@CPropertyMap@HSPluginSettingsIf@@SAPAV12@XZ @ 26 NONAME ; class HSPluginSettingsIf::CPropertyMap * HSPluginSettingsIf::CPropertyMap::NewLC(void)
- ?NameL@CObjectMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 27 NONAME ; class TDesC8 const & HSPluginSettingsIf::CObjectMap::NameL(void) const
- ?SetItemNameL@CItemMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 28 NONAME ; class HSPluginSettingsIf::CItemMap & HSPluginSettingsIf::CItemMap::SetItemNameL(class TDesC8 const &)
- ?SetUidL@CPluginInfo@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 29 NONAME ; class HSPluginSettingsIf::CPluginInfo & HSPluginSettingsIf::CPluginInfo::SetUidL(class TDesC8 const &)
- ?Properties@CItemMap@HSPluginSettingsIf@@QBEAAV?$RPointerArray@VCPropertyMap@HSPluginSettingsIf@@@@XZ @ 30 NONAME ; class RPointerArray<class HSPluginSettingsIf::CPropertyMap> & HSPluginSettingsIf::CItemMap::Properties(void) const
- ?NewL@CPropertyMap@HSPluginSettingsIf@@SAPAV12@XZ @ 31 NONAME ; class HSPluginSettingsIf::CPropertyMap * HSPluginSettingsIf::CPropertyMap::NewL(void)
- ?Type@CPluginInfo@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 32 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPluginInfo::Type(void) const
- ??1CPluginMap@HSPluginSettingsIf@@UAE@XZ @ 33 NONAME ; HSPluginSettingsIf::CPluginMap::~CPluginMap(void)
+ ?Instance@CHomescreenSettings@HSPluginSettingsIf@@SAPAV12@XZ @ 24 NONAME ; class HSPluginSettingsIf::CHomescreenSettings * HSPluginSettingsIf::CHomescreenSettings::Instance(void)
+ ?NewL@CHspsConfiguration@HSPluginSettingsIf@@SAPAV12@XZ @ 25 NONAME ; class HSPluginSettingsIf::CHspsConfiguration * HSPluginSettingsIf::CHspsConfiguration::NewL(void)
+ ?GetSettingsL@CHomescreenSettings@HSPluginSettingsIf@@UAEHABVTDesC8@@AAV?$RPointerArray@VCItemMap@HSPluginSettingsIf@@@@@Z @ 26 NONAME ; int HSPluginSettingsIf::CHomescreenSettings::GetSettingsL(class TDesC8 const &, class RPointerArray<class HSPluginSettingsIf::CItemMap> &)
+ ?NewLC@CPropertyMap@HSPluginSettingsIf@@SAPAV12@XZ @ 27 NONAME ; class HSPluginSettingsIf::CPropertyMap * HSPluginSettingsIf::CPropertyMap::NewLC(void)
+ ?NameL@CObjectMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 28 NONAME ; class TDesC8 const & HSPluginSettingsIf::CObjectMap::NameL(void) const
+ ?SetItemNameL@CItemMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 29 NONAME ; class HSPluginSettingsIf::CItemMap & HSPluginSettingsIf::CItemMap::SetItemNameL(class TDesC8 const &)
+ ?SetUidL@CPluginInfo@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 30 NONAME ; class HSPluginSettingsIf::CPluginInfo & HSPluginSettingsIf::CPluginInfo::SetUidL(class TDesC8 const &)
+ ?Properties@CItemMap@HSPluginSettingsIf@@QBEAAV?$RPointerArray@VCPropertyMap@HSPluginSettingsIf@@@@XZ @ 31 NONAME ; class RPointerArray<class HSPluginSettingsIf::CPropertyMap> & HSPluginSettingsIf::CItemMap::Properties(void) const
+ ?NewL@CPropertyMap@HSPluginSettingsIf@@SAPAV12@XZ @ 32 NONAME ; class HSPluginSettingsIf::CPropertyMap * HSPluginSettingsIf::CPropertyMap::NewL(void)
+ ?Type@CPluginInfo@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 33 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPluginInfo::Type(void) const
?MediaType@CObjectMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 34 NONAME ; class TDesC8 const & HSPluginSettingsIf::CObjectMap::MediaType(void) const
- ?SetPluginIdL@CPluginMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 35 NONAME ; class HSPluginSettingsIf::CPluginMap & HSPluginSettingsIf::CPluginMap::SetPluginIdL(class TDesC8 const &)
- ?Resources@CHspsConfiguration@HSPluginSettingsIf@@QAEAAV?$RPointerArray@VCObjectMap@HSPluginSettingsIf@@@@XZ @ 36 NONAME ; class RPointerArray<class HSPluginSettingsIf::CObjectMap> & HSPluginSettingsIf::CHspsConfiguration::Resources(void)
- ?Path@CObjectMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 37 NONAME ; class TDesC8 const & HSPluginSettingsIf::CObjectMap::Path(void) const
- ?SetSettingsL@CHomescreenSettings@HSPluginSettingsIf@@UAEHABVTDesC8@@ABV?$RPointerArray@VCItemMap@HSPluginSettingsIf@@@@H@Z @ 38 NONAME ; int HSPluginSettingsIf::CHomescreenSettings::SetSettingsL(class TDesC8 const &, class RPointerArray<class HSPluginSettingsIf::CItemMap> const &, int)
- ?Name@CPropertyMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 39 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPropertyMap::Name(void) const
- ?NewL@CObjectMap@HSPluginSettingsIf@@SAPAV12@XZ @ 40 NONAME ; class HSPluginSettingsIf::CObjectMap * HSPluginSettingsIf::CObjectMap::NewL(void)
- ?NewL@CPluginMap@HSPluginSettingsIf@@SAPAV12@XZ @ 41 NONAME ; class HSPluginSettingsIf::CPluginMap * HSPluginSettingsIf::CPluginMap::NewL(void)
- ?SetPathL@CObjectMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 42 NONAME ; class HSPluginSettingsIf::CObjectMap & HSPluginSettingsIf::CObjectMap::SetPathL(class TDesC8 const &)
- ?PluginMaps@CHspsConfiguration@HSPluginSettingsIf@@QAEAAV?$RPointerArray@VCPluginMap@HSPluginSettingsIf@@@@XZ @ 43 NONAME ; class RPointerArray<class HSPluginSettingsIf::CPluginMap> & HSPluginSettingsIf::CHspsConfiguration::PluginMaps(void)
- ?NewL@CHomescreenSettings@HSPluginSettingsIf@@SAPAV12@ABVTDesC8@@0PAVMHomeScreenSettingsObserver@2@@Z @ 44 NONAME ; class HSPluginSettingsIf::CHomescreenSettings * HSPluginSettingsIf::CHomescreenSettings::NewL(class TDesC8 const &, class TDesC8 const &, class HSPluginSettingsIf::MHomeScreenSettingsObserver *)
+ ??1CPluginMap@HSPluginSettingsIf@@UAE@XZ @ 35 NONAME ; HSPluginSettingsIf::CPluginMap::~CPluginMap(void)
+ ?SetPluginIdL@CPluginMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 36 NONAME ; class HSPluginSettingsIf::CPluginMap & HSPluginSettingsIf::CPluginMap::SetPluginIdL(class TDesC8 const &)
+ ?Resources@CHspsConfiguration@HSPluginSettingsIf@@QAEAAV?$RPointerArray@VCObjectMap@HSPluginSettingsIf@@@@XZ @ 37 NONAME ; class RPointerArray<class HSPluginSettingsIf::CObjectMap> & HSPluginSettingsIf::CHspsConfiguration::Resources(void)
+ ?Path@CObjectMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 38 NONAME ; class TDesC8 const & HSPluginSettingsIf::CObjectMap::Path(void) const
+ ?SetSettingsL@CHomescreenSettings@HSPluginSettingsIf@@UAEHABVTDesC8@@ABV?$RPointerArray@VCItemMap@HSPluginSettingsIf@@@@H@Z @ 39 NONAME ; int HSPluginSettingsIf::CHomescreenSettings::SetSettingsL(class TDesC8 const &, class RPointerArray<class HSPluginSettingsIf::CItemMap> const &, int)
+ ?Name@CPropertyMap@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 40 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPropertyMap::Name(void) const
+ ?NewL@CObjectMap@HSPluginSettingsIf@@SAPAV12@XZ @ 41 NONAME ; class HSPluginSettingsIf::CObjectMap * HSPluginSettingsIf::CObjectMap::NewL(void)
+ ?NewL@CPluginMap@HSPluginSettingsIf@@SAPAV12@XZ @ 42 NONAME ; class HSPluginSettingsIf::CPluginMap * HSPluginSettingsIf::CPluginMap::NewL(void)
+ ?SetPathL@CObjectMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 43 NONAME ; class HSPluginSettingsIf::CObjectMap & HSPluginSettingsIf::CObjectMap::SetPathL(class TDesC8 const &)
+ ?PluginMaps@CHspsConfiguration@HSPluginSettingsIf@@QAEAAV?$RPointerArray@VCPluginMap@HSPluginSettingsIf@@@@XZ @ 44 NONAME ; class RPointerArray<class HSPluginSettingsIf::CPluginMap> & HSPluginSettingsIf::CHspsConfiguration::PluginMaps(void)
??1CPropertyMap@HSPluginSettingsIf@@UAE@XZ @ 45 NONAME ; HSPluginSettingsIf::CPropertyMap::~CPropertyMap(void)
?SetInterfaceL@CPluginInfo@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 46 NONAME ; class HSPluginSettingsIf::CPluginInfo & HSPluginSettingsIf::CPluginInfo::SetInterfaceL(class TDesC8 const &)
?ConfId@CHspsConfiguration@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 47 NONAME ; class TDesC8 const & HSPluginSettingsIf::CHspsConfiguration::ConfId(void) const
?Uid@CPluginInfo@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 48 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPluginInfo::Uid(void) const
- ?SetValueL@CPropertyMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 49 NONAME ; class HSPluginSettingsIf::CPropertyMap & HSPluginSettingsIf::CPropertyMap::SetValueL(class TDesC8 const &)
- ?Interface@CPluginInfo@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 50 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPluginInfo::Interface(void) const
- ?SetTypeL@CPluginInfo@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 51 NONAME ; class HSPluginSettingsIf::CPluginInfo & HSPluginSettingsIf::CPluginInfo::SetTypeL(class TDesC8 const &)
- ??1CHomescreenSettings@HSPluginSettingsIf@@UAE@XZ @ 52 NONAME ; HSPluginSettingsIf::CHomescreenSettings::~CHomescreenSettings(void)
- ?SetNameL@CPluginInfo@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 53 NONAME ; class HSPluginSettingsIf::CPluginInfo & HSPluginSettingsIf::CPluginInfo::SetNameL(class TDesC8 const &)
- ?NewL@CPluginInfo@HSPluginSettingsIf@@SAPAV12@XZ @ 54 NONAME ; class HSPluginSettingsIf::CPluginInfo * HSPluginSettingsIf::CPluginInfo::NewL(void)
- ?SetItemIdL@CItemMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 55 NONAME ; class HSPluginSettingsIf::CItemMap & HSPluginSettingsIf::CItemMap::SetItemIdL(class TDesC8 const &)
- ?NewLC@CItemMap@HSPluginSettingsIf@@SAPAV12@XZ @ 56 NONAME ; class HSPluginSettingsIf::CItemMap * HSPluginSettingsIf::CItemMap::NewLC(void)
- ?AddItemMapL@CHspsConfiguration@HSPluginSettingsIf@@QAEAAV12@PAVCItemMap@2@@Z @ 57 NONAME ; class HSPluginSettingsIf::CHspsConfiguration & HSPluginSettingsIf::CHspsConfiguration::AddItemMapL(class HSPluginSettingsIf::CItemMap *)
- ??1CHspsConfiguration@HSPluginSettingsIf@@UAE@XZ @ 58 NONAME ; HSPluginSettingsIf::CHspsConfiguration::~CHspsConfiguration(void)
- ?SetConfIdL@CHspsConfiguration@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 59 NONAME ; class HSPluginSettingsIf::CHspsConfiguration & HSPluginSettingsIf::CHspsConfiguration::SetConfIdL(class TDesC8 const &)
- ?SetNameL@CPropertyMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 60 NONAME ; class HSPluginSettingsIf::CPropertyMap & HSPluginSettingsIf::CPropertyMap::SetNameL(class TDesC8 const &)
- ?SetNameL@CObjectMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 61 NONAME ; class HSPluginSettingsIf::CObjectMap & HSPluginSettingsIf::CObjectMap::SetNameL(class TDesC8 const &)
- ??1CObjectMap@HSPluginSettingsIf@@UAE@XZ @ 62 NONAME ; HSPluginSettingsIf::CObjectMap::~CObjectMap(void)
+ ?AddObserverL@CHomescreenSettings@HSPluginSettingsIf@@QAEXPAVMHomeScreenSettingsObserver@2@@Z @ 49 NONAME ; void HSPluginSettingsIf::CHomescreenSettings::AddObserverL(class HSPluginSettingsIf::MHomeScreenSettingsObserver *)
+ ?UnInitialize@CHomescreenSettings@HSPluginSettingsIf@@SAXXZ @ 50 NONAME ; void HSPluginSettingsIf::CHomescreenSettings::UnInitialize(void)
+ ?SetValueL@CPropertyMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 51 NONAME ; class HSPluginSettingsIf::CPropertyMap & HSPluginSettingsIf::CPropertyMap::SetValueL(class TDesC8 const &)
+ ?Interface@CPluginInfo@HSPluginSettingsIf@@QBEABVTDesC8@@XZ @ 52 NONAME ; class TDesC8 const & HSPluginSettingsIf::CPluginInfo::Interface(void) const
+ ?SetTypeL@CPluginInfo@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 53 NONAME ; class HSPluginSettingsIf::CPluginInfo & HSPluginSettingsIf::CPluginInfo::SetTypeL(class TDesC8 const &)
+ ?SetNameL@CPluginInfo@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 54 NONAME ; class HSPluginSettingsIf::CPluginInfo & HSPluginSettingsIf::CPluginInfo::SetNameL(class TDesC8 const &)
+ ?NewL@CPluginInfo@HSPluginSettingsIf@@SAPAV12@XZ @ 55 NONAME ; class HSPluginSettingsIf::CPluginInfo * HSPluginSettingsIf::CPluginInfo::NewL(void)
+ ?SetItemIdL@CItemMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 56 NONAME ; class HSPluginSettingsIf::CItemMap & HSPluginSettingsIf::CItemMap::SetItemIdL(class TDesC8 const &)
+ ?NewLC@CItemMap@HSPluginSettingsIf@@SAPAV12@XZ @ 57 NONAME ; class HSPluginSettingsIf::CItemMap * HSPluginSettingsIf::CItemMap::NewLC(void)
+ ?AddItemMapL@CHspsConfiguration@HSPluginSettingsIf@@QAEAAV12@PAVCItemMap@2@@Z @ 58 NONAME ; class HSPluginSettingsIf::CHspsConfiguration & HSPluginSettingsIf::CHspsConfiguration::AddItemMapL(class HSPluginSettingsIf::CItemMap *)
+ ??1CHspsConfiguration@HSPluginSettingsIf@@UAE@XZ @ 59 NONAME ; HSPluginSettingsIf::CHspsConfiguration::~CHspsConfiguration(void)
+ ?RemoveObserver@CHomescreenSettings@HSPluginSettingsIf@@QAEXPAVMHomeScreenSettingsObserver@2@@Z @ 60 NONAME ; void HSPluginSettingsIf::CHomescreenSettings::RemoveObserver(class HSPluginSettingsIf::MHomeScreenSettingsObserver *)
+ ?SetConfIdL@CHspsConfiguration@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 61 NONAME ; class HSPluginSettingsIf::CHspsConfiguration & HSPluginSettingsIf::CHspsConfiguration::SetConfIdL(class TDesC8 const &)
+ ?SetNameL@CPropertyMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 62 NONAME ; class HSPluginSettingsIf::CPropertyMap & HSPluginSettingsIf::CPropertyMap::SetNameL(class TDesC8 const &)
+ ?SetNameL@CObjectMap@HSPluginSettingsIf@@QAEAAV12@ABVTDesC8@@@Z @ 63 NONAME ; class HSPluginSettingsIf::CObjectMap & HSPluginSettingsIf::CObjectMap::SetNameL(class TDesC8 const &)
+ ??1CObjectMap@HSPluginSettingsIf@@UAE@XZ @ 64 NONAME ; HSPluginSettingsIf::CObjectMap::~CObjectMap(void)
--- a/homescreenpluginsrv/homescreen_settings_api/eabi/hspluginsettings.def Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/homescreen_settings_api/eabi/hspluginsettings.def Fri Mar 12 15:43:54 2010 +0200
@@ -44,13 +44,13 @@
_ZN18HSPluginSettingsIf18CHspsConfigurationD0Ev @ 43 NONAME
_ZN18HSPluginSettingsIf18CHspsConfigurationD1Ev @ 44 NONAME
_ZN18HSPluginSettingsIf18CHspsConfigurationD2Ev @ 45 NONAME
- _ZN18HSPluginSettingsIf19CHomescreenSettings12GetSettingsLERK6TDesC8R13RPointerArrayINS_8CItemMapEE @ 46 NONAME
- _ZN18HSPluginSettingsIf19CHomescreenSettings12SetSettingsLERK6TDesC8RK13RPointerArrayINS_8CItemMapEEi @ 47 NONAME
- _ZN18HSPluginSettingsIf19CHomescreenSettings4NewLERK6TDesC8S3_PNS_27MHomeScreenSettingsObserverE @ 48 NONAME
- _ZN18HSPluginSettingsIf19CHomescreenSettings5NewLCERK6TDesC8S3_PNS_27MHomeScreenSettingsObserverE @ 49 NONAME
- _ZN18HSPluginSettingsIf19CHomescreenSettingsD0Ev @ 50 NONAME
- _ZN18HSPluginSettingsIf19CHomescreenSettingsD1Ev @ 51 NONAME
- _ZN18HSPluginSettingsIf19CHomescreenSettingsD2Ev @ 52 NONAME
+ _ZN18HSPluginSettingsIf19CHomescreenSettings11InitializeLERK6TDesC8 @ 46 NONAME
+ _ZN18HSPluginSettingsIf19CHomescreenSettings12AddObserverLEPNS_27MHomeScreenSettingsObserverE @ 47 NONAME
+ _ZN18HSPluginSettingsIf19CHomescreenSettings12GetSettingsLERK6TDesC8R13RPointerArrayINS_8CItemMapEE @ 48 NONAME
+ _ZN18HSPluginSettingsIf19CHomescreenSettings12SetSettingsLERK6TDesC8RK13RPointerArrayINS_8CItemMapEEi @ 49 NONAME
+ _ZN18HSPluginSettingsIf19CHomescreenSettings12UnInitializeEv @ 50 NONAME
+ _ZN18HSPluginSettingsIf19CHomescreenSettings14RemoveObserverEPNS_27MHomeScreenSettingsObserverE @ 51 NONAME
+ _ZN18HSPluginSettingsIf19CHomescreenSettings8InstanceEv @ 52 NONAME
_ZN18HSPluginSettingsIf8CItemMap10SetItemIdLERK6TDesC8 @ 53 NONAME
_ZN18HSPluginSettingsIf8CItemMap12SetItemNameLERK6TDesC8 @ 54 NONAME
_ZN18HSPluginSettingsIf8CItemMap15AddPropertyMapLEPNS_12CPropertyMapE @ 55 NONAME
@@ -80,15 +80,13 @@
_ZTIN18HSPluginSettingsIf11CPluginInfoE @ 79 NONAME
_ZTIN18HSPluginSettingsIf12CPropertyMapE @ 80 NONAME
_ZTIN18HSPluginSettingsIf18CHspsConfigurationE @ 81 NONAME
- _ZTIN18HSPluginSettingsIf19CHomescreenSettingsE @ 82 NONAME
- _ZTIN18HSPluginSettingsIf8CItemMapE @ 83 NONAME
- _ZTVN18HSPluginSettingsIf10CObjectMapE @ 84 NONAME
- _ZTVN18HSPluginSettingsIf10CPluginMapE @ 85 NONAME
- _ZTVN18HSPluginSettingsIf11CPluginInfoE @ 86 NONAME
- _ZTVN18HSPluginSettingsIf12CPropertyMapE @ 87 NONAME
- _ZTVN18HSPluginSettingsIf18CHspsConfigurationE @ 88 NONAME
- _ZTVN18HSPluginSettingsIf19CHomescreenSettingsE @ 89 NONAME
- _ZTVN18HSPluginSettingsIf8CItemMapE @ 90 NONAME
- _ZThn8_N18HSPluginSettingsIf19CHomescreenSettings12GetSettingsLERK6TDesC8R13RPointerArrayINS_8CItemMapEE @ 91 NONAME
- _ZThn8_N18HSPluginSettingsIf19CHomescreenSettings12SetSettingsLERK6TDesC8RK13RPointerArrayINS_8CItemMapEEi @ 92 NONAME
+ _ZTIN18HSPluginSettingsIf8CItemMapE @ 82 NONAME
+ _ZTVN18HSPluginSettingsIf10CObjectMapE @ 83 NONAME
+ _ZTVN18HSPluginSettingsIf10CPluginMapE @ 84 NONAME
+ _ZTVN18HSPluginSettingsIf11CPluginInfoE @ 85 NONAME
+ _ZTVN18HSPluginSettingsIf12CPropertyMapE @ 86 NONAME
+ _ZTVN18HSPluginSettingsIf18CHspsConfigurationE @ 87 NONAME
+ _ZTVN18HSPluginSettingsIf8CItemMapE @ 88 NONAME
+ _ZThn8_N18HSPluginSettingsIf19CHomescreenSettings12GetSettingsLERK6TDesC8R13RPointerArrayINS_8CItemMapEE @ 89 NONAME
+ _ZThn8_N18HSPluginSettingsIf19CHomescreenSettings12SetSettingsLERK6TDesC8RK13RPointerArrayINS_8CItemMapEEi @ 90 NONAME
--- a/homescreenpluginsrv/homescreen_settings_api/src/hspluginsettings.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/homescreen_settings_api/src/hspluginsettings.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -23,19 +23,14 @@
#include <hspluginsettings.h>
#include "hspsconfiguration.h"
-//#include "pluginmap.h"
#include "itemmap.h"
#include "propertymap.h"
-//#include "objectmap.h"
-//#include "plugininfo.h"
#include <mhomescreensettingsif.h>
#include <mhomescreensettingsobserver.h>
_LIT8( KHSPS, "Service.HSPS" );
_LIT8( KHSPSConfigurationIf, "IConfiguration" );
-
-
_LIT8( KHSPSCommandGetPluginConf, "GetPluginConf" );
_LIT8( KHSPSSetPluginSettings, "SetPluginSettings" );
_LIT8( KPluginConfKey, "pluginConf" );
@@ -46,7 +41,6 @@
_LIT8( KKeyStoringParams, "storingParams" );
-
_LIT8( KKeyStorePluginRefence, "storePluginConf" );
_LIT8( KKeyStoreAppConf, "storeAppConf" );
@@ -58,17 +52,115 @@
_LIT8( KRequestNotification, "RequestNotification" );
+_LIT8( KSettingsChanged, "PluginSettingsChanged" );
-_LIT8( KSettingsChanged, "PluginSettingsChanged" );
namespace HSPluginSettingsIf{
+NONSHARABLE_CLASS( CTlsEntry ): public CBase
+ {
+public:
+ /**
+ * Instance to home screen settings.
+ */
+ CHomescreenSettings* iInstance;
+
+ /**
+ * Reference count.
+ */
+ TInt iRefCount;
+ };
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CHomescreenSettings* CHomescreenSettings::Instance()
+ {
+ CHomescreenSettings* instance = NULL;
+
+ CTlsEntry* entry = static_cast<CTlsEntry*>( Dll::Tls() );
+ if( entry )
+ {
+ instance = entry->iInstance;
+ }
+
+ return instance;
+ }
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
//
-CHomescreenSettings::CHomescreenSettings(MHomeScreenSettingsObserver* aObserver, const TDesC8& aPluginId )
- : iObserver( aObserver ), iPluginId( aPluginId )
+EXPORT_C void CHomescreenSettings::InitializeL( const TDesC8& aAppUid )
+ {
+ CTlsEntry* entry = static_cast<CTlsEntry*>( Dll::Tls() );
+
+ if( !entry )
+ {
+ entry = new (ELeave) CTlsEntry();
+ entry->iInstance = NULL;
+ entry->iRefCount = 1;
+
+ CleanupStack::PushL( entry );
+ entry->iInstance = CHomescreenSettings::NewL( aAppUid );
+ CleanupStack::Pop( entry );
+
+ Dll::SetTls( entry );
+ }
+ else
+ {
+ entry->iRefCount++;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CHomescreenSettings::UnInitialize()
+ {
+ CTlsEntry* entry = static_cast<CTlsEntry*>( Dll::Tls() );
+
+ if( !entry )
+ {
+ return;
+ }
+
+ entry->iRefCount--;
+
+ if( entry->iRefCount == 0 )
+ {
+ delete entry->iInstance;
+ entry->iInstance = NULL;
+ delete entry;
+ Dll::SetTls( NULL );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CHomescreenSettings::AddObserverL( MHomeScreenSettingsObserver* aObserver )
+ {
+ if( iObservers.Find( aObserver ) == KErrNotFound )
+ {
+ iObservers.AppendL( aObserver );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CHomescreenSettings::RemoveObserver( MHomeScreenSettingsObserver* aObserver )
+ {
+ const TInt index = iObservers.Find( aObserver );
+ if( index != KErrNotFound )
+ {
+ iObservers.Remove( index );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+CHomescreenSettings::CHomescreenSettings()
{
}
@@ -118,48 +210,42 @@
inParamList.Reset();
outParamList.Reset();
- if( iObserver )
- {
- iTransactionId = -1;
- iHspsInterface->ExecuteCmdL( KRequestNotification,
- inParamList,
- outParamList,
- KLiwOptASyncronous,
- this );
- const TLiwGenericParam* outParam( NULL );
-
- TInt pos( 0 );
- outParam = outParamList.FindFirst( pos, _L8("status") );
-
- if ( outParam )
- {
- TInt retval;
- retval = outParam->Value().AsTInt32();
- if(retval == KErrNone )
- {
- pos = 0;
- outParam = outParamList.FindFirst( pos, _L8("TransactionID") );
- if( outParam )
- {
- retval = outParam->Value().AsTInt32();
- iTransactionId = retval;
- }
- }
-
- }
-
+ iTransactionId = -1;
+ iHspsInterface->ExecuteCmdL( KRequestNotification,
+ inParamList,
+ outParamList,
+ KLiwOptASyncronous,
+ this );
+
+ const TLiwGenericParam* outParam( NULL );
+
+ pos = 0;
+ outParam = outParamList.FindFirst( pos, _L8("status") );
+
+ if( outParam )
+ {
+ TInt retval;
+ retval = outParam->Value().AsTInt32();
+ if( retval == KErrNone )
+ {
+ pos = 0;
+ outParam = outParamList.FindFirst( pos, _L8( "TransactionID" ) );
+ if( outParam )
+ {
+ retval = outParam->Value().AsTInt32();
+ iTransactionId = retval;
+ }
+ }
}
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
//
-EXPORT_C CHomescreenSettings* CHomescreenSettings::NewL(
- const TDesC8& aAppUid,
- const TDesC8& aPluginId,
- MHomeScreenSettingsObserver* aObserver)
+CHomescreenSettings* CHomescreenSettings::NewL(
+ const TDesC8& aAppUid )
{
- CHomescreenSettings* self = CHomescreenSettings::NewLC(aAppUid, aPluginId, aObserver);
+ CHomescreenSettings* self = CHomescreenSettings::NewLC( aAppUid );
CleanupStack::Pop( self );
return self;
}
@@ -167,22 +253,23 @@
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
//
-EXPORT_C CHomescreenSettings* CHomescreenSettings::NewLC(
- const TDesC8& aAppUid,
- const TDesC8& aPluginId,
- MHomeScreenSettingsObserver* aObserver)
- {
- CHomescreenSettings* self = new( ELeave ) CHomescreenSettings( aObserver, aPluginId );
+CHomescreenSettings* CHomescreenSettings::NewLC(
+ const TDesC8& aAppUid )
+ {
+ CHomescreenSettings* self = new( ELeave ) CHomescreenSettings();
CleanupStack::PushL( self );
- self->ConstructL(aAppUid);
+ self->ConstructL( aAppUid );
+
return self;
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
//
-EXPORT_C CHomescreenSettings::~CHomescreenSettings()
+CHomescreenSettings::~CHomescreenSettings()
{
+ iObservers.Reset();
+
if( iHspsInterface )
{
// Close interface
@@ -202,10 +289,6 @@
delete iServiceHandler;
}
-
-
-
-
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
//
@@ -529,7 +612,7 @@
{
TInt retval( KErrNone );
- if( iObserver && iTransactionId == aCmdId )
+ if( iTransactionId == aCmdId && iObservers.Count() > 0 )
{
const TLiwGenericParam* outParam( NULL );
@@ -566,16 +649,16 @@
variant = outParam->Value();
const CLiwMap* notifMap( variant.AsMap() );
-
+
if ( notifMap->FindL( _L8("event"), variant ) )
{
event = variant.AsData().AllocLC();
pushCount++;
}
-
+
variant.Reset();
- if ( event->Des().Compare( KSettingsChanged ) == 0 )
+ if ( event && event->Des().Compare( KSettingsChanged ) == 0 )
{
if( notifMap->FindL( _L8("name"), variant ) )
{
@@ -610,20 +693,19 @@
HBufC8* pluginId( NULL );
pluginId = variant.AsData().AllocLC();
- if( pluginId->Des().Compare(iPluginId)== 0 )
+ for( TInt i = 0; i < iObservers.Count(); i++ )
{
- retval = iObserver->SettingsChangedL(
+ iObservers[i]->SettingsChangedL(
( event ) ? *event : KNullDesC8(),
( pluginName ) ? *pluginName : KNullDesC8(),
( pluginUid ) ? *pluginUid : KNullDesC8(),
- ( pluginId ) ? * pluginId : KNullDesC8() );
- }
+ ( pluginId ) ? *pluginId : KNullDesC8() );
+ }
+
CleanupStack::PopAndDestroy( pluginId );
- variant.Reset();
-
- }
-
+ variant.Reset();
+ }
}
}
@@ -679,11 +761,10 @@
}
}
- }
-
+ }
return retval;
- }
+ }
}
//End of file
--- a/homescreenpluginsrv/hspsdom/group/hspsdomdocument.mmp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsdom/group/hspsdomdocument.mmp Fri Mar 12 15:43:54 2010 +0200
@@ -32,6 +32,7 @@
SOURCE hspsdomlist.cpp
SOURCE hspsdomdepthiterator.cpp
SOURCE hspsdomstringpool.cpp
+SOURCE hspsdomstringpooloptimizer.cpp
USERINCLUDE .
USERINCLUDE ../inc
--- a/homescreenpluginsrv/hspsdom/src/hspsdomstringpool.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsdom/src/hspsdomstringpool.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -20,42 +20,8 @@
// INCLUDE FILES
#include "hspsdomstringpool.h"
+// ============================ LOCAL FUNCTIONS ================================
-// ============================ LOCAL FUNCTIONS ================================
-// -----------------------------------------------------------------------------
-// Adds string to string pool. If string doesn't appear yet, it is added to
-// the string pool and index to pool is returned.
-// @param aString String to add
-// @param aArray A pool which holds strings
-// @return Index to string pool
-// -----------------------------------------------------------------------------
-//
-LOCAL_C TInt AddToStringPoolL( const TDesC8& aString, RPointerArray<HBufC8>& aArray )
- {
- TBool found( EFalse );
- TInt index( 0 );
-
- TInt count( aArray.Count() );
- for (; index < count && !found; )
- {
- if ( aArray[ index ]->Des().Compare( aString ) == 0 )
- {
- found = ETrue;
- }
- else
- {
- index++;
- }
- }
- if ( !found )
- {
- HBufC8* tmp = aString.AllocLC();
- aArray.AppendL( tmp );
- CleanupStack::Pop( tmp );
- index = aArray.Count()-1; //Last item
- }
- return index;
- }
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// ChspsDomStringPool::ChspsDomStringPool
@@ -63,7 +29,8 @@
// might leave.
// -----------------------------------------------------------------------------
//
-ChspsDomStringPool::ChspsDomStringPool()
+ChspsDomStringPool::ChspsDomStringPool( const TBool aAllowDuplicates ) :
+ iAllowDuplicates( aAllowDuplicates )
{
}
@@ -81,9 +48,10 @@
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
-ChspsDomStringPool* ChspsDomStringPool::NewL()
+ChspsDomStringPool* ChspsDomStringPool::NewL( const TBool aAllowDuplicates )
{
- ChspsDomStringPool* self = new( ELeave ) ChspsDomStringPool;
+ ChspsDomStringPool* self =
+ new( ELeave ) ChspsDomStringPool( aAllowDuplicates );
CleanupStack::PushL( self );
self->ConstructL();
@@ -98,9 +66,10 @@
// Two-phased stream constructor.
// -----------------------------------------------------------------------------
//
-ChspsDomStringPool* ChspsDomStringPool::NewL( RReadStream& aStream )
+ChspsDomStringPool* ChspsDomStringPool::NewL( RReadStream& aStream,
+ const TBool aAllowDuplicates )
{
- ChspsDomStringPool* self = new( ELeave ) ChspsDomStringPool;
+ ChspsDomStringPool* self = new( ELeave ) ChspsDomStringPool( aAllowDuplicates );
CleanupStack::PushL( self );
aStream >> *self;
CleanupStack::Pop(self);
@@ -116,6 +85,7 @@
ChspsDomStringPool::~ChspsDomStringPool()
{
iStringPool.ResetAndDestroy();
+ iStringPoolOptimizer.Close();
}
// -----------------------------------------------------------------------------
@@ -123,15 +93,23 @@
// -----------------------------------------------------------------------------
//
ChspsDomStringPool* ChspsDomStringPool::CloneL()
- {
- ChspsDomStringPool* clone = ChspsDomStringPool::NewL();
+ {
+ ChspsDomStringPool* clone = NULL;
+ if( iAllowDuplicates )
+ {
+ clone = ChspsDomStringPool::NewL( ETrue );
+ }
+ else
+ {
+ clone = ChspsDomStringPool::NewL( EFalse );
+ }
CleanupStack::PushL( clone );
TInt count( iStringPool.Count() );
- for ( TInt i=0; i<count; i++ )
- {
+ for ( TInt i = 0; i < count; i++ )
+ {
HBufC8* tmp = iStringPool[i]->Des().AllocLC();
- clone->iStringPool.AppendL( tmp );
+ clone->DoAddStringL( tmp );
CleanupStack::Pop( tmp );
}
CleanupStack::Pop( clone );
@@ -139,26 +117,77 @@
}
// -----------------------------------------------------------------------------
-// ChspsDomNode::AddStringL
+// ChspsDomStringPool::AddStringL
// -----------------------------------------------------------------------------
//
EXPORT_C TInt ChspsDomStringPool::AddStringL( const TDesC8& aString )
- {
- return AddToStringPoolL( aString, iStringPool );
+ {
+ TInt index = iStringPoolOptimizer.GetIndex( aString );
+
+ if( index == KErrNotFound )
+ {
+ HBufC8* string = aString.AllocLC();
+ index = DoAddStringL( string );
+ CleanupStack::Pop( string );
+ }
+
+ return index;
}
// -----------------------------------------------------------------------------
-// ChspsDomNode::String
+// ChspsDomStringPool::AddStringL
+// -----------------------------------------------------------------------------
+//
+TInt ChspsDomStringPool::AddStringL( HBufC8* aString )
+ {
+ if( !aString )
+ {
+ User::Leave( KErrArgument );
+ }
+
+ TInt index = iStringPoolOptimizer.GetIndex( *aString );
+
+ if( index == KErrNotFound )
+ {
+ index = DoAddStringL( aString );
+ }
+ else
+ {
+ delete aString;
+ }
+
+ return index;
+ }
+
+// -----------------------------------------------------------------------------
+// ChspsDomStringPool::AddStringL
+// -----------------------------------------------------------------------------
+//
+void ChspsDomStringPool::AddAllL( ChspsDomStringPool& aStringPool )
+ {
+ const TInt count = aStringPool.Count();
+ for( TInt i = 0; i < count; i++ )
+ {
+ AddStringL( aStringPool.String( i ) );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// ChspsDomStringPool::String
// -----------------------------------------------------------------------------
//
const TDesC8& ChspsDomStringPool::String( const TInt aStringRef )
- {
- if ( aStringRef < iStringPool.Count() )
+ {
+ if( aStringRef >= 0 && aStringRef < iStringPool.Count() )
+ {
return (*iStringPool[ aStringRef ]);
+ }
else
+ {
return KNullDesC8;
+ }
}
-
+
// -----------------------------------------------------------------------------
// ChspsDomStringPool::Size
// -----------------------------------------------------------------------------
@@ -179,6 +208,15 @@
}
// -----------------------------------------------------------------------------
+// ChspsDomStringPool::Count
+// -----------------------------------------------------------------------------
+//
+TInt ChspsDomStringPool::Count() const
+ {
+ return iStringPool.Count();
+ }
+
+// -----------------------------------------------------------------------------
// ChspsDomStringPool::ExternalizeL
// -----------------------------------------------------------------------------
//
@@ -201,15 +239,39 @@
void ChspsDomStringPool::InternalizeL( RReadStream& aStream )
{
TInt len(0);
- TInt16 count ( aStream.ReadInt16L() );
-
+ TInt16 count ( aStream.ReadInt16L() );
+
for ( TInt i=0; i<count; i++ )
{
len = aStream.ReadInt16L();
HBufC8* tmp = HBufC8::NewLC( aStream, len );
- iStringPool.AppendL( tmp );
+ AddStringL( tmp ); // OWNERSHIP TRANSFERRED!
CleanupStack::Pop( tmp );
}
-
}
+
+// -----------------------------------------------------------------------------
+// ChspsDomStringPool::DoAddStringL
+// -----------------------------------------------------------------------------
+//
+TInt ChspsDomStringPool::DoAddStringL( HBufC8* aNewString )
+ {
+ if( !aNewString )
+ {
+ User::Leave( KErrArgument );
+ }
+
+ TInt index = iStringPool.Count();
+
+ if( !iAllowDuplicates )
+ {
+ ThspsDomStringPoolOptimizerEntry tmp( index, *aNewString );
+ iStringPoolOptimizer.AddEntryL( tmp );
+ }
+
+ iStringPool.AppendL( aNewString );
+
+ return index;
+ }
+
// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenpluginsrv/hspsdom/src/hspsdomstringpooloptimizer.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -0,0 +1,197 @@
+/*
+* 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: Optimizer module for ChspsDomStringPool.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "hspsdomstringpooloptimizer.h"
+
+const TInt KMaxEstimateThreshold = 2;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ThspsDomStringPoolOptimizerEntry::ThspsDomStringPoolOptimizerEntry
+// -----------------------------------------------------------------------------
+//
+ThspsDomStringPoolOptimizerEntry::ThspsDomStringPoolOptimizerEntry( TInt aIndex,
+ const TDesC8& aString) :
+ iIndex( aIndex ),
+ iString( aString )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// ThspsDomStringPoolOptimizer::AddEntryL
+// -----------------------------------------------------------------------------
+//
+void ThspsDomStringPoolOptimizer::AddEntryL( ThspsDomStringPoolOptimizerEntry& aEntry )
+ {
+ TBool positionFound = EFalse;
+
+ if( iEntries.Count() > 0 )
+ {
+ const TInt estimate = FindInsertionIndexEstimate(
+ aEntry.iString,
+ 0,
+ iEntries.Count() - 1 );
+
+ if( estimate != KErrNotFound )
+ {
+ for( TInt i = estimate; i < iEntries.Count(); i++ )
+ {
+ if( aEntry.iString.Compare( iEntries[i].iString ) < 0 )
+ {
+ positionFound = ETrue;
+ iEntries.InsertL( aEntry, i );
+ break;
+ }
+ }
+ }
+ }
+
+ if( !positionFound )
+ {
+ iEntries.AppendL( aEntry );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// ThspsDomStringPoolOptimizer::ThspsDomStringPoolOptimizerGetIndex
+// -----------------------------------------------------------------------------
+//
+TInt ThspsDomStringPoolOptimizer::GetIndex( const TDesC8& aString )
+ {
+ if( iEntries.Count() == 0 )
+ {
+ return KErrNotFound;
+ }
+
+ TInt index = FindEntry( aString, 0, iEntries.Count() - 1 );
+ if( index >= 0 && index < iEntries.Count() )
+ {
+ return iEntries[index].iIndex;
+ }
+ else
+ {
+ // Error code.
+ return index;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// ThspsDomStringPoolOptimizer::Close
+// -----------------------------------------------------------------------------
+//
+void ThspsDomStringPoolOptimizer::Close()
+ {
+ iEntries.Close();
+ }
+
+// -----------------------------------------------------------------------------
+// ThspsDomStringPoolOptimizer::Count
+// -----------------------------------------------------------------------------
+//
+TInt ThspsDomStringPoolOptimizer::Count()
+ {
+ return iEntries.Count();
+ }
+
+// -----------------------------------------------------------------------------
+// ThspsDomStringPoolOptimizer::Entry
+// -----------------------------------------------------------------------------
+//
+ThspsDomStringPoolOptimizerEntry& ThspsDomStringPoolOptimizer::Entry(
+ const TInt aIndex )
+ {
+ return iEntries[ aIndex ];
+ }
+
+// -----------------------------------------------------------------------------
+// ThspsDomStringPoolOptimizer::Reset
+// -----------------------------------------------------------------------------
+//
+void ThspsDomStringPoolOptimizer::Reset()
+ {
+ iEntries.Reset();
+ }
+
+// -----------------------------------------------------------------------------
+// ThspsDomStringPoolOptimizer::FindEntry
+// -----------------------------------------------------------------------------
+//
+TInt ThspsDomStringPoolOptimizer::FindEntry( const TDesC8& aString,
+ const TInt aLeft,
+ const TInt aRight )
+ {
+ if( aLeft > aRight )
+ {
+ return KErrNotFound;
+ }
+
+ const TUint middle = ( aLeft + aRight ) >> 1; // >> 1 means "divided by two".
+ ThspsDomStringPoolOptimizerEntry& entryAtMiddle = iEntries[ middle ];
+ const TInt comparisonResult = aString.Compare( entryAtMiddle.iString );
+
+ if( comparisonResult > 0 )
+ {
+ return FindEntry( aString, middle + 1, aRight);
+ }
+ else if( comparisonResult < 0 )
+ {
+ return FindEntry( aString, aLeft, middle - 1 );
+ }
+ else
+ {
+ return middle;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// ThspsDomStringPoolOptimizer::FindEntry
+// -----------------------------------------------------------------------------
+//
+TInt ThspsDomStringPoolOptimizer::FindInsertionIndexEstimate( const TDesC8& aString,
+ const TInt aLeft,
+ const TInt aRight )
+ {
+ if( ( aRight - aLeft ) <= KMaxEstimateThreshold )
+ {
+ return aLeft;
+ }
+
+ const TUint middle = ( aLeft + aRight ) >> 1;
+
+ ThspsDomStringPoolOptimizerEntry& entryAtMiddle = iEntries[ middle ];
+ const TInt comparisonResult = aString.Compare( entryAtMiddle.iString );
+
+ if( comparisonResult > 0 )
+ {
+ return FindInsertionIndexEstimate( aString, middle, aRight);
+ }
+ else if( comparisonResult < 0 )
+ {
+ return FindInsertionIndexEstimate( aString, aLeft, middle );
+ }
+ else
+ {
+ // Should not go here. There should be only one of a kind in the list.
+ return KErrNotFound;
+ }
+ }
+
+// End of File
--- a/homescreenpluginsrv/hspsmanager/group/hspsthemeserver.mmp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/group/hspsthemeserver.mmp Fri Mar 12 15:43:54 2010 +0200
@@ -81,6 +81,8 @@
LIBRARY hspsdomdocument.lib
LIBRARY hspsdefinitionengineinterface.lib
LIBRARY ecom.lib // definition engine
+LIBRARY MemMan.lib
+
#ifdef _hsps_DEBUG_
LIBRARY flogger.lib
#endif // _hsps_DEBUG_
--- a/homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsthemeserver.h Fri Mar 12 15:43:54 2010 +0200
@@ -209,6 +209,7 @@
class ChspsSecurityEnforcer;
class ChspsRomInstaller;
class ChspsAutoInstaller;
+class ChspsThemeServerSession;
#ifdef HSPS_LOG_ACTIVE
class ChspsLogBus;
@@ -396,15 +397,21 @@
/**
* AddSession
+ *
+ * @param aSession Session that is added. Ownership not transferred!.
+ *
* @since S60 3.1
*/
- void AddSession();
+ void AddSession( ChspsThemeServerSession* aSession );
/**
* DropSession
+ *
+ * @param aSession Session that is dropped. Ownership not transferred!.
+ *
* @since S60 3.1
*/
- void DropSession();
+ void DropSession( ChspsThemeServerSession* aSession );
public: // public functions
@@ -997,11 +1004,7 @@
void ActivateRootConfigurationsL();
#endif // defined(WINSCW)
-
-
-private:
- TInt iSessionCount;
-
+
#ifdef _hsps_SERVER_SHUTDOWN_ENABLED_
CShutdown* iShutdown;
#endif // _hsps_SERVER_SHUTDOWN_ENABLED_
@@ -1084,6 +1087,8 @@
*/
ChspsLogBus* iLogBus;
#endif
+
+ RPointerArray<ChspsThemeServerSession> iSessions; // Sessions not owned!
};
#endif //__hspsTHEMESERVER_H__
--- a/homescreenpluginsrv/hspsmanager/inc/hspsthemeserversession.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/inc/hspsthemeserversession.h Fri Mar 12 15:43:54 2010 +0200
@@ -63,6 +63,41 @@
* @return Reference to RFs instance
*/
RFs& FileSystem();
+
+ /**
+ * Return whether icon file copy required.
+ *
+ * @return TBool ETrue if icon file copy is required. Otherwise false.
+ */
+ TBool IconFileCopyRequired() const;
+
+ /**
+ * Set icon file copy requirement flag.
+ *
+ * @param aCopyRequired Value to be set.
+ */
+ void SetIconFileCopyRequired( const TBool aCopyRequired );
+
+ /**
+ * Return whether resource file copy required.
+ *
+ * @return TBool ETrue if icon file copy is required. Otherwise false.
+ */
+ TBool ResourceFileCopyRequired() const;
+
+ /**
+ * Set resource file copy requirement flag.
+ *
+ * @param aCopyRequired Value to be set.
+ */
+ void SetResourceFileCopyRequired( const TBool aCopyRequired );
+
+ /**
+ * Get app uid of session
+ *
+ * @return App uid.
+ */
+ TInt AppUid() const;
private:
@@ -304,6 +339,17 @@
TBool iHoldingResources;
TInt iAppUid;
+
+ /**
+ * Boolean to indicate that icon files need to be copied.
+ */
+ TBool iIconFileCopyRequired;
+
+ /**
+ * Boolean to indicate that resource files need to be copied.
+ */
+ TBool iResourceFileCopyRequired;
+
#ifdef HSPS_LOG_ACTIVE
/**
* Log bus.
--- a/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -19,6 +19,7 @@
#define __INCLUDE_CAPABILITY_NAMES__
// INCLUDE FILES
+#include <mw/memorymanager.h>
#include <centralrepository.h>
#include <f32file.h>
#include <bautils.h>
@@ -179,6 +180,8 @@
//
TInt E32Main()
{
+ RAllocator* iAllocator = MemoryManager::SwitchToFastAllocator();
+
__UHEAP_MARK;
CTrapCleanup* cleanup=CTrapCleanup::New();
TInt r=KErrNoMemory;
@@ -188,6 +191,9 @@
delete cleanup;
}
__UHEAP_MARKEND;
+
+ MemoryManager::CloseFastAllocator(iAllocator);
+
return r;
}
@@ -398,6 +404,8 @@
delete iLogBus;
iLogBus = NULL;
#endif
+
+ iSessions.Reset();
}
#ifdef _hsps_SERVER_SHUTDOWN_ENABLED_
@@ -489,9 +497,14 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void ChspsThemeServer::AddSession()
+void ChspsThemeServer::AddSession( ChspsThemeServerSession* aSession )
{
- iSessionCount++;
+ if( aSession == NULL )
+ {
+ return;
+ }
+
+ iSessions.Append( aSession );
#ifdef _hsps_SERVER_SHUTDOWN_ENABLED_
if( iShutdown->IsActive() )
@@ -513,12 +526,16 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void ChspsThemeServer::DropSession()
+void ChspsThemeServer::DropSession( ChspsThemeServerSession* aSession )
{
- iSessionCount--;
+ const TInt index = iSessions.Find( aSession );
+ if( index != KErrNotFound )
+ {
+ iSessions.Remove( index );
+ }
#ifdef _hsps_SERVER_SHUTDOWN_ENABLED_
- if( iSessionCount == 0 )
+ if( iSessions.Count() == 0 )
{
iShutdown->Cancel();
iShutdown->Start();
@@ -577,7 +594,20 @@
#ifdef HSPS_LOG_ACTIVE
iLogBus->LogText( _L( "--------------------------------------------------------" ) );
#endif
-
+
+ if( aRepositoryInfo.iEventType & EhspsODTUpdated ||
+ aRepositoryInfo.iEventType & EhspsODTModified ||
+ aRepositoryInfo.iEventType & EhspsPluginReplaced )
+ {
+ for( TInt i = 0; i < iSessions.Count(); i++ )
+ {
+ if( iSessions[i]->AppUid() == aRepositoryInfo.iAppUid )
+ {
+ iSessions[i]->SetResourceFileCopyRequired( ETrue );
+ }
+ }
+ }
+
// If header cache should be updated from files in the Plug-in Repository
if (mask & EhspsCacheUpdate)
{
@@ -3371,6 +3401,16 @@
{
// Invalid configuration
state.Set( KConfStateError );
+ // Delete related resource files
+ const TInt count = aOdt.ResourceCount();
+ for( TInt j( 0 ); j < count; j++ )
+ {
+ ChspsResource& resource = aOdt.ResourceL( j );
+ if( resource.ConfigurationUid() == uids[ i ] )
+ {
+ aOdt.DeleteResourceL( j );
+ }
+ }
}
else if ( state.CompareF( KConfStateError ) != 0 )
{
--- a/homescreenpluginsrv/hspsmanager/src/hspsthemeserversession.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsmanager/src/hspsthemeserversession.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -49,9 +49,11 @@
// -----------------------------------------------------------------------------
//
ChspsThemeServerSession::ChspsThemeServerSession(
- const TInt aAppUid )
+ const TInt aAppUid ) :
+ iAppUid( aAppUid ),
+ iIconFileCopyRequired( ETrue ),
+ iResourceFileCopyRequired( ETrue )
{
- iAppUid = aAppUid;
}
// -----------------------------------------------------------------------------
@@ -68,7 +70,7 @@
iLogBus->LogText( _L( "--------------------------------------------------------" ) );
#endif
- Server().AddSession();
+ Server().AddSession( this );
iHoldingResources = EFalse;
User::LeaveIfError( iFs.Connect() );
Server().CheckConfigurationL( iAppUid );
@@ -93,7 +95,7 @@
}
delete iClientRequestHandler;
- Server().DropSession();
+ Server().DropSession( this );
#ifdef HSPS_LOG_ACTIVE
if( iLogBus )
@@ -284,7 +286,15 @@
#ifdef HSPS_LOG_ACTIVE
iLogBus->LogText( _L( "DoServiceL: EhspsCopyResources" ) );
#endif
- CopyResourceFilesL( aMessage );
+ if( iResourceFileCopyRequired )
+ {
+ CopyResourceFilesL( aMessage );
+ iResourceFileCopyRequired = EFalse;
+ }
+ else
+ {
+ aMessage.Complete( EhspsResourceCopySuccess );
+ }
break;
}
case EhspsAddPlugin:
@@ -1001,5 +1011,50 @@
return iFs;
}
+// -----------------------------------------------------------------------------
+// ChspsThemeServerSession::IconFileCopyRequired
+// -----------------------------------------------------------------------------
+//
+TBool ChspsThemeServerSession::IconFileCopyRequired() const
+ {
+ return iIconFileCopyRequired;
+ }
+
+// -----------------------------------------------------------------------------
+// ChspsThemeServerSession::SetIconFileCopyRequired
+// -----------------------------------------------------------------------------
+//
+void ChspsThemeServerSession::SetIconFileCopyRequired( const TBool aCopyRequired )
+ {
+ iIconFileCopyRequired = aCopyRequired;
+ }
+
+// -----------------------------------------------------------------------------
+// ChspsThemeServerSession::ResourceFileCopyRequired
+// -----------------------------------------------------------------------------
+//
+TBool ChspsThemeServerSession::ResourceFileCopyRequired() const
+ {
+ return iResourceFileCopyRequired;
+ }
+
+// -----------------------------------------------------------------------------
+// ChspsThemeServerSession::SetResourceFileCopyRequired
+// -----------------------------------------------------------------------------
+//
+void ChspsThemeServerSession::SetResourceFileCopyRequired( const TBool aCopyRequired )
+ {
+ iResourceFileCopyRequired = aCopyRequired;
+ }
+
+// -----------------------------------------------------------------------------
+// ChspsThemeServerSession::AppUid
+// -----------------------------------------------------------------------------
+//
+TBool ChspsThemeServerSession::AppUid() const
+ {
+ return iAppUid;
+ }
+
// end of file
--- a/homescreenpluginsrv/hspsodt/bwins/hspsodtu.def Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsodt/bwins/hspsodtu.def Fri Mar 12 15:43:54 2010 +0200
@@ -1,52 +1,54 @@
EXPORTS
- ?AddResourceL@ChspsODT@@QAEXPAVChspsResource@@@Z @ 1 NONAME ; void ChspsODT::AddResourceL(class ChspsResource *)
- ?CloneL@ChspsODT@@QAEPAV1@XZ @ 2 NONAME ; class ChspsODT * ChspsODT::CloneL(void)
- ?ConfigurationType@ChspsODT@@QBEIXZ @ 3 NONAME ; unsigned int ChspsODT::ConfigurationType(void) const
- ?CopyDomDocumentL@ChspsODT@@QAEXAAVChspsDomDocument@@@Z @ 4 NONAME ; void ChspsODT::CopyDomDocumentL(class ChspsDomDocument &)
- ?DeleteResourceL@ChspsODT@@QAEXH@Z @ 5 NONAME ; void ChspsODT::DeleteResourceL(int)
- ?DomDocument@ChspsODT@@QBEAAVChspsDomDocument@@XZ @ 6 NONAME ; class ChspsDomDocument & ChspsODT::DomDocument(void) const
- ?ExternalizeHeaderL@ChspsODT@@QBEXAAVRWriteStream@@@Z @ 7 NONAME ; void ChspsODT::ExternalizeHeaderL(class RWriteStream &) const
- ?ExternalizeL@ChspsODT@@QBEXAAVRWriteStream@@@Z @ 8 NONAME ; void ChspsODT::ExternalizeL(class RWriteStream &) const
- ?ExternalizeResourceListL@ChspsODT@@QBEXAAVRWriteStream@@@Z @ 9 NONAME ; void ChspsODT::ExternalizeResourceListL(class RWriteStream &) const
- ?Flags@ChspsODT@@QBEIXZ @ 10 NONAME ; unsigned int ChspsODT::Flags(void) const
- ?InternalizeHeaderL@ChspsODT@@QAEXAAVRReadStream@@@Z @ 11 NONAME ; void ChspsODT::InternalizeHeaderL(class RReadStream &)
- ?InternalizeL@ChspsODT@@QAEXAAVRReadStream@@@Z @ 12 NONAME ; void ChspsODT::InternalizeL(class RReadStream &)
- ?InternalizeResourceListL@ChspsODT@@QAEXAAVRReadStream@@@Z @ 13 NONAME ; void ChspsODT::InternalizeResourceListL(class RReadStream &)
- ?MarshalHeaderL@ChspsODT@@QBEPAVHBufC8@@XZ @ 14 NONAME ; class HBufC8 * ChspsODT::MarshalHeaderL(void) const
- ?NewL@ChspsODT@@SAPAV1@XZ @ 15 NONAME ; class ChspsODT * ChspsODT::NewL(void)
- ?NewLC@ChspsODT@@SAPAV1@ABVTDesC8@@@Z @ 16 NONAME ; class ChspsODT * ChspsODT::NewLC(class TDesC8 const &)
- ?OdtLanguage@ChspsODT@@QBEHXZ @ 17 NONAME ; int ChspsODT::OdtLanguage(void) const
- ?PackageVersion@ChspsODT@@QBEABVTDesC16@@XZ @ 18 NONAME ; class TDesC16 const & ChspsODT::PackageVersion(void) const
- ?ProviderName@ChspsODT@@QBEABVTDesC16@@XZ @ 19 NONAME ; class TDesC16 const & ChspsODT::ProviderName(void) const
- ?ProviderUid@ChspsODT@@QBEHXZ @ 20 NONAME ; int ChspsODT::ProviderUid(void) const
- ?ResourceCount@ChspsODT@@QBEHXZ @ 21 NONAME ; int ChspsODT::ResourceCount(void) const
- ?ResourceL@ChspsODT@@QBEAAVChspsResource@@H@Z @ 22 NONAME ; class ChspsResource & ChspsODT::ResourceL(int) const
- ?RootUid@ChspsODT@@QBEHXZ @ 23 NONAME ; int ChspsODT::RootUid(void) const
- ?SetConfigurationType@ChspsODT@@QAEXI@Z @ 24 NONAME ; void ChspsODT::SetConfigurationType(unsigned int)
- ?SetFlags@ChspsODT@@QAEXI@Z @ 25 NONAME ; void ChspsODT::SetFlags(unsigned int)
- ?SetOdtLanguage@ChspsODT@@QAEXH@Z @ 26 NONAME ; void ChspsODT::SetOdtLanguage(int)
- ?SetPackageVersionL@ChspsODT@@QAEXABVTDesC16@@@Z @ 27 NONAME ; void ChspsODT::SetPackageVersionL(class TDesC16 const &)
- ?SetProviderNameL@ChspsODT@@QAEXABVTDesC16@@@Z @ 28 NONAME ; void ChspsODT::SetProviderNameL(class TDesC16 const &)
- ?SetProviderUid@ChspsODT@@QAEXH@Z @ 29 NONAME ; void ChspsODT::SetProviderUid(int)
- ?SetRootUid@ChspsODT@@QAEXH@Z @ 30 NONAME ; void ChspsODT::SetRootUid(int)
- ?SetThemeFullNameL@ChspsODT@@QAEXABVTDesC16@@@Z @ 31 NONAME ; void ChspsODT::SetThemeFullNameL(class TDesC16 const &)
- ?SetThemeShortNameL@ChspsODT@@QAEXABVTDesC16@@@Z @ 32 NONAME ; void ChspsODT::SetThemeShortNameL(class TDesC16 const &)
- ?SetThemeUid@ChspsODT@@QAEXH@Z @ 33 NONAME ; void ChspsODT::SetThemeUid(int)
- ?SetThemeVersionL@ChspsODT@@QAEXABVTDesC16@@@Z @ 34 NONAME ; void ChspsODT::SetThemeVersionL(class TDesC16 const &)
- ?ThemeFullName@ChspsODT@@QBEABVTDesC16@@XZ @ 35 NONAME ; class TDesC16 const & ChspsODT::ThemeFullName(void) const
- ?ThemeShortName@ChspsODT@@QBEABVTDesC16@@XZ @ 36 NONAME ; class TDesC16 const & ChspsODT::ThemeShortName(void) const
- ?ThemeUid@ChspsODT@@QBEHXZ @ 37 NONAME ; int ChspsODT::ThemeUid(void) const
- ?ThemeVersion@ChspsODT@@QBEABVTDesC16@@XZ @ 38 NONAME ; class TDesC16 const & ChspsODT::ThemeVersion(void) const
- ?UnMarshalHeaderL@ChspsODT@@QAEXABVTDesC8@@@Z @ 39 NONAME ; void ChspsODT::UnMarshalHeaderL(class TDesC8 const &)
- ?UnMarshalHeaderLC@ChspsODT@@SAPAV1@ABVTDesC8@@@Z @ 40 NONAME ; class ChspsODT * ChspsODT::UnMarshalHeaderLC(class TDesC8 const &)
- ?Family@ChspsODT@@QBEKXZ @ 41 NONAME ; unsigned long ChspsODT::Family(void) const
- ?SetFamily@ChspsODT@@QAEXK@Z @ 42 NONAME ; void ChspsODT::SetFamily(unsigned long)
- ?SetMultiInstance@ChspsODT@@QAEXH@Z @ 43 NONAME ; void ChspsODT::SetMultiInstance(int)
- ?MultiInstance@ChspsODT@@QBEHXZ @ 44 NONAME ; int ChspsODT::MultiInstance(void) const
- ?Description@ChspsODT@@QBEABVTDesC16@@XZ @ 45 NONAME ; class TDesC16 const & ChspsODT::Description(void) const
- ?PreviewFile@ChspsODT@@QBEABVTDesC16@@XZ @ 46 NONAME ; class TDesC16 const & ChspsODT::PreviewFile(void) const
- ?SetLogoFileL@ChspsODT@@QAEXABVTDesC16@@@Z @ 47 NONAME ; void ChspsODT::SetLogoFileL(class TDesC16 const &)
- ?SetDescriptionL@ChspsODT@@QAEXABVTDesC16@@@Z @ 48 NONAME ; void ChspsODT::SetDescriptionL(class TDesC16 const &)
- ?SetPreviewFileL@ChspsODT@@QAEXABVTDesC16@@@Z @ 49 NONAME ; void ChspsODT::SetPreviewFileL(class TDesC16 const &)
+ ?SetRootUid@ChspsODT@@QAEXH@Z @ 1 NONAME ; void ChspsODT::SetRootUid(int)
+ ?SetProviderNameL@ChspsODT@@QAEXABVTDesC16@@@Z @ 2 NONAME ; void ChspsODT::SetProviderNameL(class TDesC16 const &)
+ ?NewL@ChspsODT@@SAPAV1@XZ @ 3 NONAME ; class ChspsODT * ChspsODT::NewL(void)
+ ?InternalizeL@ChspsODT@@QAEXAAVRReadStream@@@Z @ 4 NONAME ; void ChspsODT::InternalizeL(class RReadStream &)
+ ?Flags@ChspsODT@@QBEIXZ @ 5 NONAME ; unsigned int ChspsODT::Flags(void) const
+ ?Description@ChspsODT@@QBEABVTDesC16@@XZ @ 6 NONAME ; class TDesC16 const & ChspsODT::Description(void) const
+ ?SetConfigurationType@ChspsODT@@QAEXI@Z @ 7 NONAME ; void ChspsODT::SetConfigurationType(unsigned int)
+ ?DomDocument@ChspsODT@@QBEAAVChspsDomDocument@@XZ @ 8 NONAME ; class ChspsDomDocument & ChspsODT::DomDocument(void) const
+ ?Family@ChspsODT@@QBEKXZ @ 9 NONAME ; unsigned long ChspsODT::Family(void) const
+ ?UnMarshalHeaderLC@ChspsODT@@SAPAV1@ABVTDesC8@@@Z @ 10 NONAME ; class ChspsODT * ChspsODT::UnMarshalHeaderLC(class TDesC8 const &)
+ ?ExternalizeResourceListL@ChspsODT@@QBEXAAVRWriteStream@@@Z @ 11 NONAME ; void ChspsODT::ExternalizeResourceListL(class RWriteStream &) const
+ ?SetThemeFullNameL@ChspsODT@@QAEXABVTDesC16@@@Z @ 12 NONAME ; void ChspsODT::SetThemeFullNameL(class TDesC16 const &)
+ ?SetFlags@ChspsODT@@QAEXI@Z @ 13 NONAME ; void ChspsODT::SetFlags(unsigned int)
+ ?ResourceCount@ChspsODT@@QBEHXZ @ 14 NONAME ; int ChspsODT::ResourceCount(void) const
+ ?SetThemeShortNameL@ChspsODT@@QAEXABVTDesC16@@@Z @ 15 NONAME ; void ChspsODT::SetThemeShortNameL(class TDesC16 const &)
+ ?PreviewFile@ChspsODT@@QBEABVTDesC16@@XZ @ 16 NONAME ; class TDesC16 const & ChspsODT::PreviewFile(void) const
+ ?DeleteResourceL@ChspsODT@@QAEXH@Z @ 17 NONAME ; void ChspsODT::DeleteResourceL(int)
+ ?ThemeVersion@ChspsODT@@QBEABVTDesC16@@XZ @ 18 NONAME ; class TDesC16 const & ChspsODT::ThemeVersion(void) const
+ ?SetThemeUid@ChspsODT@@QAEXH@Z @ 19 NONAME ; void ChspsODT::SetThemeUid(int)
+ ?CopyDomDocumentL@ChspsODT@@QAEXAAVChspsDomDocument@@@Z @ 20 NONAME ; void ChspsODT::CopyDomDocumentL(class ChspsDomDocument &)
+ ?SetLogoFileL@ChspsODT@@QAEXABVTDesC16@@@Z @ 21 NONAME ; void ChspsODT::SetLogoFileL(class TDesC16 const &)
+ ?SetFamily@ChspsODT@@QAEXK@Z @ 22 NONAME ; void ChspsODT::SetFamily(unsigned long)
+ ?CloneL@ChspsODT@@QBEPAV1@XZ @ 23 NONAME ; class ChspsODT * ChspsODT::CloneL(void) const
+ ?PackageVersion@ChspsODT@@QBEABVTDesC16@@XZ @ 24 NONAME ; class TDesC16 const & ChspsODT::PackageVersion(void) const
+ ?AddResourceL@ChspsODT@@QAEXPAVChspsResource@@@Z @ 25 NONAME ; void ChspsODT::AddResourceL(class ChspsResource *)
+ ?SetPackageVersionL@ChspsODT@@QAEXABVTDesC16@@@Z @ 26 NONAME ; void ChspsODT::SetPackageVersionL(class TDesC16 const &)
+ ?SetMultiInstance@ChspsODT@@QAEXH@Z @ 27 NONAME ; void ChspsODT::SetMultiInstance(int)
+ ?MultiInstance@ChspsODT@@QBEHXZ @ 28 NONAME ; int ChspsODT::MultiInstance(void) const
+ ?ConfigurationType@ChspsODT@@QBEIXZ @ 29 NONAME ; unsigned int ChspsODT::ConfigurationType(void) const
+ ?NewLC@ChspsODT@@SAPAV1@ABVTDesC8@@@Z @ 30 NONAME ; class ChspsODT * ChspsODT::NewLC(class TDesC8 const &)
+ ?ProviderName@ChspsODT@@QBEABVTDesC16@@XZ @ 31 NONAME ; class TDesC16 const & ChspsODT::ProviderName(void) const
+ ?ResourceL@ChspsODT@@QBEAAVChspsResource@@H@Z @ 32 NONAME ; class ChspsResource & ChspsODT::ResourceL(int) const
+ ?OdtLanguage@ChspsODT@@QBEHXZ @ 33 NONAME ; int ChspsODT::OdtLanguage(void) const
+ ?MarshalHeaderL@ChspsODT@@QBEPAVHBufC8@@XZ @ 34 NONAME ; class HBufC8 * ChspsODT::MarshalHeaderL(void) const
+ ?RootUid@ChspsODT@@QBEHXZ @ 35 NONAME ; int ChspsODT::RootUid(void) const
+ ?ProviderUid@ChspsODT@@QBEHXZ @ 36 NONAME ; int ChspsODT::ProviderUid(void) const
+ ?SetDescriptionL@ChspsODT@@QAEXABVTDesC16@@@Z @ 37 NONAME ; void ChspsODT::SetDescriptionL(class TDesC16 const &)
+ ?ThemeShortName@ChspsODT@@QBEABVTDesC16@@XZ @ 38 NONAME ; class TDesC16 const & ChspsODT::ThemeShortName(void) const
+ ?ThemeFullName@ChspsODT@@QBEABVTDesC16@@XZ @ 39 NONAME ; class TDesC16 const & ChspsODT::ThemeFullName(void) const
+ ?SetThemeVersionL@ChspsODT@@QAEXABVTDesC16@@@Z @ 40 NONAME ; void ChspsODT::SetThemeVersionL(class TDesC16 const &)
+ ?InternalizeResourceListL@ChspsODT@@QAEXAAVRReadStream@@@Z @ 41 NONAME ; void ChspsODT::InternalizeResourceListL(class RReadStream &)
+ ?CloneL@ChspsODT@@QAEXAAV1@@Z @ 42 NONAME ; void ChspsODT::CloneL(class ChspsODT &)
+ ?SetPreviewFileL@ChspsODT@@QAEXABVTDesC16@@@Z @ 43 NONAME ; void ChspsODT::SetPreviewFileL(class TDesC16 const &)
+ ?SetOdtLanguage@ChspsODT@@QAEXH@Z @ 44 NONAME ; void ChspsODT::SetOdtLanguage(int)
+ ?ExternalizeHeaderL@ChspsODT@@QBEXAAVRWriteStream@@@Z @ 45 NONAME ; void ChspsODT::ExternalizeHeaderL(class RWriteStream &) const
+ ?InternalizeHeaderL@ChspsODT@@QAEXAAVRReadStream@@@Z @ 46 NONAME ; void ChspsODT::InternalizeHeaderL(class RReadStream &)
+ ?ExternalizeL@ChspsODT@@QBEXAAVRWriteStream@@@Z @ 47 NONAME ; void ChspsODT::ExternalizeL(class RWriteStream &) const
+ ?SetProviderUid@ChspsODT@@QAEXH@Z @ 48 NONAME ; void ChspsODT::SetProviderUid(int)
+ ?UnMarshalHeaderL@ChspsODT@@QAEXABVTDesC8@@@Z @ 49 NONAME ; void ChspsODT::UnMarshalHeaderL(class TDesC8 const &)
?LogoFile@ChspsODT@@QBEABVTDesC16@@XZ @ 50 NONAME ; class TDesC16 const & ChspsODT::LogoFile(void) const
+ ?ThemeUid@ChspsODT@@QBEHXZ @ 51 NONAME ; int ChspsODT::ThemeUid(void) const
+ ?DeleteAllResources@ChspsODT@@QAEXXZ @ 52 NONAME ; void ChspsODT::DeleteAllResources(void)
--- a/homescreenpluginsrv/hspsodt/eabi/hspsodtu.def Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsodt/eabi/hspsodtu.def Fri Mar 12 15:43:54 2010 +0200
@@ -3,51 +3,53 @@
_ZN8ChspsODT11SetThemeUidEi @ 2 NONAME
_ZN8ChspsODT12AddResourceLEP13ChspsResource @ 3 NONAME
_ZN8ChspsODT12InternalizeLER11RReadStream @ 4 NONAME
- _ZN8ChspsODT14SetOdtLanguageEi @ 5 NONAME
- _ZN8ChspsODT14SetProviderUidEi @ 6 NONAME
- _ZN8ChspsODT15DeleteResourceLEi @ 7 NONAME
- _ZN8ChspsODT16CopyDomDocumentLER16ChspsDomDocument @ 8 NONAME
- _ZN8ChspsODT16SetProviderNameLERK7TDesC16 @ 9 NONAME
- _ZN8ChspsODT16SetThemeVersionLERK7TDesC16 @ 10 NONAME
- _ZN8ChspsODT16UnMarshalHeaderLERK6TDesC8 @ 11 NONAME
- _ZN8ChspsODT17SetThemeFullNameLERK7TDesC16 @ 12 NONAME
- _ZN8ChspsODT17UnMarshalHeaderLCERK6TDesC8 @ 13 NONAME
- _ZN8ChspsODT18InternalizeHeaderLER11RReadStream @ 14 NONAME
- _ZN8ChspsODT18SetPackageVersionLERK7TDesC16 @ 15 NONAME
- _ZN8ChspsODT18SetThemeShortNameLERK7TDesC16 @ 16 NONAME
- _ZN8ChspsODT20SetConfigurationTypeEj @ 17 NONAME
- _ZN8ChspsODT24InternalizeResourceListLER11RReadStream @ 18 NONAME
- _ZN8ChspsODT4NewLEv @ 19 NONAME
- _ZN8ChspsODT5NewLCERK6TDesC8 @ 20 NONAME
- _ZN8ChspsODT6CloneLEv @ 21 NONAME
- _ZN8ChspsODT8SetFlagsEj @ 22 NONAME
- _ZNK8ChspsODT11DomDocumentEv @ 23 NONAME
- _ZNK8ChspsODT11OdtLanguageEv @ 24 NONAME
- _ZNK8ChspsODT11ProviderUidEv @ 25 NONAME
- _ZNK8ChspsODT12ExternalizeLER12RWriteStream @ 26 NONAME
- _ZNK8ChspsODT12ProviderNameEv @ 27 NONAME
- _ZNK8ChspsODT12ThemeVersionEv @ 28 NONAME
- _ZNK8ChspsODT13ResourceCountEv @ 29 NONAME
- _ZNK8ChspsODT13ThemeFullNameEv @ 30 NONAME
- _ZNK8ChspsODT14MarshalHeaderLEv @ 31 NONAME
- _ZNK8ChspsODT14PackageVersionEv @ 32 NONAME
- _ZNK8ChspsODT14ThemeShortNameEv @ 33 NONAME
- _ZNK8ChspsODT17ConfigurationTypeEv @ 34 NONAME
- _ZNK8ChspsODT24ExternalizeResourceListLER12RWriteStream @ 35 NONAME
- _ZNK8ChspsODT5FlagsEv @ 36 NONAME
- _ZNK8ChspsODT7RootUidEv @ 37 NONAME
- _ZNK8ChspsODT8ThemeUidEv @ 38 NONAME
- _ZNK8ChspsODT9ResourceLEi @ 39 NONAME
- _ZTI8ChspsODT @ 40 NONAME ; #<TI>#
- _ZTV8ChspsODT @ 41 NONAME ; #<VT>#
- _ZN8ChspsODT9SetFamilyEm @ 42 NONAME
- _ZNK8ChspsODT6FamilyEv @ 43 NONAME
- _ZN8ChspsODT16SetMultiInstanceEi @ 44 NONAME
- _ZNK8ChspsODT13MultiInstanceEv @ 45 NONAME
- _ZN8ChspsODT12SetLogoFileLERK7TDesC16 @ 46 NONAME
- _ZN8ChspsODT15SetDescriptionLERK7TDesC16 @ 47 NONAME
- _ZN8ChspsODT15SetPreviewFileLERK7TDesC16 @ 48 NONAME
- _ZNK8ChspsODT11DescriptionEv @ 49 NONAME
- _ZNK8ChspsODT11PreviewFileEv @ 50 NONAME
- _ZNK8ChspsODT8LogoFileEv @ 51 NONAME
+ _ZN8ChspsODT12SetLogoFileLERK7TDesC16 @ 5 NONAME
+ _ZN8ChspsODT14SetOdtLanguageEi @ 6 NONAME
+ _ZN8ChspsODT14SetProviderUidEi @ 7 NONAME
+ _ZN8ChspsODT15DeleteResourceLEi @ 8 NONAME
+ _ZN8ChspsODT15SetDescriptionLERK7TDesC16 @ 9 NONAME
+ _ZN8ChspsODT15SetPreviewFileLERK7TDesC16 @ 10 NONAME
+ _ZN8ChspsODT16CopyDomDocumentLER16ChspsDomDocument @ 11 NONAME
+ _ZN8ChspsODT16SetMultiInstanceEi @ 12 NONAME
+ _ZN8ChspsODT16SetProviderNameLERK7TDesC16 @ 13 NONAME
+ _ZN8ChspsODT16SetThemeVersionLERK7TDesC16 @ 14 NONAME
+ _ZN8ChspsODT16UnMarshalHeaderLERK6TDesC8 @ 15 NONAME
+ _ZN8ChspsODT17SetThemeFullNameLERK7TDesC16 @ 16 NONAME
+ _ZN8ChspsODT17UnMarshalHeaderLCERK6TDesC8 @ 17 NONAME
+ _ZN8ChspsODT18InternalizeHeaderLER11RReadStream @ 18 NONAME
+ _ZN8ChspsODT18SetPackageVersionLERK7TDesC16 @ 19 NONAME
+ _ZN8ChspsODT18SetThemeShortNameLERK7TDesC16 @ 20 NONAME
+ _ZN8ChspsODT20SetConfigurationTypeEj @ 21 NONAME
+ _ZN8ChspsODT24InternalizeResourceListLER11RReadStream @ 22 NONAME
+ _ZN8ChspsODT4NewLEv @ 23 NONAME
+ _ZN8ChspsODT5NewLCERK6TDesC8 @ 24 NONAME
+ _ZN8ChspsODT6CloneLERS_ @ 25 NONAME
+ _ZN8ChspsODT8SetFlagsEj @ 26 NONAME
+ _ZN8ChspsODT9SetFamilyEm @ 27 NONAME
+ _ZNK8ChspsODT11DescriptionEv @ 28 NONAME
+ _ZNK8ChspsODT11DomDocumentEv @ 29 NONAME
+ _ZNK8ChspsODT11OdtLanguageEv @ 30 NONAME
+ _ZNK8ChspsODT11PreviewFileEv @ 31 NONAME
+ _ZNK8ChspsODT11ProviderUidEv @ 32 NONAME
+ _ZNK8ChspsODT12ExternalizeLER12RWriteStream @ 33 NONAME
+ _ZNK8ChspsODT12ProviderNameEv @ 34 NONAME
+ _ZNK8ChspsODT12ThemeVersionEv @ 35 NONAME
+ _ZNK8ChspsODT13MultiInstanceEv @ 36 NONAME
+ _ZNK8ChspsODT13ResourceCountEv @ 37 NONAME
+ _ZNK8ChspsODT13ThemeFullNameEv @ 38 NONAME
+ _ZNK8ChspsODT14MarshalHeaderLEv @ 39 NONAME
+ _ZNK8ChspsODT14PackageVersionEv @ 40 NONAME
+ _ZNK8ChspsODT14ThemeShortNameEv @ 41 NONAME
+ _ZNK8ChspsODT17ConfigurationTypeEv @ 42 NONAME
+ _ZNK8ChspsODT24ExternalizeResourceListLER12RWriteStream @ 43 NONAME
+ _ZNK8ChspsODT5FlagsEv @ 44 NONAME
+ _ZNK8ChspsODT6CloneLEv @ 45 NONAME
+ _ZNK8ChspsODT6FamilyEv @ 46 NONAME
+ _ZNK8ChspsODT7RootUidEv @ 47 NONAME
+ _ZNK8ChspsODT8LogoFileEv @ 48 NONAME
+ _ZNK8ChspsODT8ThemeUidEv @ 49 NONAME
+ _ZNK8ChspsODT9ResourceLEi @ 50 NONAME
+ _ZTI8ChspsODT @ 51 NONAME
+ _ZTV8ChspsODT @ 52 NONAME
+ _ZN8ChspsODT18DeleteAllResourcesEv @ 53 NONAME
--- a/homescreenpluginsrv/hspsodt/src/hspsodt.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspsodt/src/hspsodt.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -50,6 +50,47 @@
}
// -----------------------------------------------------------------------------
+// ChspsODT::CopyODTDataL()
+// Helper to ODT cloning. Prevents duplicate code in two clone methods.
+// -----------------------------------------------------------------------------
+//
+void ChspsODT::CopyODTDataL( const ChspsODT& aSource, ChspsODT& aTarget )
+ {
+ // Properties.
+ aTarget.SetFamily( aSource.Family() );
+ aTarget.SetConfigurationType( aSource.ConfigurationType() );
+ aTarget.SetRootUid( aSource.RootUid() );
+ aTarget.SetProviderUid( aSource.ProviderUid() );
+ aTarget.SetThemeUid( aSource.ThemeUid() );
+ aTarget.SetProviderNameL( aSource.ProviderName() );
+ aTarget.SetThemeFullNameL( aSource.ThemeFullName() );
+ aTarget.SetThemeShortNameL( aSource.ThemeShortName() );
+ aTarget.SetThemeVersionL( aSource.ThemeVersion() );
+ aTarget.SetPackageVersionL( aSource.PackageVersion() );
+ aTarget.SetDescriptionL( aSource.Description() );
+ aTarget.SetLogoFileL( aSource.LogoFile() );
+ aTarget.SetPreviewFileL( aSource.PreviewFile() );
+ aTarget.SetMultiInstance( aSource.MultiInstance() );
+ aTarget.SetOdtLanguage( aSource.OdtLanguage() );
+ aTarget.SetFlags( aSource.Flags() );
+
+ // Resources.
+ aTarget.DeleteAllResources();
+ TInt resourceCount = aSource.ResourceCount();
+ for ( TInt index = 0; index < resourceCount ; index++ )
+ {
+ ChspsResource* resource = ( aSource.ResourceL( index ) ).CloneL();
+ CleanupStack::PushL( resource );
+ aTarget.AddResourceL( resource );
+ CleanupStack::Pop( resource );
+ resource = NULL;
+ }
+
+ // DOM tree.
+ aTarget.CopyDomDocumentL( aSource.DomDocument() );
+ }
+
+// -----------------------------------------------------------------------------
// ChspsODT::NewL
// Two-phased constructor.
// -----------------------------------------------------------------------------
@@ -204,6 +245,7 @@
aStream.WriteUint32L( iProviderUid );
aStream.WriteUint32L( iThemeUid );
aStream.WriteInt32L( iMultiInstance );
+
if ( iDescription )
{
aStream << *iDescription;
@@ -263,8 +305,10 @@
{
aStream << KNullDesC;
}
+
aStream.WriteInt32L( iLanguage );
aStream.WriteUint32L( iFlags );
+
// end of the header delimiter
aStream.WriteL( KDelim );
}
@@ -394,6 +438,16 @@
}
// -----------------------------------------------------------------------------
+// ChspsODT::DeleteResourceListL
+// Deletes all resources from the ODT.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+EXPORT_C void ChspsODT::DeleteAllResources()
+ {
+ iResourceList->ResetAndDestroy();
+ }
+
+// -----------------------------------------------------------------------------
// ChspsODT::ResourceL
// Get the resource by the index
// (other items were commented in a header).
@@ -462,7 +516,6 @@
}
}
-
// -----------------------------------------------------------------------------
// ChspsODT::SetRootUid
// Set RootUid
@@ -689,61 +742,30 @@
{
return *iDomDocument;
}
-
+
// -----------------------------------------------------------------------------
// ChspsODT::CloneL()
// Makes a clone of this ODT and returns pointer to it
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-EXPORT_C ChspsODT* ChspsODT::CloneL()
+EXPORT_C ChspsODT* ChspsODT::CloneL() const
{
- ChspsODT* clone = new (ELeave) ChspsODT;
- CleanupStack::PushL( clone );
- clone->ConstructL();
- clone->SetConfigurationType( iConfigurationType );
- clone->SetRootUid( iRootUid );
- clone->SetProviderUid( iProviderUid );
- clone->SetThemeUid( iThemeUid );
- if( iProviderName )
- {
- clone->SetProviderNameL( *iProviderName );
- }
- if( iThemeFullName )
- {
- clone->SetThemeFullNameL( *iThemeFullName );
- }
- if( iThemeShortName )
- {
- clone->SetThemeShortNameL( *iThemeShortName );
- }
- if( iThemeVersion )
- {
- clone->SetThemeVersionL( *iThemeVersion );
- }
- if( iPackageVersion )
- {
- clone->SetPackageVersionL( *iPackageVersion );
- }
- if( iDescription )
- {
- clone->SetDescriptionL( *iDescription );
- }
- clone->SetOdtLanguage( iLanguage );
- clone->SetFlags( iFlags );
-
- TInt resourceCount = iResourceList->Count();
-
- for ( TInt index = 0; index < resourceCount ; index++ )
- {
- ChspsResource& resource = ResourceL( index );
- clone->AddResourceL( resource.CloneL() );
- }
-
- CleanupStack::Pop( clone );
+ ChspsODT* clone = ChspsODT::NewL();
+ CleanupStack::PushL( clone );
+ ChspsODT::CopyODTDataL( *this, *clone );
+ CleanupStack::Pop( clone );
return clone;
}
-
+
+// -----------------------------------------------------------------------------
+// Copies data from an exisiting ODT
+// -----------------------------------------------------------------------------
+EXPORT_C void ChspsODT::CloneL( ChspsODT& aODT )
+ {
+ ChspsODT::CopyODTDataL( aODT, *this );
+ }
+
// -----------------------------------------------------------------------------
// ChspsODT::CopyDomDocumentL()
// Clones the aDom and sets it as this ChspsODT's DomDocument
--- a/homescreenpluginsrv/hspspluginregistry/src/hspsdefinitionrepository.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/hspspluginregistry/src/hspsdefinitionrepository.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -63,8 +63,9 @@
// might leave.
// -----------------------------------------------------------------------------
//
-ChspsDefinitionRepository::ChspsDefinitionRepository()
- {
+ChspsDefinitionRepository::ChspsDefinitionRepository() :
+ iCacheLastODT( NULL )
+ {
}
// -----------------------------------------------------------------------------
@@ -122,6 +123,8 @@
iObservers.Close();
delete iPath;
+ delete iCacheLastODT;
+
iTempFileName1 = KNullDesC;
iTempFileName2 = KNullDesC;
}
@@ -200,6 +203,13 @@
}
#endif
+ if( aODT.ConfigurationType() == EhspsAppConfiguration )
+ {
+ delete iCacheLastODT;
+ iCacheLastODT = NULL;
+ iCacheLastODT = aODT.CloneL();
+ }
+
return ret;
}
@@ -212,6 +222,7 @@
EXPORT_C TInt ChspsDefinitionRepository::GetOdtL( ChspsODT& aODT )
{
TInt errorCode = KErrNone;
+
if ( aODT.Flags() & EhspsThemeStatusLicenceeDefault )
{
iLicenseDefault = ETrue;
@@ -221,12 +232,23 @@
iLicenseDefault = EFalse;
}
- TRAP( errorCode, GetPathL( aODT, EResourceODT ));
- if ( !errorCode )
- {
- errorCode = ReadFromFileL( *iPath, aODT );
- }
- iLicenseDefault = EFalse;
+ if( iCacheLastODT &&
+ iCacheLastODT->RootUid() == aODT.RootUid() &&
+ iCacheLastODT->ThemeUid() == aODT.ThemeUid() )
+ {
+ aODT.CloneL( *iCacheLastODT );
+ }
+ else
+ {
+ TRAP( errorCode, GetPathL( aODT, EResourceODT ));
+ if ( !errorCode )
+ {
+ errorCode = ReadFromFileL( *iPath, aODT );
+ }
+ }
+
+ iLicenseDefault = EFalse;
+
return errorCode;
}
--- a/homescreenpluginsrv/inc/hspsdefinitionrepository.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/inc/hspsdefinitionrepository.h Fri Mar 12 15:43:54 2010 +0200
@@ -491,7 +491,10 @@
#ifdef HSPS_LOG_ACTIVE
// Log bus. Not owned.
ChspsLogBus* iLogBus;
-#endif
+#endif
+
+ // Cached copy of last retrieved ODT.
+ ChspsODT* iCacheLastODT;
};
#endif // C_hspsDEFINITIONREPOSITORY_H
--- a/homescreenpluginsrv/inc/hspsdomstringpool.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/inc/hspsdomstringpool.h Fri Mar 12 15:43:54 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -15,25 +15,24 @@
*
*/
-
-
-#ifndef hsps_DOM_STRING_POOL_H
-#define hsps_DOM_STRING_POOL_H
+#ifndef HSPS_DOM_STRING_POOL_H
+#define HSPS_DOM_STRING_POOL_H
// INCLUDES
#include <e32base.h>
#include <s32strm.h>
+#include "hspsdomstringpooloptimizer.h"
// CLASS DECLARATION
/**
- * Class utilize flyweight pattern. Dom strings are stored once
- * and referred with index. Class can be serialized.
- *
- * @lib hspsdomdocument.lib
- * @since S60 5.0
- * @ingroup group_hspsdom
- */
+* @ingroup group_hspsdom
+* Class utilize flyweight pattern. Dom strings are stored once
+* and referred with index. Class can be serialized.
+*
+* @lib xndomdocument.lib
+* @since Series 60 3.1
+*/
class ChspsDomStringPool : public CBase
{
public: // Constructors and destructor
@@ -41,23 +40,26 @@
/**
* Two-phased constructor.
*
- * @since S60 5.0
+ * @param aAllowDuplicates ETrue if duplicates are to be allowed.
+ * Supported for legacy reasons.
*/
- static ChspsDomStringPool* NewL();
-
+ static ChspsDomStringPool* NewL( const TBool aAllowDuplicates = EFalse );
+
/**
* Two-phased stream constructor.
*
- * @since S60 5.0
- * @param aStream Source stream.
- */
- static ChspsDomStringPool* NewL( RReadStream& aStream );
+ * @param aStream Stream where string pool is internalized.
+ * @param aAllowDuplicates ETrue if duplicates are to be allowed.
+ * Supported for legacy reasons.
+ */
+ static ChspsDomStringPool* NewL( RReadStream& aStream,
+ const TBool aAllowDuplicates = EFalse );
/**
* Destructor.
*/
virtual ~ChspsDomStringPool();
-
+
public:
/**
* Make a copy from original StringPool.
@@ -65,39 +67,63 @@
* @return Pointer to a string pool. Ownership is transferred to a caller.
*/
ChspsDomStringPool* CloneL();
+
public: //Adding
/**
* Set dom string into string pool.
*
- * @since S60 5.0
* @param aString String to add to string pool
* @return Index (reference) to string pool
*/
IMPORT_C TInt AddStringL( const TDesC8& aString );
-
+
+ /**
+ * Set dom string into string pool.
+ *
+ * @param aString String to add to string pool. OWNERSHIP TRANSFERRED!
+ * @return Index (reference) to string pool
+ */
+ TInt AddStringL( HBufC8* aString );
+
+ /**
+ * Add all string from another string pool.
+ *
+ * @param aStringPool Source string pool.
+ */
+ void AddAllL( ChspsDomStringPool& aStringPool );
+
public: //Accessing
/**
- * Get pointer to the node element name.
- * @param aStringRef StringRef.
+ * Get reference to string.
+ *
+ * @param aMap Map object which has index to name string
* @return Pointer to the name
*/
const TDesC8& String( const TInt aStringRef );
/**
* Get object's data size in bytes.
+ *
* @return Data size in bytes
*/
TInt Size() const;
+
+ /**
+ * Get amount of strings.
+ */
+ TInt Count() const;
/**
- * Externalize object
+ * Externalize object.
+ *
* @param aStream Output stream
*/
void ExternalizeL( RWriteStream& aStream ) const;
/**
- * Internalize object
+ * Internalize object.
+ *
* @param aStream Input stream
*/
void InternalizeL( RReadStream& aStream );
@@ -106,21 +132,41 @@
/**
* C++ default constructor.
+ *
+ * @param aAllowDuplicates ETrue if duplicates are to be allowed.
+ * Supported for legacy reasons.
*/
- ChspsDomStringPool();
+ ChspsDomStringPool( const TBool aAllowDuplicates );
/**
- * By default Symbian 2nd phase constructor is private.
+ * By default Symbian 2nd phase constructor is private.
*/
- void ConstructL();
-
- private:
+ void ConstructL();
+
+ /**
+ * Add string to string pool and to optimizer also.
+ *
+ * @param aNewString String to be added. OWNERSHIP TRANSFERRED.
+ * @param TInt Index to added string.
+ */
+ TInt DoAddStringL( HBufC8* aNewString ) ;
+
+ private:
//String pool
RPointerArray<HBufC8> iStringPool;
-
+
+ /**
+ * String pool optimizer.
+ */
+ ThspsDomStringPoolOptimizer iStringPoolOptimizer;
+ /**
+ * ETrue if string pool can contain duplicate entries. Must
+ * be supported for legacy reasons while loading xuikon odts.
+ */
+ TBool iAllowDuplicates;
};
-#endif // hsps_DOM_STRING_POOL_H
+#endif // HSPS_DOM_STRING_POOL_H
// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenpluginsrv/inc/hspsdomstringpooloptimizer.h Fri Mar 12 15:43:54 2010 +0200
@@ -0,0 +1,153 @@
+/*
+* 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: Optimizer module for ChspsDomStringPool.
+*
+*/
+
+#ifndef HSPS_DOM_STRING_POOL_OPTIMIZER_H
+#define HSPS_DOM_STRING_POOL_OPTIMIZER_H
+
+// INCLUDES
+#include <e32base.h>
+
+// CLASS DECLARATION
+
+/**
+* @ingroup group_hspsdom
+* Optimizer module entry for ChspsDomStringPool.
+*
+* @lib hspsdomdocument.lib
+* @since Series 60 5.2
+*/
+class ThspsDomStringPoolOptimizerEntry
+ {
+ public: // Construction.
+ /**
+ * Constructor.
+ *
+ * @param aIndex Index.
+ * @param aString String.
+ */
+ ThspsDomStringPoolOptimizerEntry( TInt aIndex, const TDesC8& aString );
+
+ public: // Data.
+ /**
+ * Index of string in actual string pool.
+ */
+ TInt iIndex;
+
+ /**
+ * Reference to string in string pool.
+ */
+ const TDesC8& iString;
+ };
+
+/**
+* @ingroup group_hspsdom
+* Optimizer module for ChspsDomStringPool.
+*
+* @lib hspsdomdocument.lib
+* @since Series 60 5.2
+*/
+class ThspsDomStringPoolOptimizer
+ {
+ public:
+ /**
+ * Add entry to optimizer list.
+ *
+ * @param aEntry Entry to be added.
+ */
+ void AddEntryL( ThspsDomStringPoolOptimizerEntry& aEntry );
+
+ /**
+ * Get index for string.
+ *
+ * @param aString Reference to given string.
+ * @return TInt Index to actual string pool for string if found.
+ * If string is not found will return KErrNotFound.
+ */
+ TInt GetIndex( const TDesC8& aString );
+
+ /**
+ * Reset.
+ */
+ void Reset();
+
+ /**
+ * Close allocated resources.
+ */
+ void Close();
+
+ /**
+ * Get item count.
+ */
+ TInt Count();
+
+ /**
+ * Get entry.
+ *
+ * @param aIndex Index to Entry.
+ */
+ ThspsDomStringPoolOptimizerEntry& Entry( const TInt aIndex );
+
+ private:
+ /**
+ * Find entry from alphabetic list.
+ * Uses binary search.
+ *
+ * @param aString Reference to string to be searched for.
+ * @param aLeft Left limit for binary search
+ * @param aRight Right limit for binary search.
+ *
+ * @return Index to OPTIMIZER ARRAY. KErrNotFound if
+ * given string is not found.
+ */
+ TInt FindEntry( const TDesC8& aString,
+ const TInt aLeft,
+ const TInt aRight );
+
+ /**
+ * Find a position clue for given string.
+ *
+ * Will return index that can be used to initiate linear
+ * search. Uses binary search to limit required comparisons
+ * when string pools starts to fill.
+ *
+ * Note: Returned index is not absolute! it must be
+ * only used as a start index for linear searching.
+ *
+ * Returned index will be quite close to actual insertion position.
+ * it will be 0 - 2 steps backward from actual position.
+ *
+ * @param aString Reference to string.
+ * @param aLeft Left limit for binary search
+ * @param aRight Right limit for binary search.
+ *
+ * @return Index to start searching for position
+ * for given string.
+ */
+ TInt FindInsertionIndexEstimate( const TDesC8& aString,
+ const TInt aLeft,
+ const TInt aRight );
+
+ private: // Data.
+ /**
+ * Array of optimizer entries.
+ */
+ RArray<ThspsDomStringPoolOptimizerEntry> iEntries;
+ };
+
+#endif // HSPS_DOM_STRING_POOL_OPTIMIZER_H
+
+// End of File
--- a/homescreenpluginsrv/inc/hspsodt.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreenpluginsrv/inc/hspsodt.h Fri Mar 12 15:43:54 2010 +0200
@@ -151,6 +151,13 @@
* @param aIndex Index of the resource to be deleted.
*/
IMPORT_C void DeleteResourceL( TInt aIndex );
+
+ /**
+ * Deletes all resources from the ODT.
+ *
+ * @since S60 5.0
+ */
+ IMPORT_C void DeleteAllResources();
/**
* Gets a resource.
@@ -344,8 +351,15 @@
* @since S60 5.0
* @return ChspsODT* pointer to the cloned ODT.
*/
- IMPORT_C ChspsODT* CloneL();
-
+ IMPORT_C ChspsODT* CloneL() const;
+
+ /**
+ * Clones given ODT to this ODT.
+ *
+ * @since S60 5.0
+ * @param aODT Source ODT.
+ */
+ IMPORT_C void CloneL( ChspsODT& aODT );
/**
* Clones the aDom and sets it as this ChspsODT's DomDocument.
@@ -475,6 +489,15 @@
*/
void ConstructL();
+ private:
+ /**
+ * Helper to ODT cloning. Prevents duplicate code in two clone methods.
+ *
+ * @param aSource Source ODT
+ * @param aTarget Target ODT
+ */
+ static void CopyODTDataL( const ChspsODT& aSource, ChspsODT& aTarget );
+
private: // Data
// Family mask (bits for e.g. vga, qhd_tch etc resolutions)
--- a/homescreensrv_plat/ai_plugin_management_api/inc/aidevicestatuscontentmodel.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/ai_plugin_management_api/inc/aidevicestatuscontentmodel.h Fri Mar 12 15:43:54 2010 +0200
@@ -46,6 +46,7 @@
EAiDeviceStatusContentGeneralIndicator,
EAiDeviceStatusContentVHZText,
EAiDeviceStatusContentCUGMCNIndicator
+ ,EAiDeviceStatusContentNetRegStatus
};
@@ -64,7 +65,7 @@
const wchar_t KAiDeviceStatusContentGeneralIndicator_Cid[] = L"GeneralIndicator";
const wchar_t KAiDeviceStatusContentVHZText_Cid[] = L"VHZText";
const wchar_t KAiDeviceStatusContentCUGMCNIndicator_Cid[] = L"CUGMCNIndicator";
-
+const wchar_t KAiDeviceStatusContentNetRegStatus_Cid[] = L"NetRegStatus";
const char KAiDeviceStatusMimeTypeTextPlain[] = "text/plain";
@@ -130,6 +131,11 @@
//Published data is localized text, for example "Group 1" or MCN message
{ EAiDeviceStatusContentCUGMCNIndicator, KAiDeviceStatusContentCUGMCNIndicator_Cid,
KAiDeviceStatusMimeTypeTextPlain }
+
+ //Published data is network registration status
+ , { EAiDeviceStatusContentNetRegStatus, KAiDeviceStatusContentNetRegStatus_Cid,
+ KAiDeviceStatusMimeTypeTextPlain }
+
};
const TInt KAiDeviceStatusContentCount = sizeof( KAiDeviceStatusContent ) /
@@ -142,11 +148,13 @@
{
EAiDeviceStatusResourceSIMRegFail,
EAiDeviceStatusResourceNWOk,
- EAiDeviceStatusResourceNWLost
+ EAiDeviceStatusResourceNWLost
+ ,EAiDeviceStatusResourceNetRegFail
};
const wchar_t KAiDeviceStatusResourceSIMRegFail_Cid[] = L"SIMRegFail";
-const wchar_t KAiDeviceStatusResourceShowNWLost_Cid[] = L"NWLost";
+const wchar_t KAiDeviceStatusResourceShowNWLost_Cid[] = L"NWLost";
+const wchar_t KAiDeviceStatusResourceNetRegFail_Cid[] = L"NetRegFail";
const TAiContentItem KAiDeviceStatusResources[] =
@@ -155,7 +163,10 @@
{ EAiDeviceStatusResourceSIMRegFail, KAiDeviceStatusResourceSIMRegFail_Cid,
KAiDeviceStatusMimeTypeTextPlain },
{ EAiDeviceStatusResourceNWLost, KAiDeviceStatusResourceShowNWLost_Cid,
- KAiDeviceStatusMimeTypeTextPlain },
+ KAiDeviceStatusMimeTypeTextPlain },
+ { EAiDeviceStatusResourceNetRegFail, KAiDeviceStatusResourceNetRegFail_Cid,
+ KAiDeviceStatusMimeTypeTextPlain },
+
};
const TInt KAiDeviceStatusResourceCount = sizeof( KAiDeviceStatusResources ) /
--- a/homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/hs_content_control_api/inc/hscontentcontroller.h Fri Mar 12 15:43:54 2010 +0200
@@ -62,25 +62,39 @@
{
public:
/**
- * Fills an array of CHsContentInfo. Both widget and template types are appended.
- * @param aArray Array of CHsContentInfo
+ * Returns the list of available Home screen widgets
+ * @param aArray List of widgets
+ * @return KErrNone on success, any of system wide error codes
*/
virtual TInt WidgetListL( CHsContentInfoArray& aArray ) = 0;
/**
- * Fills an array of CHsContentInfo. View types are appended.
- * @param aArray Array of CHsContentInfo
+ * Returns the list of Home screen widgets included in an application
+ * configuration or a view
+ * @param aInfo Content info defining the application configuration
+ * or the view which widget list is requested
+ * @param aArray List of widgets
+ * @return KErrNone on success, any of system wide error codes
+ */
+ virtual TInt WidgetListL( CHsContentInfo& aInfo, CHsContentInfoArray& aArray ) = 0;
+
+ /**
+ * Returns the list of available Home screen views
+ * @param aArray List of views
+ * @return KErrNone on success, any of system wide error codes
*/
virtual TInt ViewListL( 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
*/
virtual TInt AppListL( CHsContentInfoArray& aArray ) = 0;
/**
- * Adds a widget to the active view.
- * @param aInfo Content info object
+ * Adds a widget to the active Home screen view.
+ * @param aInfo Widget request to be added
* @return KErrNone on success, any of system wide error codes,
* KHsErrorViewFull, KHsErrorMaxInstanceCountExceeded or
* KHsErrorDoesNotFit
@@ -89,37 +103,50 @@
/**
* Removes a widget from the configuration.
- * @param aInfo Content info object
+ * @param aInfo Widget request to be removed
+ * @return KErrNone on success, any of system wide error codes
*/
virtual TInt RemoveWidgetL( CHsContentInfo& aInfo ) = 0;
/**
- *
+ * Adds a view to the active Home screen application configuration.
+ * @param aInfo View request to be added
+ * @return KErrNone on success, any of system wide error codes
*/
virtual TInt AddViewL( CHsContentInfo& aInfo ) = 0;
/**
- *
+ * Removes a view from the configuration.
+ * @param aInfo View request to be removed
+ * @return KErrNone on success, any of system wide error codes
*/
virtual TInt RemoveViewL( CHsContentInfo& aInfo ) = 0;
/**
- *
+ * Activates the Home screen view
+ * @param aInfo View request to be activated
+ * @return KErrNone on success, any of system wide error codes
*/
virtual TInt ActivateViewL( CHsContentInfo& aInfo ) = 0;
/**
- *
+ * Activates the Home screen application configuration
+ * @param aInfo Application configuration request to be activated
+ * @return KErrNone on success, any of system wide error codes
*/
virtual TInt ActivateAppL( CHsContentInfo& aInfo ) = 0;
/**
- *
+ * Returns the active Home screen view
+ * @param aInfo Active view
+ * @return KErrNone on success, any of system wide error codes
*/
virtual TInt ActiveViewL( CHsContentInfo& aInfo ) = 0;
/**
- *
+ * Returns the active Home screen application configuration
+ * @param aInfo Active application configuration
+ * @return KErrNone on success, any of system wide error codes
*/
virtual TInt ActiveAppL( CHsContentInfo& aInfo ) = 0;
--- a/homescreensrv_plat/hs_settings_api/inc/hspluginsettings.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/hs_settings_api/inc/hspluginsettings.h Fri Mar 12 15:43:54 2010 +0200
@@ -52,39 +52,59 @@
* @lib HomeScreenSettingsIf.lib
* @since S60 v5.0
*/
-class CHomescreenSettings:
+NONSHARABLE_CLASS( CHomescreenSettings ) :
public CBase,
public MLiwNotifyCallback,
public MHomescreenSettingsIf
{
+public: // static methods
+ /**
+ * Get instance to settings API.
+ *
+ * InitializeL must be called before calling this method.
+ * Otherwise NULL is returned. InitializeL and Instance
+ * must be called within same thread since TLS is used
+ * to storage instance data.
+ *
+ * @return CHomescreenSettings* Pointer to settings api.
+ * Can return NULL in case of
+ * error.
+ */
+ IMPORT_C static CHomescreenSettings* Instance();
+
+ /**
+ * Initialize settings api.
+ *
+ * There must be one UnInitialize call for each Initialize call
+ * in order to prevent memory leaking.
+ * (Implementation contains reference counting)
+ */
+ IMPORT_C static void InitializeL( const TDesC8& aAppUid );
+
+ /**
+ * Uninitialize settings api.
+ *
+ * There must be one UnInitialize call for each Initialize call
+ * in order to prevent memory leaking.
+ * (Implementation contains reference counting)
+ */
+ IMPORT_C static void UnInitialize();
+
public:
/**
- * Two-phased constructor.
+ * Add observer
*
- * @param aAppUid Application uid in integer format
- * @param aObserver Observer
+ * @param aObserver Observer to be added.
*/
- IMPORT_C static CHomescreenSettings* NewL(
- const TDesC8& aAppUid,
- const TDesC8& aPluginId,
- MHomeScreenSettingsObserver* aObserver );
+ IMPORT_C void AddObserverL( MHomeScreenSettingsObserver* aObserver );
/**
- * Two-phased constructor.
+ * Remove observer
*
- * @param aAppUid Application uid in integer format
- * @param aObserver Observer
- */
- IMPORT_C static CHomescreenSettings* NewLC(
- const TDesC8& aAppUid,
- const TDesC8& aPluginId,
- MHomeScreenSettingsObserver* aObserver );
+ * @param aObserver Observer to be removed.
+ */
+ IMPORT_C void RemoveObserver( MHomeScreenSettingsObserver* aObserver );
- /**
- * Destructor.
- */
- IMPORT_C virtual ~CHomescreenSettings();
-
public:
/**
* From MHomescreenSettingsIf
@@ -114,19 +134,33 @@
IMPORT_C TInt SetSettingsL(
const TDesC8& aPluginId,
const RPointerArray<CItemMap>& aSettings,
- const TBool aStoringParam );
-
-
+ const TBool aStoringParam );
+
protected:
/**
+ * Two-phased constructor.
+ *
+ * @param aAppUid Application uid in integer format
+ */
+ static CHomescreenSettings* NewL( const TDesC8& aAppUid );
+
+ /**
+ * Two-phased constructor.
+ *
+ * @param aAppUid Application uid in integer format
+ */
+ static CHomescreenSettings* NewLC(
+ const TDesC8& aAppUid );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CHomescreenSettings();
+
+ /**
* Constructor.
- *
- * @param aAppUid Application uid in integer format
- * @param aObserver Observer
*/
- CHomescreenSettings(
- MHomeScreenSettingsObserver* aObserver,
- const TDesC8& aPluginId );
+ CHomescreenSettings();
/**
* Second phase constructor
@@ -182,7 +216,6 @@
const RPointerArray<CItemMap>& aSettings,
const TDesC8& aStoringParam );
-
protected:
/**
* From MLiwNotifyCallback
@@ -210,18 +243,16 @@
* Owned. Provides hsps services.
*/
MLiwInterface* iHspsInterface;
- /**
- * Not owned. Wrapper observer
- */
- MHomeScreenSettingsObserver* iObserver;
+
/*
* Asynchronous service request tarnsaction id
*/
TInt iTransactionId;
- /**
- * Plugin id
- */
- const TDesC8& iPluginId;
+
+ /*
+ * List of observers. Items not owned!
+ */
+ RPointerArray<MHomeScreenSettingsObserver> iObservers;
};
} //namespace HSPluginSettingsIf
--- a/homescreensrv_plat/hs_settings_api/inc/mhomescreensettingsobserver.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/hs_settings_api/inc/mhomescreensettingsobserver.h Fri Mar 12 15:43:54 2010 +0200
@@ -42,7 +42,7 @@
* @param aPluginUid Plugin uid
* @param aPluginId Plugin id
*/
- virtual TInt SettingsChangedL(
+ virtual void SettingsChangedL(
const TDesC8& aEvent,
const TDesC8& aPluginName,
const TDesC8& aPluginUid,
--- a/homescreensrv_plat/hs_widget_publisher_api/inc/hswidgetpublisherimpl.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/hs_widget_publisher_api/inc/hswidgetpublisherimpl.h Fri Mar 12 15:43:54 2010 +0200
@@ -33,6 +33,7 @@
namespace Hs {
class HsWidget;
+class HsWidgetItem;
typedef std::map<std::string, std::wstring> WidgetContentIdMapType;
@@ -168,7 +169,7 @@
/**
*/
void InsertWidgetDataIdentifiersL( HsWidget& aWidget,
- CLiwDefaultMap* aDataMap );
+ CLiwDefaultMap* aDataMap, const TDesC& aContentType );
/**
*/
@@ -177,7 +178,7 @@
/**
*/
- void InsertWidgetItemsL( HsWidget& aWidget,
+ void InsertWidgetItemL( HsWidgetItem& aWidgetItem,
CLiwDefaultMap* aDataMap );
/**
@@ -190,7 +191,7 @@
/**
*/
- void InsertItemsTriggersL( HsWidget& aWidget,
+ void InsertItemTriggerL( HsWidgetItem& aWidgetItem,
CLiwDefaultMap* aTriggerMap );
/**
--- a/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetpublisherimpl.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/hs_widget_publisher_api/src/hswidgetpublisherimpl.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -198,7 +198,7 @@
{
// remove widget data when widget removed from screen
CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
- InsertWidgetDataIdentifiersL( aWidget, cpdatamap );
+ InsertWidgetDataIdentifiersL( aWidget, cpdatamap, KAll );
// removal may fail if the client has already removed the data
TRAP_IGNORE( RemoveFromCpsL( cpdatamap, KCpData ) );
mWidgetContentIds.erase( aWidget.getIdentifier() );
@@ -411,45 +411,55 @@
// ---------------------------------------------------------------------------
//
void HsWidgetPublisherImpl::PublishWidgetDataL( HsWidget& aWidget )
- {
- CLiwGenericParamList* inParam = &(mServiceHandler->InParamListL());
- CLiwGenericParamList* outParam = &(mServiceHandler->OutParamListL());
-
- TLiwGenericParam type(KType, TLiwVariant(KCpData));
- inParam->AppendL(type);
-
- CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
- InsertWidgetDataIdentifiersL( aWidget, cpdatamap );
-
- CLiwDefaultMap* datamap = CLiwDefaultMap::NewLC();
- InsertWidgetItemsL( aWidget, datamap );
- cpdatamap->InsertL( KDataMap, TLiwVariant( datamap ) );
- InsertWidgetACLL( cpdatamap );
-
- int count = aWidget.itemsCount();
- if( count > 0 )
- {
- CLiwDefaultMap* triggermap = CLiwDefaultMap::NewLC();
- InsertItemsTriggersL( aWidget, triggermap );
- cpdatamap->InsertL( KActionMap, TLiwVariant( triggermap ) );
- CleanupStack::PopAndDestroy( triggermap );
- }
+ {
+ CLiwGenericParamList* inParam = &(mServiceHandler->InParamListL());
+ CLiwGenericParamList* outParam = &(mServiceHandler->OutParamListL());
+ TLiwGenericParam type(KType, TLiwVariant(KCpData));
+
+ int count = aWidget.itemsCount();
+ for( int i = 0; i < count; i++ )
+ {
+ inParam->AppendL(type);
+ CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
- TLiwGenericParam item( KItem, TLiwVariant( cpdatamap ));
- inParam->AppendL( item );
- mServiceInterface->ExecuteCmdL( KAdd,
- *inParam, *outParam);
- TInt ret= ObtainErrorCode( *outParam );
+ HsWidgetItem* const widgetItem = aWidget.getWidgetItem( i );
+
+ // insert widget data identifiers
+ HBufC* itemName = StdStringToUnicodeLC( widgetItem->getItemName());
+ InsertWidgetDataIdentifiersL( aWidget, cpdatamap, *itemName );
+ CleanupStack::PopAndDestroy( itemName );
+
+ // insert widget item
+ CLiwDefaultMap* datamap = CLiwDefaultMap::NewLC();
+ InsertWidgetItemL( *widgetItem, datamap );
+ cpdatamap->InsertL( KDataMap, TLiwVariant( datamap ) );
+
+ // insert widget access control list
+ InsertWidgetACLL( cpdatamap );
+
+ // insert item triggers
+ CLiwDefaultMap* triggermap = CLiwDefaultMap::NewLC();
+ InsertItemTriggerL( *widgetItem, triggermap );
+ cpdatamap->InsertL( KActionMap, TLiwVariant( triggermap ) );
+ CleanupStack::PopAndDestroy( triggermap );
- CleanupStack::PopAndDestroy( datamap );
- CleanupStack::PopAndDestroy( cpdatamap );
-
- item.Reset();
- type.Reset();
- outParam->Reset();
- inParam->Reset();
- User::LeaveIfError( ret );
- }
+ // add to CPS
+ TLiwGenericParam item( KItem, TLiwVariant( cpdatamap ));
+ inParam->AppendL( item );
+ mServiceInterface->ExecuteCmdL( KAdd,
+ *inParam, *outParam);
+ TInt ret= ObtainErrorCode( *outParam );
+
+ CleanupStack::PopAndDestroy( datamap );
+ CleanupStack::PopAndDestroy( cpdatamap );
+
+ item.Reset();
+ outParam->Reset();
+ inParam->Reset();
+ User::LeaveIfError( ret );
+ }
+ type.Reset();
+ }
// ---------------------------------------------------------------------------
//
@@ -562,7 +572,7 @@
CLiwDefaultMap* cpdatamap = CLiwDefaultMap::NewLC();
TRAPD( err,
- InsertWidgetDataIdentifiersL( aWidget, cpdatamap );
+ InsertWidgetDataIdentifiersL( aWidget, cpdatamap, KAll );
RemoveFromCpsL( cpdatamap, KCpData ) );
if ( err != KErrNotFound )
{
@@ -773,7 +783,7 @@
// ---------------------------------------------------------------------------
//
void HsWidgetPublisherImpl::InsertWidgetDataIdentifiersL( HsWidget& aWidget,
- CLiwDefaultMap* aDataMap )
+ CLiwDefaultMap* aDataMap, const TDesC& aContentType )
{
WidgetContentIdMapType::const_iterator contentIdIter =
mWidgetContentIds.find( aWidget.getIdentifier() );
@@ -787,7 +797,7 @@
HBufC* publisherName = StdStringToUnicodeLC( GetPublisherNameL( aWidget ) );
aDataMap->InsertL( KPublisherId, TLiwVariant( *publisherName ) );
- aDataMap->InsertL( KContentType, TLiwVariant( KAll ) );
+ aDataMap->InsertL( KContentType, TLiwVariant( aContentType ) );
aDataMap->InsertL( KContentId, TLiwVariant( contentId ) );
CleanupStack::PopAndDestroy( publisherName );
@@ -835,31 +845,25 @@
//
// ---------------------------------------------------------------------------
//
-void HsWidgetPublisherImpl::InsertWidgetItemsL ( HsWidget& aWidget,
+void HsWidgetPublisherImpl::InsertWidgetItemL ( HsWidgetItem& aWidgetItem,
CLiwDefaultMap* aDataMap )
{
- int count = aWidget.itemsCount();
- for (int index = 0; index < count; index++)
- {
- HsWidgetItem* const item = aWidget.getWidgetItem( index );
-
- TPtrC8 itemName = ((TUint8*)item->getItemName().c_str());
- if( item->isStringValue() )
- {
- TPtrC8 itemValue = ((TUint8*)item->getItemValue().c_str());
- HBufC* value = HBufC::NewLC( KUnicodeSize * itemValue.Length() );
- TPtr dest( value->Des() );
- CnvUtfConverter::ConvertToUnicodeFromUtf8( dest, itemValue );
-
- aDataMap->InsertL( itemName, TLiwVariant(*value ));
- CleanupStack::PopAndDestroy(value);
- }
- else
- {
- int itemValue = item->getItemValueInt();
- aDataMap->InsertL( itemName, TLiwVariant( TInt32( itemValue ) ));
- }
- }
+ TPtrC8 itemName = ((TUint8*)aWidgetItem.getItemName().c_str());
+ if( aWidgetItem.isStringValue() )
+ {
+ TPtrC8 itemValue = ((TUint8*)aWidgetItem.getItemValue().c_str());
+ HBufC* value = HBufC::NewLC( KUnicodeSize * itemValue.Length() );
+ TPtr dest( value->Des() );
+ CnvUtfConverter::ConvertToUnicodeFromUtf8( dest, itemValue );
+
+ aDataMap->InsertL( itemName, TLiwVariant(*value ));
+ CleanupStack::PopAndDestroy(value);
+ }
+ else
+ {
+ int itemValue = aWidgetItem.getItemValueInt();
+ aDataMap->InsertL( itemName, TLiwVariant( TInt32( itemValue ) ));
+ }
}
// ---------------------------------------------------------------------------
@@ -937,10 +941,9 @@
//
// ---------------------------------------------------------------------------
//
-void HsWidgetPublisherImpl::InsertItemsTriggersL( HsWidget& aWidget,
+void HsWidgetPublisherImpl::InsertItemTriggerL( HsWidgetItem& aWidgetItem,
CLiwDefaultMap* aTriggerMap )
{
- int count = aWidget.itemsCount();
CLiwDefaultMap* activateAction = CLiwDefaultMap::NewLC();
activateAction->InsertL( KPluginId, TLiwVariant( KCASpaAppLauncherPlugin ) );
@@ -951,13 +954,10 @@
activate->InsertL( KApaCommand, TLiwVariant( KApaCommandBackground ) );
activateAction->InsertL( KData, TLiwVariant( activate ) );
-
- for (int index = 0; index < count; index++)
- {
- HsWidgetItem* const item = aWidget.getWidgetItem( index );
- TPtrC8 itemName = ((TUint8*)item->getItemName().c_str());
- aTriggerMap->InsertL( itemName, TLiwVariant( activateAction ));
- }
+
+ TPtrC8 itemName = ((TUint8*)aWidgetItem.getItemName().c_str());
+ aTriggerMap->InsertL( itemName, TLiwVariant( activateAction ));
+
CleanupStack::PopAndDestroy( activate );
CleanupStack::PopAndDestroy( activateAction );
}
--- a/homescreensrv_plat/sapi_contentpublishing/inc/cpclient.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/sapi_contentpublishing/inc/cpclient.h Fri Mar 12 15:43:54 2010 +0200
@@ -115,8 +115,10 @@
* @since S6CCPActiveNotifierNotifier v 5.CCPActiveNotifierNotifier
* @param aInParamList input parameter list (filter)
* @param aOutParamList output action_map
+ * @param aCmdOptions options for the command
*/
- void ExecuteActionL( const CLiwGenericParamList& aInParamList );
+ void ExecuteActionL( const CLiwGenericParamList& aInParamList,
+ TUint aCmdOptions );
/**
* Check second param from IDataSource interface
--- a/homescreensrv_plat/sapi_contentpublishing/inc/cpclientsession.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/sapi_contentpublishing/inc/cpclientsession.h Fri Mar 12 15:43:54 2010 +0200
@@ -113,8 +113,9 @@
*
* @since S60 v 5.0
* @param aInParamList const reference to the input list
+ * @param aOptions Command options.
*/
- void ExecuteActionL( const CCPLiwMap& aMap );
+ void ExecuteActionL( const CCPLiwMap& aMap, TUint aOptions = 0 );
/**
* Pass GetChangeInfoData request to server
--- a/homescreensrv_plat/sapi_contentpublishing/src/ccontentpublishinginterface.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/sapi_contentpublishing/src/ccontentpublishinginterface.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -91,7 +91,7 @@
if ( aCmdName.CompareF( KExecuteAction ) == 0 )
{
- iCPClient->ExecuteActionL( aInParamList );
+ iCPClient->ExecuteActionL( aInParamList, aCmdOptions );
}
else
{
--- a/homescreensrv_plat/sapi_contentpublishing/src/cpclient.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/sapi_contentpublishing/src/cpclient.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -195,14 +195,15 @@
//
// -----------------------------------------------------------------------------
//
-void CCPClient::ExecuteActionL( const CLiwGenericParamList& aInParamList )
+void CCPClient::ExecuteActionL( const CLiwGenericParamList& aInParamList,
+ TUint aCmdOptions)
{
CP_DEBUG( _L8("CCPClient::RegisterObserverL()") );
CheckMapL( aInParamList, KFilter );
CCPLiwMap* inMapForServer = CCPLiwMap::NewL( aInParamList );
inMapForServer->PushL( );
inMapForServer->IsValidForActionL( );
- iServerClient.ExecuteActionL( *inMapForServer );
+ iServerClient.ExecuteActionL( *inMapForServer, aCmdOptions );
CleanupStack::PopAndDestroy( inMapForServer );
}
--- a/homescreensrv_plat/sapi_contentpublishing/src/cpclientsession.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/sapi_contentpublishing/src/cpclientsession.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -146,12 +146,13 @@
//
// -----------------------------------------------------------------------------
//
-void RCPServerClient::ExecuteActionL( const CCPLiwMap& aMap )
+void RCPServerClient::ExecuteActionL( const CCPLiwMap& aMap, TUint aOptions )
{
CP_DEBUG( _L8("RCPServerClient::ExecuteActionL()") );
HBufC8 *inbuf = aMap.PackForServerLC( );
TIpcArgs args;
args.Set( KDescriptorPosition, &*inbuf );
+ args.Set( KOptionsPosition, static_cast<TInt>( aOptions ) );
User::LeaveIfError( SendReceive( ECpServerExecuteAction, args ) );
CleanupStack::PopAndDestroy( inbuf );
}
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/common/src/mt_hsps.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/common/src/mt_hsps.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -36,7 +36,7 @@
_LIT8( KHspsAppUid, "appUid" );
// Heap size for test step thread
-const TUint KDefaultHeapSize = 0x10000;
+const TUint KDefaultHeapSize = 0x100000;
// Test step data
typedef struct
@@ -595,11 +595,12 @@
User::WaitForRequest( status );
err = status.Int();
- testThread.Close();
-
// Give test thread some time to close
User::After( 2000000 );
-
+
+ // Terminate thread.
+ testThread.Kill( KErrNone );
+ testThread.Close();
}
User::LeaveIfError( err );
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/common/src/mt_hspsteststep.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/common/src/mt_hspsteststep.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -30,7 +30,7 @@
// ======== LOCAL CONSTANTS ====================================================
// Test step timeout
-const TInt KTestStepTimeout = 5000000;
+const TInt KTestStepTimeout = 15000000;
// Max input
const TInt KTestStepInputSizeMax = 1000;
@@ -327,6 +327,21 @@
exitNow = ETrue;
}
}
+
+ if( exitNow )
+ {
+ logBus->LogText( _L("------------------------------------------") );
+ logBus->LogText( _L("Differences found. Dumping output in full:") );
+ for ( TInt i = 0;
+ i < iOutParams->Length();
+ i++ )
+ {
+ logBus->LogText( _L("[%5d], %3d, '%c'"),
+ i, // index
+ ( TUint16 )aOutPtr[i],
+ ( TUint16 )aOutPtr[i] );
+ }
+ }
CleanupStack::PopAndDestroy( logBus );
}
Binary file homescreensrv_plat/sapi_homescreenplugin/tsrc/group/Nokia_RnDCert_02.der has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/group/Nokia_RnDCert_02.key Fri Mar 12 15:43:54 2010 +0200
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQC/TDP7KKIaf5+uW4OD2iVZuUMC2a+SeQTjf6srlKcOm+CpPNXn
+uLNm/8fdEnyOIuRXPRKmqhs1n0JkxEGHynELWMTuKXbQx9SRAGUXzyneGn+IJNnO
+vOKHWgKCouX2hfI8rtkdqJpqmO460gGsMgw+lsbeyWyW9lnfLxq+ZC7sqQIDAQAB
+AoGBALmUWZE8GBaQ3P4u9WUCSd3DJkkrmXIFSULSZeH/chlwCwDjbbhArHothVzo
+REE3hEFFlERvHbplZ+mNouzy7boduvgUzbksGrbGMLJ2qO1GzWWVwV+GzOWKd3ss
+/98Gwoy5R8pjnkqUE2wP1iJFw0FjvUTKcYv/z6t3LLJ0CsoBAkEA+c7ixvsviQ3J
+s0INytCKU2bf8fqFQJi1VI82ukxNsujGTQ9upVSjuvqPvWyDvvTdrUBHqO+3qPut
+sEh01Q8aiQJBAMQKDJPVRu4ud3mwUfEavzL5EjqwG1k9VCNGYsT4FwtrHcxu1oP/
+pk6M3rIZukqomoEEnHWPMwhrK3fhBqi0OSECQQDr40VXege4FnH5OI2Hj4afHMyp
+VdQQXGMWFyopnzXblFz0lXb43cTCIiorR9XcMqNFHybLypkWE5o+lRzlt55pAkBQ
+P/zeF5Sts//cpL0mgdh7OVKpC6ZmZaCnwAx2rUhhuDu+kDDoYCLoTOps5fNI1LRK
+1GRoC3LMo3Jr5IYhUYWBAkBpCpN6k4JU/mszq98EojHerQNxk8sPqvQKUzTutohT
+1gLX9yepGayB/TtT2EEJDkWOlnTy/dvN6W3vzbJYz97x
+-----END RSA PRIVATE KEY-----
--- a/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_requestnotify_6.h Fri Feb 19 23:07:29 2010 +0200
+++ b/homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/inc/mt_hsps_requestnotify_6.h Fri Mar 12 15:43:54 2010 +0200
@@ -339,9 +339,9 @@
// - Variant value
10,
5,
-13,0,0,0,
-54,
-'P','l','u','g','i','n','U','p','d','a','t','e','d',
+15,0,0,0,
+62,
+'P','l','u','g','i','n','I','n','s','t','a','l','l','e','d',
// - Notification(Output)::appConfUid
// - Variant name
// - Version 1.0
@@ -800,8 +800,9 @@
// - Variant value
10,
5,
-0,0,0,0,
-2,
+10,0,0,0,
+42,
+'0','x','2','0','0','0','b','1','1','0',
// - Notification(Output)::origUid
// - Variant name
// - Version 1.0
@@ -846,9 +847,8 @@
// - Variant value
10,
5,
-21,0,0,0,
-86,
-'I','n','s','t','a','l','l','e','d',' ','-',' ','W','i','d','g','e','t',' ','V','2',
+0,0,0,0,
+2,
// - Notification(Output)::pluginUid
// - Variant name
// - Version 1.0
@@ -912,7 +912,7 @@
5,
1,0,0,0,
6,
-'0'
+'9'
};
const TInt requestnotify_6_ts_5_trigger = EHspsTriggerRunUninstallationCase;
--- a/idlefw/inc/framework/aistateprovider.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/inc/framework/aistateprovider.h Fri Mar 12 15:43:54 2010 +0200
@@ -23,7 +23,7 @@
#include <e32base.h>
#include <coemain.h>
#include <hwrmlight.h>
-#include <AknSSrvClient.h>
+#include <AknsSrvClient.h>
// User includes
#include <aifwstatehandler.h>
@@ -56,14 +56,12 @@
/**
* Two-phased constructor.
*/
- static CAiStateProvider* NewL(
- MAiStateObserver& aObserver, CCoeEnv& aCoeEnv );
-
+ static CAiStateProvider* NewL( MAiStateObserver& aObserver );
+
/**
* Two-phased constructor. Leaving on stack
*/
- static CAiStateProvider* NewLC(
- MAiStateObserver& aObserver, CCoeEnv& aCoeEnv );
+ static CAiStateProvider* NewLC( MAiStateObserver& aObserver );
/**
* Destructor
@@ -81,9 +79,26 @@
/**
* C++ default constructor
*/
- CAiStateProvider(
- MAiStateObserver& aObserver, CCoeEnv& aCoeEnv );
-
+ CAiStateProvider( MAiStateObserver& aObserver );
+
+public:
+ // new methods
+
+ /**
+ * Start state providing
+ *
+ * @since S60 5.2
+ * @param aCoeEnv Control environment
+ */
+ void StartL( CCoeEnv& aCoeEnv );
+
+ /**
+ * Stop state providing
+ *
+ * @since S60 5.2
+ */
+ void Stop();
+
private:
// from MCoeMessageMonitorObserver
@@ -167,13 +182,15 @@
/** State observer, Not owned */
MAiStateObserver& iObserver;
/** Control environment, Not owned */
- CCoeEnv& iCoeEnv;
+ CCoeEnv* iCoeEnv;
/** Light status observer, Owned */
CHWRMLight* iLightObserver;
/** Skin server session, Owned */
RAknsSrvSession iSkinSrv;
/** Backup Restore observer, Owned */
MAiPSPropertyObserver* iBackupRestoreObserver;
+ /** Flag to indicate whether state providing is started */
+ TBool iStarted;
private:
// friend classes
--- a/idlefw/plugins/devicestatus/inc/aicontentobserveroptimizer.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aicontentobserveroptimizer.h Fri Mar 12 15:43:54 2010 +0200
@@ -118,6 +118,11 @@
*/
MAiContentObserver& Observer() const;
+ /**
+ * Clears blacklist
+ */
+ void ClearBlackList();
+
private:
CAiContentObserverOptimizer(MAiContentObserver& aObserver);
--- a/idlefw/plugins/devicestatus/inc/aimulticontentobserver.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/devicestatus/inc/aimulticontentobserver.h Fri Mar 12 15:43:54 2010 +0200
@@ -77,6 +77,8 @@
const TDesC8& aPropertyValue,
MAiContentObserver::TValueType aValueType);
+ void ClearBlackList();
+
private:
CAiMultiContentObserver();
void ConstructL();
--- a/idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -228,6 +228,11 @@
return EFalse;
}
+void CAiContentObserverOptimizer::ClearBlackList()
+ {
+ iBlackList.Reset();
+ }
+
CAiContentObserverOptimizer::CAiContentObserverOptimizer(MAiContentObserver& aObserver):
iObserver( aObserver )
{
--- a/idlefw/plugins/devicestatus/src/aidevicestatusplugin.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aidevicestatusplugin.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -186,12 +186,14 @@
//
// ----------------------------------------------------------------------------
//
-void CAiDeviceStatusPlugin::Start( TStartReason aReason )
- {
- if ( aReason == EPageStartup || aReason == ESystemStartup )
+void CAiDeviceStatusPlugin::Start( TStartReason /*aReason*/ )
+ {
+ iRequirePublish = ETrue;
+
+ if ( iContentObservers )
{
- iRequirePublish = ETrue;
- }
+ iContentObservers->ClearBlackList();
+ }
}
// ----------------------------------------------------------------------------
--- a/idlefw/plugins/devicestatus/src/aimulticontentobserver.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/aimulticontentobserver.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -240,7 +240,17 @@
return KErrNotSupported;
}
+void CAiMultiContentObserver::ClearBlackList()
+ {
+ const TInt count = iObserverOptimizers.Count();
+ for ( TInt i = 0; i < count; ++i )
+ {
+ iObserverOptimizers[i]->ClearBlackList();
+ }
+ }
+
CAiMultiContentObserver::CAiMultiContentObserver()
{
}
+// End of file
--- a/idlefw/plugins/devicestatus/src/ainetworkinfolistener.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/devicestatus/src/ainetworkinfolistener.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 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"
@@ -21,6 +21,8 @@
#include "ainetworkinfolistener.h"
#include "ainetworkinfoobserver.h"
#include "debug.h"
+#include <exterror.h> // for KErrGsmMMNetworkFailure
+#include <featmgr.h> // for FeatureManager
const TInt KAiMessageCacheGranularity = 4;
@@ -39,7 +41,6 @@
//Create network handling engine session.
iSession = CreateL( *this, iInfo );
-
iShowOpInd = EFalse;
//Create message cache
iMessageCache = new( ELeave )CArrayFixFlat
@@ -114,8 +115,7 @@
User::LeaveIfError( iObservers.Insert( &aObserver, freeSlot ) );
}
}
-
-
+
void CAiNetworkInfoListener::RemoveObserver( MAiNetworkInfoObserver& aObserver )
{
//Remove observer, removing is done by replacing it with NULL pointer.
@@ -162,24 +162,19 @@
{
err = KErrNone;
}
-
if( err != KErrNone )
{
- return;
+ return;
}
iShowOpInd = !NotAllowedToDisplayOperatorIndicator( aMessage );
-
-
+
TBool hasNetInfoChanged = HasNetworkInfoChanged( aMessage );
-
if ( !hasNetInfoChanged )
{
return;
}
-
__PRINT(__DBG_FORMAT("XAI: Show operator indicator %d, info changed %d"), iShowOpInd, hasNetInfoChanged );
-
const TInt count( iObservers.Count() );
@@ -206,6 +201,9 @@
void CAiNetworkInfoListener::HandleNetworkError( const TNWOperation aOperation, TInt aErrorCode )
{
__PRINT(__DBG_FORMAT("XAI: Error code %d"), aErrorCode );
+
+ TNWMessages errorCode = TNWMessages( KErrGeneral );
+
switch ( aOperation )
{
case MNWMessageObserver::ENWGetNetworkProviderName:
@@ -228,14 +226,22 @@
iInfo.iPLMNField.Zero();
__PRINTS("XAI: SPN error received");
break;
+ case MNWMessageObserver::ENWNotifyNetworkRegistrationStatusChange:
+ if ( FeatureManager::FeatureSupported( KFeatureIdFfManualSelectionPopulatedPlmnList )
+ && ( KErrGsmMMNetworkFailure == aErrorCode ) )
+ {
+ errorCode = static_cast<TNWMessages>( aErrorCode );
+ }
+ __PRINTS("XAI: ENWNotifyNetworkRegistrationStatusChange error received");
+
+ break;
default:
break;
}
-
- HandleNetworkMessage( TNWMessages( KErrGeneral ) );
+
+ HandleNetworkMessage( errorCode );
}
-
-
+
TBool CAiNetworkInfoListener::NotAllowedToDisplayOperatorIndicator( const TNWMessages aMessage )
{
// Service provider name must have been fetched.
@@ -243,7 +249,8 @@
// Registration status and network information must have been received.
// Operator name information must have been received.
// Device must be camped to a network.
-
+
+ TBool csAlphaFlag( EFalse );
switch ( aMessage )
{
case MNWMessageObserver::ENWMessageNetworkInfoChange:
@@ -277,7 +284,24 @@
iReceivedMessageFlags &=
~( EProgrammableOperatorInfoReceived +
EProgrammableOperatorInfoReceivedOk );
- break;
+ break;
+ case MNWMessageObserver::ENWMessageDynamicCapsChange:
+ TRAPD(fmerr, FeatureManager::InitializeLibL());
+ if ( fmerr == KErrNone )
+ {
+ if( FeatureManager::FeatureSupported(
+ KFeatureIdFfDisplayNetworkNameAfterCsRegistration ))
+ {
+ // CS flag is EFalse, alpha tag should not be shown.
+ if ( !( RPacketService::KCapsRxCSCall &
+ iInfo.iDynamicCapsFlags ) )
+ {
+ csAlphaFlag = ETrue;
+ }
+ }
+ FeatureManager::UnInitializeLib();
+ }
+ break;
default:
break;
}
@@ -298,7 +322,7 @@
!networkProviderNameFetched ||
!( registrationStatusReceived && networkInformationReceived
&& operatorNameInformationReceived ) ||
- !currentNetworkOk;
+ !currentNetworkOk || csAlphaFlag;
}
@@ -309,7 +333,9 @@
// pass through
if ( aMessage == MNWMessageObserver::ENWMessageCurrentHomeZoneMessage ||
aMessage == MNWMessageObserver::ENWMessageNetworkConnectionFailure ||
- aMessage == MNWMessageObserver::ENWMessageCurrentCellInfoMessage )
+ aMessage == MNWMessageObserver::ENWMessageCurrentCellInfoMessage ||
+ aMessage == static_cast<TNWMessages>( KErrGsmMMNetworkFailure )
+ )
{
return result;
}
@@ -337,6 +363,17 @@
iOldInfo.iServiceProviderNameDisplayReq ||
iInfo.iNPName != iOldInfo.iNPName ||
iInfo.iPLMNField != iOldInfo.iPLMNField;
+ TRAPD(fmerr, FeatureManager::InitializeLibL());
+ if ( fmerr == KErrNone )
+ {
+ if( FeatureManager::FeatureSupported(
+ KFeatureIdFfDisplayNetworkNameAfterCsRegistration ))
+ {
+ result = result ||
+ iInfo.iDynamicCapsFlags != iOldInfo.iDynamicCapsFlags;
+ }
+ FeatureManager::UnInitializeLib();
+ }
}
iOldReceivedMessageFlags = iReceivedMessageFlags;
--- a/idlefw/plugins/mcsplugin/group/bld.inf Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/group/bld.inf Fri Mar 12 15:43:54 2010 +0200
@@ -46,7 +46,9 @@
OPTION SOURCES -c8,8 qgn_prop_ai_shortcut -c8,8 qgn_menu_url \
-c8,8 qgn_menu_mce_sel_mes -c8,8 qgn_menu_mce_syncmail \
-c8,8 qgn_menu_am -c8,8 qgn_prop_cp_conn_shortcut \
- -c8,8 qgn_prop_psln_ai_sub -c8,8 qgn_mcsplugin_log_out
+ -c8,8 qgn_prop_psln_ai_sub -c8,8 qgn_mcsplugin_log_out \
+ -c8,8 qgn_menu_mce_postcard -c8,8 qgn_menu_mce_email \
+ -c8,8 qgn_menu_mce_audio -c8,8 qgn_menu_mce_gene
END
--- a/idlefw/plugins/mcsplugin/group/mcsplugin.mmp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/group/mcsplugin.mmp Fri Mar 12 15:43:54 2010 +0200
@@ -77,6 +77,7 @@
LIBRARY gslauncher.lib
LIBRARY eikdlg.lib
LIBRARY commonengine.lib
+LIBRARY favouritesengine.lib
LIBRARY gfxtrans.lib
--- a/idlefw/plugins/mcsplugin/publisher/inc/mcsplugindata.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/inc/mcsplugindata.h Fri Mar 12 15:43:54 2010 +0200
@@ -25,6 +25,7 @@
#include <mhomescreensettingsobserver.h>
#include <hspluginsettings.h>
#include <propertymap.h>
+#include <mcsmenu.h>
class TMenuItem;
class CMCSPluginEngine;
@@ -166,11 +167,16 @@
* @param aPluginName
* @param aPluginUid
* @param aPluginId
- * @return TInt
*/
- TInt SettingsChangedL( const TDesC8& aEvent, const TDesC8& aPluginName,
+ void SettingsChangedL( const TDesC8& aEvent, const TDesC8& aPluginName,
const TDesC8& aPluginUid, const TDesC8& aPluginId );
+ /**
+ * CreateBkmMenuItemsL
+ * @param void
+ * @return void
+ */
+ void CreateBkmMenuItemsL();
private:
/**
@@ -189,13 +195,19 @@
TMenuItem CreateMenuItemL(
RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties );
+ /**
+ * GetMCSPluginFolderIdL
+ *
+ * @return TInt
+ */
+ TInt GetMCSPluginFolderIdL();
private: // data
// Menu items, which are defined in settings
// Own
RArray<TMCSData> iData;
- // Plugin settings
+ // Plugin settings. NOT OWNED!
HSPluginSettingsIf::CHomescreenSettings* iPluginSettings;
// Reference to MCS plug-in engine
@@ -203,6 +215,12 @@
// Reference to instance uid of HSPS widget
const TDesC8& iInstanceUid;
+
+ // MCS asynchronous operation watcher, owned
+ CMCSPluginWatcher* iSaveWatcher;
+
+ // MCS resource handle, owned
+ RMenu iMenu;
};
#endif // CMCSPLUGINDATA_H
--- a/idlefw/plugins/mcsplugin/publisher/inc/mcspluginengine.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/inc/mcspluginengine.h Fri Mar 12 15:43:54 2010 +0200
@@ -156,6 +156,23 @@
* ShowSettingsL
*/
void ShowSettingsL();
+
+ /**
+ * Helper method. Adds a given constant to a value of reference counter
+ *
+ * @param aItem A Menu Item to update
+ * @param aValueToAdd A constant to add
+ * @return The actual value of updated reference count
+ */
+ TInt UpdateMenuItemsRefCountL(
+ CMenuItem* aItem, const TInt aValueToAdd );
+
+ /**
+ * CreateBkmMenuItemsL
+ * @param void
+ * @return void
+ */
+ void CreateBkmMenuItemsL();
private:
// from MMCSPluginWatcherObserver
@@ -204,16 +221,6 @@
TBool ConstructMenuItemForIconL(
const TDesC& aPath, CMenuItem& aMenuItem );
- /**
- * Helper method. Adds a given constant to a value of reference counter
- *
- * @param aItem A Menu Item to update
- * @param aValueToAdd A constant to add
- * @return The actual value of updated reference count
- */
- TInt UpdateMenuItemsRefCountL(
- CMenuItem* aItem, const TInt aValueToAdd );
-
private:
// data
--- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugin.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -79,7 +79,7 @@
// ----------------------------------------------------------------------------
//
void CMCSPlugin::ConstructL()
- {
+ {
}
// ----------------------------------------------------------------------------
@@ -200,8 +200,12 @@
//
// ----------------------------------------------------------------------------
//
-void CMCSPlugin::Start( TStartReason /*aReason*/ )
- {
+void CMCSPlugin::Start( TStartReason aReason )
+ {
+ if( aReason == EPluginStartup )
+ {
+ TRAP_IGNORE( iEngine->CreateBkmMenuItemsL() );
+ }
}
// ----------------------------------------------------------------------------
--- a/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcsplugindata.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -18,13 +18,14 @@
#include <mcsmenufilter.h>
#include <itemmap.h>
#include <aistrcnv.h>
+#include <favouritesdbobserver.h>
+#include <favouritesdb.h>
#include "mcsplugindata.h"
#include "mcspluginengine.h"
using namespace HSPluginSettingsIf;
-_LIT8( KAppUid, "271012080" );
_LIT( KMenuAttrParam, "param" );
_LIT( KMenuAttrLocked, "locked" );
_LIT8( KProperNameType, "type" );
@@ -35,6 +36,15 @@
_LIT8( KProperValueBookmark, "bookmark" );
_LIT8( KProperValueAppl, "application" );
+_LIT( KUrl, "url" );
+_LIT( KMenuIconFile, "aimcsplugin.mif" );
+_LIT( KMenuIconId, "16386" );
+_LIT( KMenuMaskId, "16387" );
+_LIT( KInitialRefCount, "1" );
+_LIT( KMenuAttrRefcount, "ref_count" );
+_LIT( KMyMenuData, "matrixmenudata" );
+
+
// ======== LOCAL FUNCTIONS ========
static void ItemMapArrayCleanupFunc( TAny* aPointerArray )
@@ -95,10 +105,17 @@
//
void CMCSPluginData::ConstructL()
{
- // AILaunch uid in decimal format
- iPluginSettings = CHomescreenSettings::NewL( KAppUid,
- iInstanceUid,
- this );
+ iPluginSettings = CHomescreenSettings::Instance();
+ if( iPluginSettings == NULL )
+ {
+ User::Leave( KErrUnknown );
+ }
+ iPluginSettings->AddObserverL( this );
+
+ iSaveWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::EOperation );
+
+ iMenu.OpenL( KMyMenuData );
+
UpdateDataL();
}
@@ -107,9 +124,16 @@
// ---------------------------------------------------------------------------
//
CMCSPluginData::~CMCSPluginData()
- {
+ {
+ if( iPluginSettings )
+ {
+ iPluginSettings->RemoveObserver( this );
+ }
+
iData.Close();
- delete iPluginSettings;
+ iMenu.Close();
+
+ delete iSaveWatcher;
}
// ---------------------------------------------------------------------------
@@ -167,11 +191,13 @@
//
// ---------------------------------------------------------------------------
//
-TInt CMCSPluginData::SettingsChangedL( const TDesC8& /*aEvent*/, const TDesC8& /*aPluginName*/,
- const TDesC8& /*aPluginUid*/, const TDesC8& /*aPluginId*/ )
+void CMCSPluginData::SettingsChangedL( const TDesC8& /*aEvent*/, const TDesC8& /*aPluginName*/,
+ const TDesC8& /*aPluginUid*/, const TDesC8& aPluginId )
{
- UpdateDataL();
- return KErrNone;
+ if( aPluginId.CompareF( iInstanceUid ) == 0 )
+ {
+ UpdateDataL();
+ }
}
// ---------------------------------------------------------------------------
@@ -363,8 +389,152 @@
}
}
}
- // ETrue tells that changes are stored also to plugin reference
+ // ETrue tells that changes are stored also to plugin reference
iPluginSettings->SetSettingsL( iInstanceUid, settingItems, ETrue );
CleanupStack::PopAndDestroy( &settingItems );
}
+// ---------------------------------------------------------------------------
+// Gets MCS Plugin folder ID. This hidden folder in matrixmenudata.xml is used
+// for storing run-time generated menuitems
+// ---------------------------------------------------------------------------
+//
+TInt CMCSPluginData::GetMCSPluginFolderIdL()
+ {
+ TInt folderId;
+
+ _LIT( KMCSFolder, "mcsplugin_folder" );
+
+ CMenuItem* item( NULL );
+ CMenuFilter* filter = CMenuFilter::NewL();
+ CleanupStack::PushL( filter );
+ filter->SetType( KMenuTypeFolder );
+ filter->HaveAttributeL( KMenuAttrLongName, KMCSFolder );
+
+ const TInt rootId = iMenu.RootFolderL();
+ RArray<TMenuItem> itemArray;
+ CleanupClosePushL( itemArray );
+ iMenu.GetItemsL( itemArray, rootId, filter, ETrue );
+ if ( itemArray.Count() > 0 )
+ {
+ item = CMenuItem::OpenL( iMenu, itemArray[0] );
+ folderId = item->Id();
+ }
+ else
+ {
+ folderId = iMenu.RootFolderL();
+ }
+ CleanupStack::PopAndDestroy( &itemArray );
+ CleanupStack::PopAndDestroy( filter );
+
+ delete item;
+
+ return folderId;
+ }
+
+// ---------------------------------------------------------------------------
+// Creates bookmark menu item if it does not exist
+// ---------------------------------------------------------------------------
+//
+void CMCSPluginData::CreateBkmMenuItemsL()
+ {
+ RPointerArray<CItemMap> settings;
+ TCleanupItem settingsCleanupItem( ItemMapArrayCleanupFunc, &settings );
+ CleanupStack::PushL( settingsCleanupItem );
+ iPluginSettings->GetSettingsL( iInstanceUid, settings );
+
+ RFavouritesSession bookmarkSess;
+ RFavouritesDb bookmarkDb;
+
+ User::LeaveIfError( bookmarkSess.Connect() );
+ User::LeaveIfError( bookmarkDb.Open( bookmarkSess, KBrowserBookmarks ));
+
+ TInt count = settings.Count();
+ for( TInt i = 0; i < count; i++ )
+ {
+ CItemMap* itemMap = settings[i];
+ RPointerArray<HSPluginSettingsIf::CPropertyMap>& properties
+ = itemMap->Properties();
+
+ TPtrC8 uid8, type;
+
+ for( TInt j = 0; j < properties.Count(); j++ )
+ {
+
+ if( properties[j]->Name() == KProperNameType )
+ {
+ type.Set( properties[j]->Value() );
+ }
+ else if ( properties[j]->Name() == KProperNameUid )
+ {
+ uid8.Set( properties[j]->Value() );
+ }
+ }
+
+ if( type == KProperValueBookmark )
+ {
+ TMenuItem menuItem = CreateMenuItemL( properties );
+
+ CActiveSchedulerWait* wait =
+ new ( ELeave ) CActiveSchedulerWait;
+ CleanupStack::PushL( wait );
+
+ if( menuItem.Id() == 0 )
+ {
+ TLex8 uidLex( uid8.Mid( 1, uid8.Length() - 2 ) );
+ TUint32 id;
+ uidLex.Val(id, EHex);
+
+ CFavouritesItem* bkmItem = CFavouritesItem::NewLC();
+ TInt bcount = bookmarkDb.Get( TInt32( id ), *bkmItem );
+
+ HBufC *uid( NULL );
+ uid = AiUtility::CopyToBufferL( uid, uid8 );
+ CleanupStack::PushL( uid );
+
+ CMenuItem* newItem = CMenuItem::CreateL( iMenu,
+ KMenuTypeUrl,
+ GetMCSPluginFolderIdL(),
+ 0 );
+ CleanupStack::PushL( newItem );
+
+ newItem->SetAttributeL( KMenuAttrUid, *uid );
+ newItem->SetAttributeL( KMenuAttrLongName, bkmItem->Name() );
+ newItem->SetAttributeL( KMenuAttrIconFile, KMenuIconFile );
+ newItem->SetAttributeL( KMenuAttrIconId, KMenuIconId );
+ newItem->SetAttributeL( KMenuAttrMaskId, KMenuMaskId );
+ newItem->SetAttributeL( KMenuAttrRefcount, KInitialRefCount );
+ newItem->SetAttributeL( KUrl , bkmItem->Url() );
+
+ CMenuOperation* op = newItem->SaveL( iSaveWatcher->iStatus );
+ TInt newId = newItem->Id();
+ iData[i].MenuItem().SetId( newId );
+
+ iSaveWatcher->StopAndWatch( op, wait );
+
+ // Start the nested scheduler loop.
+ wait->Start();
+
+ CleanupStack::Pop( newItem );
+ CleanupStack::PopAndDestroy( uid );
+ CleanupStack::PopAndDestroy( bkmItem );
+ }
+ else
+ {
+ CMenuItem* item = CMenuItem::OpenL( iMenu, menuItem );
+
+ if( iEngine.UpdateMenuItemsRefCountL( item, 1 ) > 0 )
+ {
+ CMenuOperation* op = item->SaveL( iSaveWatcher->iStatus );
+ iSaveWatcher->StopAndWatch( op, wait );
+ // Start the nested scheduler loop.
+ wait->Start();
+ }
+ }
+
+ CleanupStack::PopAndDestroy( wait );
+ wait = NULL;
+ }
+ }
+ CleanupStack::PopAndDestroy(); // settingsCleanupItem
+ }
--- a/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -139,7 +139,7 @@
filter = NULL;
iUndefinedItem = CMenuItem::OpenL( iMenu, iUndefinedItemHeader );
}
-
+
// ----------------------------------------------------------------------------
// CMCSPluginEngine::~CMCSPluginEngine
//
@@ -148,21 +148,21 @@
CMCSPluginEngine::~CMCSPluginEngine()
{
StopObserving();
-
+
delete iPluginData;
- iNotifier.Close();
+
iMenu.Close();
//iWatcher->Cancel();
delete iWatcher;
- delete iNotifyWatcher;
+
CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );
-
+
if ( iUndefinedItem )
{
delete iUndefinedItem;
iUndefinedItem = NULL;
- }
+ }
}
// ---------------------------------------------------------------------------
@@ -732,6 +732,10 @@
//
void CMCSPluginEngine::CleanMCSItemsL()
{
+ iNotifier.Close();
+ delete iNotifyWatcher;
+ iNotifyWatcher = NULL;
+
const TInt count( iPluginData->DataCount() );
for( TInt i = 0; i < count; i++ )
@@ -829,5 +833,14 @@
return -1;
}
+// ---------------------------------------------------------------------------
+// Creates bookmark menu item if it does not exist
+// ---------------------------------------------------------------------------
+//
+void CMCSPluginEngine::CreateBkmMenuItemsL()
+ {
+ iPluginData->CreateBkmMenuItemsL();
+ }
+
// End of file
--- a/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsmodel.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/settings/inc/mcspluginsettingsmodel.h Fri Mar 12 15:43:54 2010 +0200
@@ -23,7 +23,6 @@
#include <e32base.h>
#include <bamdesca.h> // For MDesCArray
#include <badesca.h>
-#include <mhomescreensettingsobserver.h>
#include <hspluginsettings.h>
#include <propertymap.h>
@@ -66,7 +65,6 @@
*/
class CMCSPluginSettingsModel : public CBase
, public MDesCArray
- , public HSPluginSettingsIf::MHomeScreenSettingsObserver
{
public:
@@ -169,18 +167,12 @@
*/
void UpdateSettingsContainerL( const TDesC8& aPluginId );
- // From MHomeScreenSettingsObserver
/**
- * Settings changed
- *
- * @param aEvent
- * @param aPluginName
- * @param aPluginUid
- * @param aPluginId
- * @return TInt
- */
- TInt SettingsChangedL( const TDesC8& aEvent, const TDesC8& aPluginName,
- const TDesC8& aPluginUid, const TDesC8& aPluginId );
+ * Update settings model
+ *
+ * @param aPluginId
+ */
+ void UpdateSettingModelL( const TDesC8& aPluginId );
private:
@@ -256,7 +248,7 @@
*/
RArray<TSettingItem> iSettings;
- // Homescreen settings API
+ // Homescreen settings API. NOT OWNED!
HSPluginSettingsIf::CHomescreenSettings* iPluginSettings;
HBufC8* iPluginId;
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettings.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettings.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -196,7 +196,7 @@
}
cba->DrawDeferred();
}
-
+ iModel->UpdateSettingModelL( aCustomMessage);
CGSBaseView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
iModel->UpdateSettingsContainerL( aCustomMessage );
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -333,13 +333,18 @@
//
void CMCSPluginSettingsContainer::ConstructListBoxL(TInt /*aResLbxId*/)
{
- iListBox->ConstructL(this, EAknListBoxSelectionList);
-
+ iListBox->ConstructL(this, EAknListBoxSelectionList);
// Set empty listbox's text.
- HBufC* text = iCoeEnv->AllocReadResourceLC(R_AI_MCS_SETTINGS_TXT_ALL_FIXED);
- iListBox->View()->SetListEmptyTextL(*text);
- CleanupStack::PopAndDestroy(text);
-
+ if (iModel->MdcaCount() == 0)
+ {
+ HBufC* text = iCoeEnv->AllocReadResourceLC(R_AI_MCS_SETTINGS_TXT_ALL_FIXED);
+ iListBox->View()->SetListEmptyTextL(*text);
+ CleanupStack::PopAndDestroy(text);
+ }
+ else
+ {
+ iListBox->View()->SetListEmptyTextL(KNullDesC);
+ }
iListBox->Model()->SetItemTextArray(iModel);
iListBox->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray);
}
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -52,8 +52,6 @@
_LIT8( KProperValueBookmark, "bookmark" );
_LIT8( KProperValueAppl, "application" );
-
-
using namespace HSPluginSettingsIf;
// -----------------------------------------------------------------------------
@@ -136,10 +134,12 @@
{
delete iAppList;
delete iBkmList;
- iSettings.Reset();
- delete iPluginSettings;
+ iSettings.Reset();
delete iPluginId;
delete iListBoxLine;
+
+ CHomescreenSettings::UnInitialize();
+ iPluginSettings = NULL;
}
// ---------------------------------------------------------------------------
@@ -148,6 +148,14 @@
//
void CMCSPluginSettingsModel::ConstructL()
{
+ CHomescreenSettings::InitializeL( KAppUid );
+
+ iPluginSettings = CHomescreenSettings::Instance();
+ if( iPluginSettings == NULL )
+ {
+ User::Leave( KErrUnknown );
+ }
+
iAppList = CMCSPluginSettingsAppList::NewL();
iAppList->StartL();
iBkmList = CMCSPluginSettingsBkmList::NewL();
@@ -164,13 +172,46 @@
{
return;
}
- if( !iPluginSettings )
+
+ if( iPluginId )
+ {
+ delete iPluginId;
+ iPluginId = NULL;
+ }
+ iPluginId = aPluginId.AllocL();
+
+ iSettings.Reset();
+ RPointerArray<CItemMap> settingItems;
+ CleanupClosePushL( settingItems );
+
+ iPluginSettings->GetSettingsL( *iPluginId, settingItems );
+
+ TInt count = settingItems.Count();
+ for ( TInt i = 0; i < count; i++ )
{
- // AILaunch uid in decimal format
- iPluginSettings = CHomescreenSettings::NewL( KAppUid, aPluginId, this );
- iPluginId = aPluginId.AllocL();
+ CItemMap* itemMap = settingItems[i];
+ RPointerArray<HSPluginSettingsIf::CPropertyMap> properties;
+ properties = itemMap->Properties();
+ TSettingItem item = ItemL( properties );
+ iSettings.AppendL( item );
}
+ CleanupStack::Pop( &settingItems );
+ settingItems.ResetAndDestroy();
+ }
+// ---------------------------------------------------------------------------
+// Gets the latest settings from HSPS and updates
+// ---------------------------------------------------------------------------
+//
+void CMCSPluginSettingsModel::UpdateSettingModelL( const TDesC8& aPluginId )
+ {
+ if( iPluginId )
+ {
+ delete iPluginId;
+ iPluginId = NULL;
+ }
+ iPluginId = aPluginId.AllocL();
+
iSettings.Reset();
RPointerArray<CItemMap> settingItems;
CleanupClosePushL( settingItems );
@@ -274,12 +315,12 @@
//
void CMCSPluginSettingsModel::SaveSettingsL( const TInt& aIndex,
CMenuItem& aMenuItem )
- {
-
- if ( !iPluginSettings )
+ {
+ if( !iPluginId )
{
return;
}
+
RPointerArray<CItemMap> settingItems;
CleanupClosePushL( settingItems );
iPluginSettings->GetSettingsL( *iPluginId, settingItems );
@@ -426,18 +467,6 @@
}
// ---------------------------------------------------------------------------
-// From MHomeScreenSettingsObserver - handler for HSPS setting change
-// ---------------------------------------------------------------------------
-//
-TInt CMCSPluginSettingsModel::SettingsChangedL( const TDesC8& /*aEvent*/,
- const TDesC8& /*aPluginName*/,
- const TDesC8& /*aPluginUid*/,
- const TDesC8& /*aPluginId*/ )
- {
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
// From MDesCArray
// Returns the number of descriptor elements in a descriptor array.
// ---------------------------------------------------------------------------
--- a/idlefw/plugins/profileplugin/inc/caiprofileengine.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/profileplugin/inc/caiprofileengine.h Fri Mar 12 15:43:54 2010 +0200
@@ -129,7 +129,9 @@
void HandleEditActiveProfileL();
TBool ShowOfflineMessageL();
-
+
+ void DetermineTimedAndSilentStatesL();
+
void NotifyContentUpdate();
private:
@@ -184,6 +186,10 @@
RPointerArray< HBufC > iProfileNamePointerArray;
/** Resource loader, owned */
RConeResourceLoader iResourceLoader;
+ /** Flag to indicate whether active profile is timed */
+ TBool iTimed;
+ /** Flag to indicate whether active profile is silent */
+ TBool iSilent;
};
#endif // CAIPROFILEENGINE_H
--- a/idlefw/plugins/profileplugin/inc/caiprofileplugin.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/profileplugin/inc/caiprofileplugin.h Fri Mar 12 15:43:54 2010 +0200
@@ -178,6 +178,8 @@
HBufC* iActiveProfileAndChar;
/** Previous profile, owned */
HBufC* iPreviousProfileNameAndChar;
+ /** Flag to indicate whether publish is required */
+ TBool iPublishRequired;
};
#endif // CAIPROFILEPLUGIN_H
--- a/idlefw/plugins/profileplugin/src/caiprofileengine.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/profileplugin/src/caiprofileengine.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -20,6 +20,7 @@
#include <w32std.h>
#include <ProEngFactory.h>
#include <MProfileEngine.h>
+#include <MProfile.h>
#include <MProEngEngine.h>
#include <MProEngProfile.h>
#include <MProEngProfileName.h>
@@ -124,7 +125,9 @@
iProfileNotifier->RequestActiveProfileNotificationsL( *this );
iProfileNotifier->RequestProfileNameArrayNotificationsL( *this );
- iProfileNotifier->RequestProfileActivationNotificationsL( *this );
+ iProfileNotifier->RequestProfileActivationNotificationsL( *this );
+
+ DetermineTimedAndSilentStatesL();
}
// ----------------------------------------------------------------------------
@@ -156,7 +159,30 @@
iResourceLoader.Close();
}
+
+// ----------------------------------------------------------------------------
+// CAiProfileEngine::DetermineTimedAndSilentStatesL()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiProfileEngine::DetermineTimedAndSilentStatesL()
+ {
+ iTimed = EFalse;
+ iSilent = EFalse;
+ MProfileEngine* engine = CreateProfileEngineL();
+
+ iTimed = engine->IsActiveProfileTimedL();
+
+ MProfile* profile = engine->ActiveProfileLC();
+
+ iSilent = profile->IsSilent();
+
+ CleanupStack::PopAndDestroy(); // profile
+
+ engine->Release();
+ }
+
// ----------------------------------------------------------------------------
// CAiProfileEngine::UpdateProfileNamesL()
//
@@ -371,13 +397,7 @@
//
TBool CAiProfileEngine::IsActiveProfileSilentL() const
{
- MProEngProfile* profile( iProfileEngine->ActiveProfileLC() );
-
- TBool silent( profile->IsSilent() );
-
- CleanupStack::PopAndDestroy();
-
- return silent;
+ return iSilent;
}
// ----------------------------------------------------------------------------
@@ -387,15 +407,7 @@
//
TBool CAiProfileEngine::IsActiveProfileTimedL() const
{
- MProfileEngine* engine = CreateProfileEngineL();
-
- TBool retval( EFalse );
-
- TRAP_IGNORE( retval = engine->IsActiveProfileTimedL() );
-
- engine->Release();
-
- return retval;
+ return iTimed;
}
// ----------------------------------------------------------------------------
@@ -622,6 +634,8 @@
//
void CAiProfileEngine::HandleActiveProfileModifiedL()
{
+ DetermineTimedAndSilentStatesL();
+
NotifyContentUpdate();
}
@@ -642,6 +656,8 @@
//
void CAiProfileEngine::HandleProfileActivatedL( TInt /*aProfileId*/ )
{
+ DetermineTimedAndSilentStatesL();
+
NotifyContentUpdate();
}
--- a/idlefw/plugins/profileplugin/src/caiprofileplugin.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/profileplugin/src/caiprofileplugin.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -76,9 +76,18 @@
//
void CAiProfilePlugin::ConstructL()
{
- iContent = AiUtility::CreateContentItemArrayIteratorL( KAiProfileContent );
- iEvents = AiUtility::CreateContentItemArrayIteratorL( KAiProfileEvents );
- iResources = AiUtility::CreateContentItemArrayIteratorL( KAiProfileResources );
+ iContent =
+ AiUtility::CreateContentItemArrayIteratorL( KAiProfileContent );
+
+ iEvents =
+ AiUtility::CreateContentItemArrayIteratorL( KAiProfileEvents );
+
+ iResources =
+ AiUtility::CreateContentItemArrayIteratorL( KAiProfileResources );
+
+ iEngine = CAiProfileEngine::NewL( this );
+
+ iEngine->UpdateProfileNamesL();
}
// ---------------------------------------------------------------------------
@@ -87,9 +96,7 @@
// ---------------------------------------------------------------------------
//
CAiProfilePlugin::~CAiProfilePlugin()
- {
- CleanPublishedProfileNames();
-
+ {
Release( iContent );
Release( iEvents );
Release( iResources );
@@ -289,6 +296,7 @@
//
void CAiProfilePlugin::Start( TStartReason /*aReason*/ )
{
+ iPublishRequired = ETrue;
}
// ---------------------------------------------------------------------------
@@ -298,6 +306,7 @@
//
void CAiProfilePlugin::Stop( TStopReason /*aReason*/ )
{
+ CleanPublishedProfileNames();
}
// ---------------------------------------------------------------------------
@@ -381,13 +390,11 @@
//
void CAiProfilePlugin::DoResumeL()
{
- if( !iEngine )
+ if ( iPublishRequired )
{
- iEngine = CAiProfileEngine::NewL( this );
+ iPublishRequired = EFalse;
- iEngine->UpdateProfileNamesL();
-
- PublishL();
+ PublishL();
}
}
@@ -398,7 +405,9 @@
//
void CAiProfilePlugin::NotifyContentUpdate()
{
- TRAP_IGNORE( PublishL() );
+ iPublishRequired = ETrue;
+
+ TRAP_IGNORE( DoResumeL() );
}
// ---------------------------------------------------------------------------
@@ -419,6 +428,11 @@
observer->Clean( *this, EAiProfileContentProfileName, j + 1 );
}
}
+
+ delete iPreviousProfileNameAndChar;
+ iPreviousProfileNameAndChar = NULL;
+
+ iPreviousCount = 0;
}
// ======== GLOBAL FUNCTIONS ========
--- a/idlefw/plugins/sapidataplugin/inc/sapidata.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/inc/sapidata.h Fri Mar 12 15:43:54 2010 +0200
@@ -153,6 +153,15 @@
void ChangePublisherStatusL(const TDesC& aStatus);
/**
+ * Triggers active event with KNoNotification option.
+ * Notification is not send to observer, action handler
+ * plug-ins are executed
+ *
+ * @return void
+ */
+ void TriggerActiveL();
+
+ /**
* Configures the subscriber and data to subscribe.
*
* @param aConfigurations Information about the subscriber
--- a/idlefw/plugins/sapidataplugin/src/sapidata.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/src/sapidata.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -27,6 +27,7 @@
#include "sapidataobserver.h"
#include "sapidataplugin.h"
+const TUint KDisableNotification = 0x2000;
// ======== MEMBER FUNCTIONS ========
// ---------------------------------------------------------------------------
@@ -758,6 +759,36 @@
}
// ---------------------------------------------------------------------------
+// TriggerActiveL
+// ---------------------------------------------------------------------------
+//
+void CSapiData::TriggerActiveL()
+ {
+
+ CLiwGenericParamList* inParamList = &iServiceHandler->InParamListL();
+ CLiwGenericParamList* outParamList = &iServiceHandler->OutParamListL();
+
+ TLiwGenericParam type( KType, TLiwVariant( KPubData ) );
+ inParamList->AppendL( type );
+
+ CLiwDefaultMap* filter = CreateFilterLC( KAll(), KAll() );
+ filter->InsertL(KActionTrigger, TLiwVariant( KActive() ));
+
+ TLiwGenericParam item( KFilter, TLiwVariant( filter ));
+ inParamList->AppendL( item );
+ if(iInterface)
+ {
+ iInterface->ExecuteCmdL( KExecuteAction, *inParamList, *outParamList, KDisableNotification );
+ }
+ else
+ {
+ User::Leave( KErrNotSupported );
+ }
+ CleanupStack::PopAndDestroy( filter );
+ inParamList->Reset();
+ outParamList->Reset();
+ }
+// ---------------------------------------------------------------------------
// UpdatePublisherStatusL
// ---------------------------------------------------------------------------
//
--- a/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -602,10 +602,11 @@
// Activate the publisher
iData->ChangePublisherStatusL( KActive );
+ iData->TriggerActiveL();
// Register for notifications
iData->RegisterPublisherObserverL();
-
+
PublishL();
iPluginState = ESuspend;
--- a/idlefw/src/framework/aifw.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/src/framework/aifw.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -64,6 +64,8 @@
//
void CAiFw::ConstructL()
{
+ __PRINTS( "*** CAiFw::ConstructL" );
+ __TIME_MARK( time );
#if 0
// For AI3_test
RProcess proc;
@@ -102,8 +104,14 @@
iFactory = CAiPluginFactory::NewL( *iUiControllerManager );
iStateManager = CAiStateManager::NewL( *iFactory );
-
- iEventHandler = CAiEventHandler::NewL( *iFactory );
+
+ iStateProvider = CAiStateProvider::NewL( *iStateManager );
+
+ iEventHandler = CAiEventHandler::NewL( *iFactory );
+
+ iUiControllerManager->SetStateHandler( *iStateProvider );
+
+ __TIME_ENDMARK( "CAiFw::ConstructL, done", time );
}
// ----------------------------------------------------------------------------
@@ -113,13 +121,14 @@
//
EXPORT_C CAiFw* CAiFw::NewLC()
{
+ __TICK( "CAiFw::NewLC" );
+
CAiFw* self = new ( ELeave ) CAiFw;
CleanupStack::PushL( self );
self->ConstructL();
- __TICK( "FW: Core FW constructed" );
- __HEAP( "FW: Core FW constructed" );
+ __PRINTS( "*** CAiFw::NewLC - done" );
return self;
}
@@ -183,14 +192,22 @@
//
EXPORT_C void CAiFw::RunL()
{
- CAiIdleAppRegister* idleReg = CAiIdleAppRegister::NewLC();
- idleReg->RegisterL();
- CleanupStack::PopAndDestroy( idleReg );
+ __TICK( "CAiFw::RunL" );
+
+ __PRINTS( "*** CAiFw::RunL - CAiIdleAppRegister::NewLC" );
+ __TIME_MARK( time );
+
+ CAiIdleAppRegister* registry = CAiIdleAppRegister::NewLC();
+ registry->RegisterL();
+ CleanupStack::PopAndDestroy( registry );
+ __TIME_ENDMARK( "CAiFw::RunL - CAiIdleAppRegister::NewLC, done", time );
+
// Tell UI controller manager to start application framework and event loop.
- // This function returns only when the application is shut down.
- // See in CAiFw::HandleUiReadyEventL how the framework initialization continues.
+ // This function returns only when the application is shut down.
iUiControllerManager->RunApplicationL();
+
+ __PRINTS( "*** CAiFw::RunL - done" );
}
// ----------------------------------------------------------------------------
@@ -200,6 +217,9 @@
//
void CAiFw::AppEnvReadyL()
{
+ __TICK( "CAiFw::AppEnvReadyL" );
+ __TIME_MARK( time );
+
// Initialize members which need to be connected to the app environment's
// active scheduler or depend on the app environment being initialized.
@@ -208,10 +228,9 @@
// Create WS pluign manager
iWsPluginManager = CAiWsPluginManager::NewL( env );
- iStateProvider = CAiStateProvider::NewL( *iStateManager, env );
-
- iUiControllerManager->SetStateHandler( *iStateProvider );
-
+ // Start state provider
+ iStateProvider->StartL( env );
+
// CenRep notifier to listen key changes in cenrep.
// Application is restarted if key value is changed.
iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iRepository,
@@ -227,7 +246,9 @@
iIdleRestartObserver = AiUtility::CreatePSPropertyObserverL(
TCallBack( HandleRestartEvent, this ),
- KPSUidAiInformation, KActiveIdleRestartAI2 );
+ KPSUidAiInformation, KActiveIdleRestartAI2 );
+
+ __PRINTS( "*** CAiFw::AppEnvReadyL - done" );
}
// ----------------------------------------------------------------------------
@@ -237,23 +258,26 @@
//
void CAiFw::HandleUiReadyEventL( CAiUiController& aUiController )
{
+ __TICK( "CAiFw::HandleUiReadyEventL" );
+
if ( iUiControllerManager->IsMainUiController( aUiController ) )
- {
+ {
TInt value( EIdlePhase1Ok );
- RProperty::Get( KPSUidStartup,
- KPSIdlePhase1Ok,
- value );
-
+ RProperty::Get( KPSUidStartup, KPSIdlePhase1Ok, value );
+
if ( value == EIdlePhase1NOK )
{
- RProperty::Set( KPSUidStartup,
- KPSIdlePhase1Ok,
- EIdlePhase1Ok );
- }
-
+ __TICK( "CAiFw::HandleUiReadyEventL - Setting EIdlePhase1Ok" );
+
+ RProperty::Set( KPSUidStartup, KPSIdlePhase1Ok, EIdlePhase1Ok );
+ }
+
if ( !iLibrariesLoaded )
{
+ __PRINTS( "*** CAiFw::HandleUiReadyEventL - load libraries" );
+ __TIME_MARK( time );
+
_LIT( KAIVoiceUIDialer, "VoiceUiNameDialer.dll" );
_LIT( KAIVoiceUIRecog, "VoiceUiRecognition.dll" );
_LIT( KAIVCommandHandler, "vcommandhandler.dll" );
@@ -263,10 +287,12 @@
iLibrary3.Load( KAIVCommandHandler );
iLibrariesLoaded = ETrue;
- }
-
- iUiControllerManager->LoadUIDefinition();
+
+ __TIME_ENDMARK( "CAiFw::HandleUiReadyEventL - load libraries, done", time );
+ }
}
+
+ __PRINTS( "*** CAiFw::HandleUiReadyEventL - done" );
}
// ---------------------------------------------------------------------------
@@ -276,7 +302,14 @@
//
void CAiFw::HandleActivateUI()
{
- iUiControllerManager->ActivateUI();
+ __PRINTS( "*** CAiFw::HandleActivateUI" );
+ __TIME_MARK( time );
+
+ iUiControllerManager->LoadUIDefinition();
+
+ iUiControllerManager->ActivateUI();
+
+ __TIME_ENDMARK( "CAiFw::HandleActivateUI, done", time );
}
// ---------------------------------------------------------------------------
@@ -312,8 +345,7 @@
Release( iIdleRestartObserver );
iIdleRestartObserver = NULL;
- delete iStateProvider;
- iStateProvider = NULL;
+ iStateProvider->Stop();
}
}
--- a/idlefw/src/framework/aipluginfactory.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/src/framework/aipluginfactory.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -34,19 +34,30 @@
const TUid KDeviceStatusPluginUid =
{ AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DEVSTAPLUGIN };
+const TUid KProfilePluginUid =
+ { AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_PROFILEPLUGIN };
+
_LIT( KDeviceStatusPluginName, "DeviceStatus" );
+_LIT( KProfilePluginName, "Profile" );
// ======== LOCAL FUNCTIONS ========
// ----------------------------------------------------------------------------
-// IsDeviceStatus()
+// IsRecyclable()
//
// ----------------------------------------------------------------------------
//
-TBool IsDeviceStatus( const THsPublisherInfo& aInfo )
+TBool IsRecyclable( const THsPublisherInfo& aInfo )
{
- return ( aInfo.Name() == KDeviceStatusPluginName &&
- aInfo.Uid() == KDeviceStatusPluginUid );
+ if ( ( aInfo.Name() == KProfilePluginName &&
+ aInfo.Uid() == KProfilePluginUid ) ||
+ ( aInfo.Name() == KDeviceStatusPluginName &&
+ aInfo.Uid() == KDeviceStatusPluginUid ) )
+ {
+ return ETrue;
+ }
+
+ return EFalse;
}
// ----------------------------------------------------------------------------
@@ -136,19 +147,19 @@
{
__PRINTS( "*** CAiPluginFactory::CreatePlugin: Start ***" );
- if ( IsDeviceStatus( aPublisherInfo ) )
+ if ( IsRecyclable( aPublisherInfo ) )
{
CHsContentPublisher* plugin( PluginByUid( aPublisherInfo.Uid() ) );
if ( plugin )
{
- // Devicestatus plugin already exists, update its namespace
+ // Plugin already exists, update its namespace
THsPublisherInfo& info(
const_cast< THsPublisherInfo& >( plugin->PublisherInfo() ) );
info.iNamespace.Copy( aPublisherInfo.Namespace() );
- __PRINTS( "*** CAiPluginFactory::CreatePlugin: Done - DeviceStatus plugin updated ***" );
+ __PRINTS( "*** CAiPluginFactory::CreatePlugin: Done - Plugin recycled ***" );
return KErrNone;
}
@@ -202,10 +213,10 @@
{
__PRINTS( "*** CAiPluginFactory::DestroyPlugin: Start ***" );
- if ( IsDeviceStatus( aPublisherInfo ) )
+ if ( IsRecyclable( aPublisherInfo ) )
{
- // Don't destroy device status plugin
- __PRINTS( "*** CAiPluginFactory::DestroyPlugin: Done - Keepind DeviceStatus Plug-in ***" );
+ // Don't destroy recyclable plugin
+ __PRINTS( "*** CAiPluginFactory::DestroyPlugin: Done - Keeping recyclable Plug-in ***" );
return;
}
@@ -234,12 +245,13 @@
__PRINT( __DBG_FORMAT( "\t[I]\t Loading plug-in uid=%x name=%S"),
aPublisherInfo.Uid(), &(aPublisherInfo.Name() ) );
- __TIME( "FW: Create plug-in:",
-
- iPublishers.ReserveL( iPublishers.Count() + 1 );
-
- CHsContentPublisher* plugin =
- CHsContentPublisher::NewL( aPublisherInfo ) );
+ iPublishers.ReserveL( iPublishers.Count() + 1 );
+
+ CHsContentPublisher* plugin( NULL );
+
+ __TIME( "CAiPluginFactory::CreatePluginL Create plug-in:",
+ plugin = CHsContentPublisher::NewL( aPublisherInfo ) );
+
CleanupStack::PushL( plugin );
__TIME( "FW: Subscribe content observers",
--- a/idlefw/src/framework/aistatemanager.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/src/framework/aistatemanager.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -370,7 +370,7 @@
void CAiStateManager::ProcessStateChange( TState aNextState )
{
__PRINT( __DBG_FORMAT(
- "CAiStateManager::ProcessStateChange: current state: %d, next state: %d, halt: &d" ),
+ "CAiStateManager::ProcessStateChange: current state: %d, next state: %d, halt: %d" ),
(TInt)iCurrentState, (TInt)aNextState, iHalt );
__TIME_MARK( time );
@@ -510,28 +510,41 @@
//
void CAiStateManager::StartPlugin( CHsContentPublisher& aPlugin,
CHsContentPublisher::TStartReason aReason )
- {
- __PRINTS( "CAiStateManager::StartPlugin" );
+ {
+ const THsPublisherInfo& info( aPlugin.PublisherInfo() );
+
+ __PRINT( __DBG_FORMAT(
+ "CAiStateManager::StartPlugin: name: %S, reason: %d" ), &info.Name(), (TInt)aReason );
aPlugin.Start( aReason );
if ( iCurrentState == EAlive )
{
- aPlugin.Resume( CHsContentPublisher::EForeground );
+ __TIME( "CAiStateManager::StartPlugin, enter EAlive",
+
+ aPlugin.Resume( CHsContentPublisher::EForeground ) );
}
else if ( iCurrentState == ESuspended )
{
- aPlugin.Suspend( CHsContentPublisher::EBackground );
+ __TIME( "CAiStateManager::StartPlugin, enter ESuspended",
+
+ aPlugin.Suspend( CHsContentPublisher::EBackground ) );
}
if ( iFlags.IsSet( EIsOnline ) )
{
- aPlugin.SetOnline();
+ __TIME( "CAiStateManager::StartPlugin, Set Online",
+
+ aPlugin.SetOnline() );
}
else
{
- aPlugin.SetOffline();
+ __TIME( "CAiStateManager::StartPlugin, Set Offline",
+
+ aPlugin.SetOffline() );
}
+
+ __PRINTS( "CAiStateManager::StartPlugin - done" );
}
// ----------------------------------------------------------------------------
@@ -542,14 +555,21 @@
void CAiStateManager::StopPlugin( CHsContentPublisher& aPlugin,
CHsContentPublisher::TStopReason aReason )
{
- __PRINTS( "CAiStateManager::StopPlugin" );
-
+ const THsPublisherInfo& info( aPlugin.PublisherInfo() );
+
+ __PRINT( __DBG_FORMAT(
+ "CAiStateManager::StopPlugin: name: %S, reason: %d" ), &info.Name(), (TInt)aReason );
+
if ( iCurrentState == EAlive )
{
- aPlugin.Suspend( CHsContentPublisher::EBackground );
+ __TIME( "CAiStateManager::StopPlugin, enter ESuspended",
+
+ aPlugin.Suspend( CHsContentPublisher::EBackground ) );
}
- aPlugin.Stop( aReason );
+ aPlugin.Stop( aReason );
+
+ __PRINTS( "CAiStateManager::StopPlugin - done" );
}
// ----------------------------------------------------------------------------
--- a/idlefw/src/framework/aistateprovider.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/src/framework/aistateprovider.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -40,11 +40,10 @@
// Two-phased constructor.
// ----------------------------------------------------------------------------
//
-CAiStateProvider* CAiStateProvider::NewL(
- MAiStateObserver& aObserver, CCoeEnv& aCoeEnv )
+CAiStateProvider* CAiStateProvider::NewL( MAiStateObserver& aObserver )
{
CAiStateProvider* self =
- CAiStateProvider::NewLC( aObserver, aCoeEnv );
+ CAiStateProvider::NewLC( aObserver );
CleanupStack::Pop( self );
@@ -56,11 +55,10 @@
// Two-phased constructor.
// ----------------------------------------------------------------------------
//
-CAiStateProvider* CAiStateProvider::NewLC(
- MAiStateObserver& aObserver, CCoeEnv& aCoeEnv )
+CAiStateProvider* CAiStateProvider::NewLC( MAiStateObserver& aObserver )
{
CAiStateProvider* self =
- new ( ELeave ) CAiStateProvider( aObserver, aCoeEnv );
+ new ( ELeave ) CAiStateProvider( aObserver );
CleanupStack::PushL( self );
self->ConstructL();
@@ -74,18 +72,8 @@
// ----------------------------------------------------------------------------
//
CAiStateProvider::~CAiStateProvider()
- {
- iObserver.NotifyStateChange( EAiFwUiShutdown );
-
- iCoeEnv.RemoveMessageMonitorObserver( *this );
-
- delete iEcomObserver;
-
- iSkinSrv.Close();
-
- Release( iBackupRestoreObserver );
-
- delete iLightObserver;
+ {
+ Stop();
}
// ----------------------------------------------------------------------------
@@ -93,11 +81,9 @@
// C++ default constructor.
// ----------------------------------------------------------------------------
//
-CAiStateProvider::CAiStateProvider( MAiStateObserver& aObserver,
- CCoeEnv& aCoeEnv )
- : iObserver( aObserver ), iCoeEnv( aCoeEnv )
- {
- iObserver.NotifyStateChange( EAiFwUiStartup );
+CAiStateProvider::CAiStateProvider( MAiStateObserver& aObserver )
+ : iObserver( aObserver )
+ {
}
// ----------------------------------------------------------------------------
@@ -107,18 +93,69 @@
//
void CAiStateProvider::ConstructL()
{
- iLightObserver = CHWRMLight::NewL( this );
-
- iBackupRestoreObserver = AiUtility::CreatePSPropertyObserverL(
- TCallBack( BackupRestoreEvent, this ),
- KUidSystemCategory, conn::KUidBackupRestoreKey );
-
- User::LeaveIfError( iSkinSrv.Connect( this ) );
-
- iEcomObserver = CAiEcomObserver::NewL();
- iEcomObserver->AddObserverL( this );
-
- iCoeEnv.AddMessageMonitorObserverL( *this );
+ }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::StartL()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::StartL( CCoeEnv& aCoeEnv )
+ {
+ if ( !iStarted )
+ {
+ iStarted = ETrue;
+
+ iObserver.NotifyStateChange( EAiFwUiStartup );
+
+ iLightObserver = CHWRMLight::NewL( this );
+
+ iBackupRestoreObserver = AiUtility::CreatePSPropertyObserverL(
+ TCallBack( BackupRestoreEvent, this ),
+ KUidSystemCategory, conn::KUidBackupRestoreKey );
+
+ User::LeaveIfError( iSkinSrv.Connect( this ) );
+
+ iEcomObserver = CAiEcomObserver::NewL();
+ iEcomObserver->AddObserverL( this );
+
+ iCoeEnv = &aCoeEnv;
+
+ iCoeEnv->AddMessageMonitorObserverL( *this );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CAiStateProvider::Stop()
+//
+// ----------------------------------------------------------------------------
+//
+void CAiStateProvider::Stop()
+ {
+ if ( iStarted )
+ {
+ iStarted = EFalse;
+
+ iObserver.NotifyStateChange( EAiFwUiShutdown );
+
+ if ( iCoeEnv )
+ {
+ iCoeEnv->RemoveMessageMonitorObserver( *this );
+ }
+
+ iCoeEnv = NULL;
+
+ delete iEcomObserver;
+ iEcomObserver = NULL;
+
+ iSkinSrv.Close();
+
+ Release( iBackupRestoreObserver );
+ iBackupRestoreObserver = NULL;
+
+ delete iLightObserver;
+ iLightObserver = NULL;
+ }
}
// ----------------------------------------------------------------------------
--- a/idlefw/src/idleint/aiuiidleintegration.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/src/idleint/aiuiidleintegration.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -11,35 +11,30 @@
*
* Contributors:
*
-* Description: Window server plug-in manager.
+* Description: Idle integration
*
*/
-#include "aiuiidleintegrationimpl.h"
-#include "aifweventhandler.h"
-
-#include <coemain.h>
+// System includes
#include <coeaui.h>
#include <eikenv.h>
-#include <apgtask.h>
#include <AknIncallBubbleNotify.h>
#include <aknsoundsystem.h>
-#include <apgwgnam.h>
#include <AknDef.h>
-#include <AknCapServerDefs.h>
-#include <startupdomainpskeys.h>
+#include <ctsydomainpskeys.h>
+
+// User includes
+#include <aisystemuids.hrh>
#include <aiutility.h>
#include <aipspropertyobserver.h>
-#include <aisystemuids.hrh>
-
+#include "activeidle2domainpskeys.h"
+#include "aiuiidleintegrationimpl.h"
+#include "aifweventhandler.h"
#include "aistate.h"
#include "aifwpanic.h"
-#include "activeidle2domainpskeys.h"
+#include "debug.h"
-#include <ctsydomainpskeys.h>
-
-#include <AknSgcc.h>
// ======== MEMBER FUNCTIONS ========
@@ -70,10 +65,6 @@
delete iIncallBubble;
- Release( iSystemStateObserver );
-
- Release( iUiStartupStateObserver );
-
Release( iCallStatusObserver );
}
@@ -95,6 +86,9 @@
void CAiUiIdleIntegrationImpl::ConstructL(
const TAiIdleKeySoundConfig& aKeySoundConfig )
{
+ __PRINTS( "*** CAiUiIdleIntegrationImpl::ConstructL" );
+ __TIME_MARK( time );
+
iIncallBubble = CAknIncallBubble::NewL();
iActiveIdleState = CActiveIdleState::NewL();
@@ -102,39 +96,32 @@
// Set up keysounds
if( aKeySoundConfig.iKeySounds )
{
- aKeySoundConfig.iKeySounds
- ->PushContextL( aKeySoundConfig.iContextResId );
+ aKeySoundConfig.iKeySounds->PushContextL(
+ aKeySoundConfig.iContextResId );
}
iEikEnv.SetSystem( ETrue );
-
- // Eikon server window group
- iThisApplicationWgId = iEikEnv.RootWin().Identifier();
+
+ TInt wgId( iEikEnv.RootWin().Identifier() );
+ TInt focusWgId( iEikEnv.WsSession().GetFocusWindowGroup() );
- CApaWindowGroupName::FindByAppUid( KAknCapServerUid,
- iEikEnv.WsSession(),
- iEikonServerWgId );
-
- iActiveIdleState->SetIsIdleForeground( iThisApplicationForeground );
+ if ( focusWgId == wgId )
+ {
+ __PRINTS( "*** CAiUiIdleIntegrationImpl::ConstructL - iForeground: 1" );
+
+ iForeground = ETrue;
+ }
+
+ iActiveIdleState->SetIsIdleForeground( iForeground );
- iSystemStateObserver = AiUtility::CreatePSPropertyObserverL(
- TCallBack( HandleSystemStateChange, this ),
- KPSUidStartup,
- KPSGlobalSystemState );
-
- iUiStartupStateObserver = AiUtility::CreatePSPropertyObserverL(
- TCallBack( HandleUiStartupStateChange, this ),
- KPSUidStartup,
- KPSStartupUiPhase );
-
iCallStatusObserver = AiUtility::CreatePSPropertyObserverL(
TCallBack( HandleCallEvent, this ),
KPSUidCtsyCallInformation,
KCTsyCallState );
- // Update state flags.
- CAiUiIdleIntegrationImpl::HandleSystemStateChange( this );
- CAiUiIdleIntegrationImpl::HandleUiStartupStateChange( this );
+ ActivateUI();
+
+ __TIME_ENDMARK( "CAiUiIdleIntegrationImpl::ConstructL, done", time );
}
// ----------------------------------------------------------------------------
@@ -142,24 +129,12 @@
// ----------------------------------------------------------------------------
//
void CAiUiIdleIntegrationImpl::ActivateUI()
- {
- if( iUiStartupPhaseOk && iSystemStateOk )
- {
- RWsSession& wsSession( iEikEnv.WsSession() );
-
- TInt focusWgId( wsSession.GetFocusWindowGroup() );
-
- if( iThisApplicationWgId != focusWgId )
- {
- TApaTaskList taskList( wsSession );
-
- TApaTask task( taskList.FindApp( TUid::Uid( AI_UID3_AIFW_EXE ) ) );
-
- task.SendSystemEvent( EApaSystemEventBroughtToForeground );
- }
-
- iAiFwEventHandler->HandleActivateUI();
- }
+ {
+ __TICK( "CAiUiIdleIntegrationImpl::ActivateUI - HandleActivateUI" );
+
+ iAiFwEventHandler->HandleActivateUI();
+
+ __PRINTS( "CAiUiIdleIntegrationImpl::ActivateUI - HandleActivateUI done" );
}
// ----------------------------------------------------------------------------
@@ -169,64 +144,48 @@
void CAiUiIdleIntegrationImpl::HandleWsEventL( const TWsEvent& aEvent,
CCoeControl* /*aDestination*/ )
{
- if( !iSystemStateOk || !iUiStartupPhaseOk )
- {
- return;
+ TInt type( aEvent.Type() );
+
+ if ( type == KAknFullOrPartialForegroundGained )
+ {
+ if ( !iForeground )
+ {
+ iForeground = ETrue;
+ iActiveIdleState->SetIsIdleForeground( ETrue );
+ SetCallBubbleIfNeededL();
+ }
}
-
- switch ( aEvent.Type() )
- {
- case KAknFullOrPartialForegroundGained:
- {
- if ( !iThisApplicationForeground )
- {
- iThisApplicationForeground = ETrue;
- iActiveIdleState->SetIsIdleForeground( ETrue );
- SetCallBubbleIfNeededL();
- }
- break;
- }
-
- case KAknFullOrPartialForegroundLost:
- {
- if ( iThisApplicationForeground )
- {
- iThisApplicationForeground = EFalse;
- iActiveIdleState->SetIsIdleForeground( EFalse );
- ClearCallBubbleL();
+ else if ( type == KAknFullOrPartialForegroundLost )
+ {
+ if ( iForeground )
+ {
+ iForeground = EFalse;
+ iActiveIdleState->SetIsIdleForeground( EFalse );
+ ClearCallBubbleL();
+ }
+ }
+ else if ( type == EEventKeyDown )
+ {
+ if( aEvent.Key()->iScanCode == EStdKeyDevice0 )
+ {
+ TBool isDialog( iEikEnv.AppUi()->IsDisplayingMenuOrDialog() );
+
+ if( isDialog || iAiFwEventHandler->QueryIsMenuOpen() )
+ {
+ RProperty::Set(
+ KPSUidAiInformation,
+ KActiveIdlePopupState,
+ EPSAiDisplayingMenuOrDialog );
}
- break;
- }
-
- case EEventKeyDown:
- {
- if( aEvent.Key()->iScanCode == EStdKeyDevice0 )
- {
- TBool isDialog( iEikEnv.AppUi()->IsDisplayingMenuOrDialog() );
-
- if( isDialog || iAiFwEventHandler->QueryIsMenuOpen() )
- {
- RProperty::Set(
- KPSUidAiInformation,
- KActiveIdlePopupState,
- EPSAiDisplayingMenuOrDialog );
- }
- else
- {
- RProperty::Set(
- KPSUidAiInformation,
- KActiveIdlePopupState,
- EPSAiNotDisplayingMenuOrDialog );
- }
- }
- break;
- }
-
- default:
- {
- break;
- }
- }
+ else
+ {
+ RProperty::Set(
+ KPSUidAiInformation,
+ KActiveIdlePopupState,
+ EPSAiNotDisplayingMenuOrDialog );
+ }
+ }
+ }
}
// ----------------------------------------------------------------------------
@@ -278,66 +237,6 @@
}
// ----------------------------------------------------------------------------
-// CAiUiIdleIntegrationImpl::HandleSystemStateChange()
-// ----------------------------------------------------------------------------
-//
-TInt CAiUiIdleIntegrationImpl::HandleSystemStateChange( TAny* aPtr )
- {
- __ASSERT_DEBUG( aPtr,
- AiFwPanic::Panic( AiFwPanic::EAiFwPanic_NullPointerReference ) );
-
- CAiUiIdleIntegrationImpl* self =
- static_cast<CAiUiIdleIntegrationImpl*>( aPtr );
-
- if( !self->iSystemStateOk )
- {
- TInt state( 0 );
-
- self->iSystemStateObserver->Get( state );
-
- if ( state == ESwStateCriticalPhaseOK ||
- state == ESwStateNormalRfOn ||
- state == ESwStateNormalRfOff ||
- state == ESwStateNormalBTSap )
- {
- self->iSystemStateOk = ETrue;
- self->ActivateUI();
- }
- }
-
- return KErrNone;
- }
-
-// ----------------------------------------------------------------------------
-// CAiUiIdleIntegrationImpl::HandleUiStartupStateChange()
-// ----------------------------------------------------------------------------
-//
-TInt CAiUiIdleIntegrationImpl::HandleUiStartupStateChange( TAny *aPtr )
- {
- __ASSERT_DEBUG( aPtr,
- AiFwPanic::Panic( AiFwPanic::EAiFwPanic_NullPointerReference ) );
-
- CAiUiIdleIntegrationImpl* self =
- static_cast<CAiUiIdleIntegrationImpl*>( aPtr );
-
- if( !self->iUiStartupPhaseOk )
- {
- TInt state( 0 );
-
- self->iUiStartupStateObserver->Get( state );
-
- if( state == EStartupUiPhaseAllDone )
- {
- self->iUiStartupPhaseOk = ETrue;
-
- self->ActivateUI();
- }
- }
-
- return KErrNone;
- }
-
-// ----------------------------------------------------------------------------
// CAiUiIdleIntegrationImpl::HandleCallEvent()
// ----------------------------------------------------------------------------
//
@@ -359,7 +258,7 @@
TBool allowed = EFalse;
if( !self->iIncallBubbleAllowed &&
- self->iThisApplicationForeground &&
+ self->iForeground &&
( callStatus > EPSCTsyCallStateNone ) )
{
allowed = ETrue;
--- a/idlefw/src/idleint/aiuiidleintegrationimpl.h Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/src/idleint/aiuiidleintegrationimpl.h Fri Mar 12 15:43:54 2010 +0200
@@ -19,9 +19,13 @@
#ifndef C_AIUIIDLEINTEGRATIONIMPL_H
#define C_AIUIIDLEINTEGRATIONIMPL_H
+// System includes
+#include <e32property.h>
+
+// User includes
#include "aiuiidleintegration.h"
-#include <startupdomainpskeys.h>
+// Forward declarations
class CActiveIdleState;
class CAknIncallBubble;
class MAiPSPropertyObserver;
@@ -32,7 +36,8 @@
*/
NONSHARABLE_CLASS( CAiUiIdleIntegrationImpl ) : public CAiUiIdleIntegration
{
-public: // constructor and destructor
+public:
+ // constructor and destructor
static CAiUiIdleIntegrationImpl* NewL( CEikonEnv& aEikEnv,
const TAiIdleKeySoundConfig& aKeySoundConfig,
@@ -40,49 +45,49 @@
~CAiUiIdleIntegrationImpl();
-public: // new functions
+public:
+ // new functions
void HandleWsEventL( const TWsEvent& aEvent,
CCoeControl* aDestination );
-private: // constructors
+private:
+ // constructors
CAiUiIdleIntegrationImpl(CEikonEnv& aEikEnv,
MAiFwEventHandler* aAiFwEventHandler);
void ConstructL(const TAiIdleKeySoundConfig& aKeySoundConfig);
-private: // new functions
+private:
+ // new functions
void ActivateUI();
void SetCallBubbleIfNeededL();
void ClearCallBubbleL();
- static TInt HandleSystemStateChange( TAny *aPtr );
- static TInt HandleUiStartupStateChange( TAny *aPtr );
static TInt HandleCallEvent( TAny *aPtr );
-private: // data
-
- CEikonEnv& iEikEnv;
- CActiveIdleState* iActiveIdleState;
- TBool iThisApplicationForeground;
- TBool iIncallBubbleAllowed;
- TInt iThisApplicationWgId;
- TInt iEikonServerWgId;
- CAknIncallBubble* iIncallBubble;
+private:
+ // data
/**
- * Observer for system state Publish&Subscribe key.
- * Owned.
+ * EikonEnv
+ * Not owned
*/
- MAiPSPropertyObserver* iSystemStateObserver;
-
+ CEikonEnv& iEikEnv;
+
/**
- * Observer for system state Publish&Subscribe key.
- * Owned.
+ * Active idle state
+ * Owned
*/
- MAiPSPropertyObserver* iUiStartupStateObserver;
+ CActiveIdleState* iActiveIdleState;
+
+ /**
+ * Incall bubble
+ * Owned
+ */
+ CAknIncallBubble* iIncallBubble;
/**
* Observer telephony state
@@ -95,10 +100,10 @@
*/
MAiFwEventHandler* iAiFwEventHandler;
- TBool iSystemStateOk;
- TBool iUiStartupPhaseOk;
+ TBool iForeground;
+ TBool iIncallBubbleAllowed;
};
-
#endif // C_AIUIIDLEINTEGRATION_H
+// End of file
--- a/layers.sysdef.xml Fri Feb 19 23:07:29 2010 +0200
+++ b/layers.sysdef.xml Fri Mar 12 15:43:54 2010 +0200
@@ -23,6 +23,13 @@
</module>
</layer>
+ <layer name="unit_test_layer">
+ <module name="homescreensrv_unit_tests">
+ <unit unitID="hsdo.idlefw.test" name="idlefw.test" bldFile="&layer_real_source_path;/idlefw/Internal/tsrc/group" mrp="" />
+ <unit unitID="hsdo.hsps.test" name="hsps.test" bldFile="&layer_real_source_path;/homescreensrv_plat/sapi_homescreenplugin/tsrc/group" mrp="" />
+ </module>
+ </layer>
+
</systemModel>
</SystemDefinition>
Binary file menucontentsrv/conf/s60mcs.confml has changed
--- a/menucontentsrv/group/mcsmenuhandler.mmp Fri Feb 19 23:07:29 2010 +0200
+++ b/menucontentsrv/group/mcsmenuhandler.mmp Fri Mar 12 15:43:54 2010 +0200
@@ -32,6 +32,7 @@
SOURCE menuurlhandler.cpp
SOURCE menuuninstalloperation.cpp
SOURCE menulinkhandler.cpp
+SOURCE menutasklist.cpp
USERINCLUDE ../inc
USERINCLUDE ../handlerinc
--- a/menucontentsrv/group/mcsmenusrv.mmp Fri Feb 19 23:07:29 2010 +0200
+++ b/menucontentsrv/group/mcsmenusrv.mmp Fri Mar 12 15:43:54 2010 +0200
@@ -12,7 +12,7 @@
* Contributors:
*
* Description:
-* Version : %version: sa1spcx1#5.1.7 % << Don't touch! Updated by Synergy at check-out.
+* Version : %version: ou1s60ui#5.1.8 % << Don't touch! Updated by Synergy at check-out.
*
*/
@@ -22,8 +22,6 @@
#include <data_caging_paths.hrh>
#include "../inc/menuuid.hrh"
-EPOCHEAPSIZE 4000 3000000
-
TARGET mcsmenuserver.exe
TARGETTYPE exe
UID 0x1000008c MENU_SRV_UID3
@@ -44,6 +42,6 @@
LIBRARY euser.lib
LIBRARY mcsmenu.lib
LIBRARY mcsmenuutils.lib
+LIBRARY MemMan.lib
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/menucontentsrv/handlerinc/menutasklist.h Fri Mar 12 15:43:54 2010 +0200
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2005 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:
+*
+*
+*/
+
+
+#ifndef MENUTASKLIST_H
+#define MENUTASKLIST_H
+
+// INCLUDES
+
+#include <w32std.h>
+#include <apgtask.h>
+
+// CLASS DECLARATION
+
+/**
+* Class for finding out about running applications.
+*
+* This is a modification of the original CAknTaskList class, which
+* differs in that it does not discriminate applications based on their
+* window group priority.
+* @since Series 60 3.0
+*/
+class CMenuTaskList : public CBase
+ {
+public:
+ /**
+ * Factory function
+ * @param aWsSession an open session to the window server, often from CEikonEnv::WsSession()
+ * @return a new fully constructed instance of CMenuTaskList
+ */
+ static CMenuTaskList* NewL(RWsSession& aWsSession);
+ /**
+ * Factory function
+ * @param aWsSession an open session to the window server, often from CEikonEnv::WsSession()
+ * @return a new fully constructed instance of CMenuTaskList, which is on the cleanup stack
+ */
+ static CMenuTaskList* NewLC(RWsSession& aWsSession);
+ /**
+ * Destructor.
+ */
+ ~CMenuTaskList();
+
+ /**
+ * Refresh the window group array
+ */
+ void UpdateListL();
+ /**
+ * Accessor for the window group array
+ * @return an array containing the window groups of running applications.
+ */
+ const RArray<RWsSession::TWindowGroupChainInfo>& WgArray() const;
+
+ /**
+ * Find an application with the requested UID 3, which is running as a root application
+ * @param aAppUid the UID 3 of the target application.
+ * @return a TApaTask which refers to the running instance of the application.
+ * if the application is not running, the TApaTask's Exists() function will return EFalse.
+ */
+ TApaTask FindRootApp(TUid aAppUid) const;
+ /**
+ * Query whether an application's window group is running as a root application.
+ * @param aWgId the window group identifier of the target application.
+ * @return ETrue if this window group is running as a root window group.
+ */
+ TBool IsRootWindowGroup(TInt aWgId) const;
+
+private:
+ CMenuTaskList(RWsSession& aWsSession);
+ void ConstructL();
+
+private:
+ RWsSession& iWs;
+ RArray<RWsSession::TWindowGroupChainInfo> iWgs;
+ };
+
+#endif
--- a/menucontentsrv/handlersrc/menuapphandler.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/menucontentsrv/handlersrc/menuapphandler.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -18,6 +18,7 @@
#include "mcsmenuitem.h"
#include "menucompletedoperation.h"
#include "menuuninstalloperation.h"
+#include "menutasklist.h"
#include <mcsmenuutils.h>
#include <w32std.h>
@@ -26,7 +27,6 @@
#include <eikenv.h>
#include <eikappui.h>
#include <vwsdef.h>
-#include <AknTaskList.h>
// ================= MEMBER FUNCTIONS =======================
@@ -158,9 +158,8 @@
User::LeaveIfError( wsSession.Connect() );
CleanupClosePushL<RWsSession>( wsSession );
- TApaTaskList* taskList = new (ELeave) TApaTaskList( wsSession );
- TApaTask task = taskList->FindApp( aUid );
-
+ CMenuTaskList* taskList = CMenuTaskList::NewL( wsSession );
+ TApaTask task = taskList->FindRootApp( aUid );
delete taskList;
if ( task.Exists() )
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/menucontentsrv/handlersrc/menutasklist.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2009 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:
+*
+*/
+
+#include <apgwgnam.h>
+
+#include "menutasklist.h"
+
+CMenuTaskList* CMenuTaskList::NewL(RWsSession& aWsSession)
+ {
+ CMenuTaskList* self = NewLC(aWsSession);
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+CMenuTaskList* CMenuTaskList::NewLC(RWsSession& aWsSession)
+ {
+ CMenuTaskList* self = new(ELeave) CMenuTaskList(aWsSession);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ return self;
+ }
+
+CMenuTaskList::CMenuTaskList(RWsSession& aWsSession)
+: iWs(aWsSession)
+ {
+ }
+
+void CMenuTaskList::ConstructL()
+ {
+ UpdateListL();
+ }
+
+CMenuTaskList::~CMenuTaskList()
+ {
+ iWgs.Close();
+ }
+
+void CMenuTaskList::UpdateListL()
+ {
+ User::LeaveIfError(iWs.WindowGroupList(&iWgs));
+ }
+
+
+TApaTask CMenuTaskList::FindRootApp(TUid aAppUid) const
+ {
+ TApaTask task(iWs);
+ task.SetWgId(0); // initialise task to non-existant task
+ // wgId = 0 tells FindAppByUid to start looking for apps
+ TInt wgId=0;
+ FOREVER
+ {
+ CApaWindowGroupName::FindByAppUid(aAppUid, iWs, wgId);
+ // KErrNotFound means that no more apps can be found
+ if (wgId == KErrNotFound)
+ break;
+ if (IsRootWindowGroup(wgId))
+ {
+ // Found a root wg with the right app UID, return it.
+ task.SetWgId(wgId);
+ break;
+ }
+ }
+ return task;
+ }
+
+TBool CMenuTaskList::IsRootWindowGroup(TInt aWgId) const
+ {
+ TInt count = iWgs.Count();
+ for (TInt ii=0; ii<count; ii++)
+ {
+ const RWsSession::TWindowGroupChainInfo& info = iWgs[ii];
+ // find the window group id and check that it has no parent
+ if (info.iId == aWgId)
+ return (info.iParentId <= 0);
+ }
+ return EFalse;
+ }
--- a/menucontentsrv/srvsrc/menusrvmain.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/menucontentsrv/srvsrc/menusrvmain.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -16,7 +16,7 @@
*/
// INCLUDE FILES
-
+#include <mw/memorymanager.h>
#include "menusrv.h"
// ==================== LOCAL FUNCTIONS ====================
@@ -27,6 +27,10 @@
*/
GLDEF_C TInt E32Main()
{
+ RAllocator* iAllocator = MemoryManager::SwitchToFastAllocator();
+
TInt err = RunMenuServer();
+
+ MemoryManager::CloseFastAllocator(iAllocator);
return err;
}
--- a/xcfw/src/xcfwlocalizer.cpp Fri Feb 19 23:07:29 2010 +0200
+++ b/xcfw/src/xcfwlocalizer.cpp Fri Mar 12 15:43:54 2010 +0200
@@ -159,9 +159,8 @@
do {
lcstring.Num( (TInt64)langs[current] );
codelen = lcstring.Length()>1?lcstring.Length():KMinLangCodeLen;
- locfile->Des().Copy( PathInfo::RomRootPath().Left( KPathStartLoc ) );
- locfile->Des().Append( filepath );
- locfile->Des().Format( locfile->Des(), codelen, langs[current] );
+ locfile->Des().Format( filepath, codelen, langs[current] );
+ locfile->Des().Insert( 0, PathInfo::RomRootPath().Left( KPathStartLoc ) );
current--;
} while ( current >= 0 &&
!BaflUtils::FileExists( aFileSystem, locfile->Des() ) );