|
1 /* |
|
2 * Copyright (c) 2006-2007 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 object implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef THUMBNAILDATAIMPL_H |
|
20 #define THUMBNAILDATAIMPL_H |
|
21 |
|
22 #include "thumbnaildata.h" |
|
23 |
|
24 /** |
|
25 * Thumbnail object implementation. |
|
26 * |
|
27 * @since S60 v5.0 |
|
28 */ |
|
29 NONSHARABLE_CLASS( CThumbnailDataImpl ): public CBase, public MThumbnailData |
|
30 { |
|
31 public: |
|
32 |
|
33 /** |
|
34 * C++ default constructor |
|
35 * |
|
36 * @since S60 v5.0 |
|
37 * @return New thumbnail instance. |
|
38 */ |
|
39 CThumbnailDataImpl(); |
|
40 |
|
41 /** |
|
42 * Destructor |
|
43 * |
|
44 * @since S60 v5.0 |
|
45 */ |
|
46 virtual ~CThumbnailDataImpl(); |
|
47 |
|
48 public: |
|
49 |
|
50 /** |
|
51 * Get a pointer to a CFbsBitmap containing the thumbnail image. Ownership |
|
52 * of the object is not transferred (i.e. client must not delete the |
|
53 * pointer). |
|
54 * @since S60 v5.0 |
|
55 * @return Pointer to a bitmap representing the thumbnail or NULL if |
|
56 * thumbnail pointer is not available or it has been detached. |
|
57 */ |
|
58 CFbsBitmap* Bitmap(); |
|
59 |
|
60 /** |
|
61 * Get a pointer to a CFbsBitmap containing the thumbnail image. Ownership |
|
62 * of the object is transferred to the caller. Client must delete the |
|
63 * bitmap after it is done processing it. |
|
64 * @since S60 v5.0 |
|
65 * @return Pointer to a bitmap representing the thumbnail or NULL if |
|
66 * thumbnail pointer is not available or it has been detached. |
|
67 * Caller assumes ownership of the bitmap. |
|
68 */ |
|
69 CFbsBitmap* DetachBitmap(); |
|
70 |
|
71 /** |
|
72 * Get client data structure. |
|
73 * |
|
74 * @since S60 v5.0 |
|
75 * @return A pointer for client data specified as a parameter for |
|
76 * GetThumbnailL() or NULL if not specified. |
|
77 */ |
|
78 TAny* ClientData(); |
|
79 |
|
80 /** |
|
81 * Sets the thumbnail object data. |
|
82 * |
|
83 * @since S60 v5.0 |
|
84 * @param aBitmap Bitmab for the object. |
|
85 * @param aClientData Pointer to arbitrary client data. |
|
86 * This pointer is not used by the API for |
|
87 * anything other than returning it in the |
|
88 * ThumbnailReady callback. |
|
89 */ |
|
90 void Set( CFbsBitmap* aBitmap, TAny* aClientData ); |
|
91 |
|
92 private: |
|
93 // data |
|
94 |
|
95 /** |
|
96 * Bitmap. |
|
97 */ |
|
98 CFbsBitmap* iBitmap; |
|
99 |
|
100 /** |
|
101 * Arbitrary client data. |
|
102 */ |
|
103 TAny* iClientData; |
|
104 }; |
|
105 |
|
106 #endif // THUMBNAILDATAIMPL_H |