# HG changeset patch # User William Roberts # Date 1268572203 0 # Node ID addf974254a65f83fcdb5dfd8facfa16489b0c58 # Parent 62bf59ab417f4113b8526c51eb2341d7b460c1bb# Parent 51c0f5edf5ef526e2042c730d0862cc486afee94 Automatic merge from PDK_3.0.h diff -r 51c0f5edf5ef -r addf974254a6 ncdengine/engine/group/catalogsdebug.mmp --- a/ncdengine/engine/group/catalogsdebug.mmp Fri Feb 19 22:57:02 2010 +0200 +++ b/ncdengine/engine/group/catalogsdebug.mmp Sun Mar 14 13:10:03 2010 +0000 @@ -51,7 +51,7 @@ SOURCEPATH ../../engine/src SOURCE catalogsdebug.cpp #ifndef WINSCW -SOURCE stackpointer.s +SOURCE stackpointer.cia #endif // System include paths diff -r 51c0f5edf5ef -r addf974254a6 ncdengine/engine/src/catalogsdebug.cpp --- a/ncdengine/engine/src/catalogsdebug.cpp Fri Feb 19 22:57:02 2010 +0200 +++ b/ncdengine/engine/src/catalogsdebug.cpp Sun Mar 14 13:10:03 2010 +0000 @@ -49,7 +49,7 @@ #include "e32debug.h" #ifndef __WINS__ -extern "C" TUint32 GetStackPointer(); +extern TUint32 GetStackPointer(); #endif //#define _DDPRINT( x ) RDebug::Printf x diff -r 51c0f5edf5ef -r addf974254a6 ncdengine/engine/src/stackpointer.cia --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ncdengine/engine/src/stackpointer.cia Sun Mar 14 13:10:03 2010 +0000 @@ -0,0 +1,23 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "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 + +__NAKED__ TUint32 GetStackPointer(void) + { + asm("mov r0,sp"); + asm("bx lr"); + } + diff -r 51c0f5edf5ef -r addf974254a6 ncdengine/engine/src/stackpointer.s --- a/ncdengine/engine/src/stackpointer.s Fri Feb 19 22:57:02 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -; -; 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: -; - - -;.text -;.global GetStackPointer -; -;GetStackPointer: -; mov r0,r13 -; mov pc,r14 - - AREA |.text|, CODE, READONLY - EXPORT GetStackPointer - -GetStackPointer - mov r0,sp - bx lr - END diff -r 51c0f5edf5ef -r addf974254a6 ncdengine/provider/server/inc/ncdfavoritemanagerimpl.h --- a/ncdengine/provider/server/inc/ncdfavoritemanagerimpl.h Fri Feb 19 22:57:02 2010 +0200 +++ b/ncdengine/provider/server/inc/ncdfavoritemanagerimpl.h Sun Mar 14 13:10:03 2010 +0000 @@ -107,9 +107,93 @@ virtual void CounterPartLost( const MCatalogsSession& aSession ); +private: + + /** + * CNcdClientFavorites object encapsulates the favorite identifiers of one + * client. + */ + class CNcdClientFavorites : public CBase, + public MNcdStorageDataItem + { + public: + static CNcdClientFavorites* NewLC( const TUid& aClientUid ); + ~CNcdClientFavorites(); + + TUid ClientUid() const; + void AddFavoriteL( CNcdNodeIdentifier* aNodeIdentifier ); + void RemoveFavorite( const CNcdNodeIdentifier& aNodeIdentifier ); + void RemoveFavorites(); + void SetDisclaimerL( + const CNcdNodeIdentifier& aNodeIdentifier, + const CNcdNodeDisclaimer& aDisclaimer ); + void RemoveDisclaimer( const CNcdNodeIdentifier& aNodeIdentifier ); + CNcdNodeDisclaimer* Disclaimer( + const CNcdNodeIdentifier& aNodeIdentifier ) const; + + TBool HasFavorite( const CNcdNodeIdentifier& aNodeIdentifier ) const; + + const RPointerArray& Identifiers() const; + void ExternalizeIdentifiersL( RWriteStream& aStream ) const; + + public: // from MNcdStorageDataItem + + /* + * @see MNcdStorageDataItem::ExternalizeL + */ + virtual void ExternalizeL( RWriteStream& aStream ); + + /* + * @see MNcdStorageDataItem::InternalizeL + */ + virtual void InternalizeL( RReadStream& aStream ); + + protected: + CNcdClientFavorites( const TUid& aClientUid ); + void CloseDisclaimers(); + + private: + + // Node identifiers. + RPointerArray iIdentifiers; + // Node disclaimers. A disclaimer at index 'i' is disclaimer of the node at + // the same index. + RPointerArray iDisclaimers; + + // Client uid. + TUid iClientUid; + }; + + + class CNcdTemporaryFavorites : public CBase + { + public: // public functions + CNcdTemporaryFavorites( MCatalogsSession& aSession ); + ~CNcdTemporaryFavorites(); + + + public: // member variables + MCatalogsSession& iSession; + RPointerArray iFavoriteIdentifiers; + }; + + CNcdGeneralManager& iGeneralManager; + + // Node manager. + CNcdNodeManager& iNodeManager; + + // Favorite nodes of all the clients. + RPointerArray iFavorites; + + // Temp favorite mappings. + RPointerArray iTempFavorites; + + // Storage manager. + MNcdStorageManager& iStorageManager; + protected: - class CNcdClientFavorites; + //class CNcdClientFavorites; class CNcdTemporaryFavorites; CNcdFavoriteManager( CNcdGeneralManager& aGeneralManager ); @@ -234,89 +318,6 @@ void DbSaveFavoritesL( CNcdClientFavorites& aFavorites ); -private: - - /** - * CNcdClientFavorites object encapsulates the favorite identifiers of one - * client. - */ - class CNcdClientFavorites : public CBase, - public MNcdStorageDataItem - { - public: - static CNcdClientFavorites* NewLC( const TUid& aClientUid ); - ~CNcdClientFavorites(); - - TUid ClientUid() const; - void AddFavoriteL( CNcdNodeIdentifier* aNodeIdentifier ); - void RemoveFavorite( const CNcdNodeIdentifier& aNodeIdentifier ); - void RemoveFavorites(); - void SetDisclaimerL( - const CNcdNodeIdentifier& aNodeIdentifier, - const CNcdNodeDisclaimer& aDisclaimer ); - void RemoveDisclaimer( const CNcdNodeIdentifier& aNodeIdentifier ); - CNcdNodeDisclaimer* Disclaimer( - const CNcdNodeIdentifier& aNodeIdentifier ) const; - - TBool HasFavorite( const CNcdNodeIdentifier& aNodeIdentifier ) const; - - const RPointerArray& Identifiers() const; - void ExternalizeIdentifiersL( RWriteStream& aStream ) const; - - public: // from MNcdStorageDataItem - - /* - * @see MNcdStorageDataItem::ExternalizeL - */ - virtual void ExternalizeL( RWriteStream& aStream ); - - /* - * @see MNcdStorageDataItem::InternalizeL - */ - virtual void InternalizeL( RReadStream& aStream ); - - protected: - CNcdClientFavorites( const TUid& aClientUid ); - void CloseDisclaimers(); - - private: - - // Node identifiers. - RPointerArray iIdentifiers; - // Node disclaimers. A disclaimer at index 'i' is disclaimer of the node at - // the same index. - RPointerArray iDisclaimers; - - // Client uid. - TUid iClientUid; - }; - - - class CNcdTemporaryFavorites : public CBase - { - public: // public functions - CNcdTemporaryFavorites( MCatalogsSession& aSession ); - ~CNcdTemporaryFavorites(); - - - public: // member variables - MCatalogsSession& iSession; - RPointerArray iFavoriteIdentifiers; - }; - - CNcdGeneralManager& iGeneralManager; - - // Node manager. - CNcdNodeManager& iNodeManager; - - // Favorite nodes of all the clients. - RPointerArray iFavorites; - - // Temp favorite mappings. - RPointerArray iTempFavorites; - - // Storage manager. - MNcdStorageManager& iStorageManager; }; #endif