|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Thumbnail Info |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef T_GLXTHUMBNAILATTRIBUTEINFO_H |
|
21 #define T_GLXTHUMBNAILATTRIBUTEINFO_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class CFbsBitmap; |
|
26 |
|
27 /** |
|
28 * Thumbnail attribute content ID |
|
29 */ |
|
30 const TInt KGlxMediaIdThumbnail = 0x2000719E; |
|
31 |
|
32 const TInt KGlxAttribSpecThumbnailSize = 0x01; |
|
33 const TInt KGlxAttribSpecThumbnailCroppingRect = 0x02; |
|
34 const TInt KGlxAttribSpecThumbnailQualityOverSpeed = 0x04; |
|
35 const TInt KGlxAttribSpecThumbnailFiltering = 0x08; |
|
36 const TInt KGlxAttribSpecThumbnailBitmapHandle = 0x10; |
|
37 const TInt KGlxAttribSpecThumbnailQuicklyAvailable = 0x20; |
|
38 |
|
39 /** |
|
40 * Get the attribute ID for a full thumbnail attribute. |
|
41 */ |
|
42 inline TUint GlxFullThumbnailAttributeId(TBool aHighQuality, |
|
43 TInt aWidth, TInt aHeight); |
|
44 |
|
45 /** |
|
46 * Get the attribute ID for a zoomed thumbnail attribute. |
|
47 */ |
|
48 inline TUint GlxZoomedThumbnailAttributeId(TInt aZoomLevel, |
|
49 TInt aXIndex, TInt aYIndex); |
|
50 |
|
51 /** |
|
52 * Is an attribute ID for a full thumbnail attribute? |
|
53 */ |
|
54 inline TBool GlxIsFullThumbnailAttribute(TUint aAttributeId); |
|
55 |
|
56 /** |
|
57 * Get the zoom level from a zoomed thumbnail attribute. |
|
58 */ |
|
59 inline TInt GlxZoomedThumbnailZoomLevel(TUint aAttributeId); |
|
60 |
|
61 /** |
|
62 * Structure used for a thumbnail attribute. |
|
63 */ |
|
64 class CGlxThumbnailAttribute : public CBase |
|
65 { |
|
66 public: |
|
67 /** |
|
68 * C++ default constructor. |
|
69 */ |
|
70 inline CGlxThumbnailAttribute(); |
|
71 /** |
|
72 * Destructor. |
|
73 */ |
|
74 inline ~CGlxThumbnailAttribute(); |
|
75 |
|
76 inline void ExternalizeL(RWriteStream& aStream) const; |
|
77 inline void InternalizeL(RReadStream& aStream); |
|
78 |
|
79 public: |
|
80 /** Pointer to bitmap (not filled in by server side!) */ |
|
81 CFbsBitmap* iBitmap; |
|
82 /** Cropping rect within original image dimensions */ |
|
83 TRect iCroppingRect; |
|
84 /** Size of thumbnail bitmap in pixels */ |
|
85 TSize iDimensions; |
|
86 /** Quality of provided thumbnails: 0 = low quality. 255 = high quality. |
|
87 No values in between supported */ |
|
88 TInt iThumbnailQuality; |
|
89 }; |
|
90 |
|
91 #include <glxthumbnailattributeinfo.inl> |
|
92 |
|
93 #endif // T_GLXTHUMBNAILATTRIBUTEINFO_H |