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