diff -r 000000000000 -r d46562c3d99d svgtopt/SVG/SVGImpl/inc/SVGImageHashMap.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/svgtopt/SVG/SVGImpl/inc/SVGImageHashMap.h Thu Jan 07 16:19:02 2010 +0200 @@ -0,0 +1,134 @@ +/* +* Copyright (c) 2003 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: SVG Implementation header file + * +*/ + + +#ifndef __IMAGEHASHMAP_H__ +#define __IMAGEHASHMAP_H__ + +#include +#include "fbs.h" + + class CSvgImageMapItem: public CBase + { + public: + + enum TSvgImageType + { + ESvgBase64Image, + ESvgExternalImage + }; + + static CSvgImageMapItem* NewL(); + + static CSvgImageMapItem* NewLC(); + + CSvgImageMapItem(); + + ~CSvgImageMapItem(); + + void ConstructL(); + + /** + * Need method description + * + * @since 1.0 + * @param + * @return + */ + CFbsBitmap* GetImagePtr(); + + /** + * Need method description + * + * @since 1.0 + * @param + * @return + */ + const TDesC& GetImageName(); + + + /** + * Need method description + * + * @since 1.0 + * @param + * @return + */ + void SetImagePtr( CFbsBitmap* aImagePtr ); + + /** + * Need method description + * + * @since 1.0 + * @param + * @return + */ + void CopyImageNameL( const TDesC& aImageName ); + + TInt IncrementReferenceCount( ); + + TInt DecrementReferenceCount( ); + + void SetImageDecodingStatus( TBool aThisImageIsDecoding ); + + TBool GetImageDecodingStatus( ); + + void Print(); + + public: + CFbsBitmap* iImagePtr; + HBufC* iImageName; + TInt iImageReferenceCount; + TBool iImageDecodingStatus; + TSvgImageType iImageType; + }; + +class CSvgImageHashMap : public CBase + { + public: + + static CSvgImageHashMap* NewL(); + + static CSvgImageHashMap* NewLC(); + + CSvgImageHashMap(); + + ~CSvgImageHashMap(); + + void ConstructL(); + + //IMAGE MAPPING METHODS + TBool AddImageL ( CFbsBitmap* aImage, const TDesC& aImageName ); + + TBool RemoveReferenceFromImageL( const TDesC& aImageName ); + + CFbsBitmap* GetImagePtr( const TDesC& aImageName ); + + CSvgImageMapItem* GetImageMapItem( const TDesC& aImageName ); + + TBool HasImageName( const TDesC& aImageName ); + + void PrintImageHashMap(); + + private: + RPointerArray iSvgImageMapItems; + + //data item used in the ImageHashMap + +}; + +#endif