46
|
1 |
/*
|
|
2 |
* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: SVG Implementation header file
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef __IMAGEHASHMAP_H__
|
|
20 |
#define __IMAGEHASHMAP_H__
|
|
21 |
|
|
22 |
#include <e32std.h>
|
|
23 |
#include "fbs.h"
|
|
24 |
|
|
25 |
class CSvgImageMapItem: public CBase
|
|
26 |
{
|
|
27 |
public:
|
|
28 |
|
|
29 |
enum TSvgImageType
|
|
30 |
{
|
|
31 |
ESvgBase64Image,
|
|
32 |
ESvgExternalImage
|
|
33 |
};
|
|
34 |
|
|
35 |
static CSvgImageMapItem* NewL();
|
|
36 |
|
|
37 |
static CSvgImageMapItem* NewLC();
|
|
38 |
|
|
39 |
CSvgImageMapItem();
|
|
40 |
|
|
41 |
~CSvgImageMapItem();
|
|
42 |
|
|
43 |
void ConstructL();
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Need method description
|
|
47 |
*
|
|
48 |
* @since 1.0
|
|
49 |
* @param
|
|
50 |
* @return
|
|
51 |
*/
|
|
52 |
CFbsBitmap* GetImagePtr();
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Need method description
|
|
56 |
*
|
|
57 |
* @since 1.0
|
|
58 |
* @param
|
|
59 |
* @return
|
|
60 |
*/
|
|
61 |
const TDesC& GetImageName();
|
|
62 |
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Need method description
|
|
66 |
*
|
|
67 |
* @since 1.0
|
|
68 |
* @param
|
|
69 |
* @return
|
|
70 |
*/
|
|
71 |
void SetImagePtr( CFbsBitmap* aImagePtr );
|
|
72 |
|
|
73 |
/**
|
|
74 |
* Need method description
|
|
75 |
*
|
|
76 |
* @since 1.0
|
|
77 |
* @param
|
|
78 |
* @return
|
|
79 |
*/
|
|
80 |
void CopyImageNameL( const TDesC& aImageName );
|
|
81 |
|
|
82 |
TInt IncrementReferenceCount( );
|
|
83 |
|
|
84 |
TInt DecrementReferenceCount( );
|
|
85 |
|
|
86 |
void SetImageDecodingStatus( TBool aThisImageIsDecoding );
|
|
87 |
|
|
88 |
TBool GetImageDecodingStatus( );
|
|
89 |
|
|
90 |
void Print();
|
|
91 |
|
|
92 |
public:
|
|
93 |
CFbsBitmap* iImagePtr;
|
|
94 |
HBufC* iImageName;
|
|
95 |
TInt iImageReferenceCount;
|
|
96 |
TBool iImageDecodingStatus;
|
|
97 |
TSvgImageType iImageType;
|
|
98 |
};
|
|
99 |
|
|
100 |
class CSvgImageHashMap : public CBase
|
|
101 |
{
|
|
102 |
public:
|
|
103 |
|
|
104 |
static CSvgImageHashMap* NewL();
|
|
105 |
|
|
106 |
static CSvgImageHashMap* NewLC();
|
|
107 |
|
|
108 |
CSvgImageHashMap();
|
|
109 |
|
|
110 |
~CSvgImageHashMap();
|
|
111 |
|
|
112 |
void ConstructL();
|
|
113 |
|
|
114 |
//IMAGE MAPPING METHODS
|
|
115 |
TBool AddImageL ( CFbsBitmap* aImage, const TDesC& aImageName );
|
|
116 |
|
|
117 |
TBool RemoveReferenceFromImageL( const TDesC& aImageName );
|
|
118 |
|
|
119 |
CFbsBitmap* GetImagePtr( const TDesC& aImageName );
|
|
120 |
|
|
121 |
CSvgImageMapItem* GetImageMapItem( const TDesC& aImageName );
|
|
122 |
|
|
123 |
TBool HasImageName( const TDesC& aImageName );
|
|
124 |
|
|
125 |
void PrintImageHashMap();
|
|
126 |
|
|
127 |
private:
|
|
128 |
RPointerArray<CSvgImageMapItem> iSvgImageMapItems;
|
|
129 |
|
|
130 |
//data item used in the ImageHashMap
|
|
131 |
|
|
132 |
};
|
|
133 |
|
|
134 |
#endif
|