22 #include <imageconversion.h> |
22 #include <imageconversion.h> |
23 #include "glximageviewermanager.h" |
23 #include "glximageviewermanager.h" |
24 class CFbsBitmap; |
24 class CFbsBitmap; |
25 |
25 |
26 /** |
26 /** |
27 * Image Size observer. |
|
28 * |
|
29 * Callback interface for getting size information of a given image. |
|
30 */ |
|
31 class MImageReadyCallBack |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * Getting image size information is complete. |
|
36 * |
|
37 * @param aError Error code. |
|
38 * @param aSz Size of the image. |
|
39 */ |
|
40 virtual void ImageSizeReady(TInt aError, const TSize aSz) = 0; |
|
41 }; |
|
42 |
|
43 /** |
|
44 * CGlxImageReader |
27 * CGlxImageReader |
45 * |
28 * |
46 * Image Attributes Reader |
29 * Image Attributes Reader |
47 * |
30 * |
48 * @lib glxmedialists.lib |
31 * @lib glxmedialists.lib |
49 */ |
32 */ |
50 class CGlxImageReader : public CActive |
33 class CGlxImageReader : public CBase |
51 { |
34 { |
52 |
35 |
53 private: |
36 private: |
54 static CGlxImageReader* NewLC(MImageReadyCallBack& aNotify); |
37 static CGlxImageReader* NewLC(); |
55 CGlxImageReader(MImageReadyCallBack& aNotify); |
38 CGlxImageReader(); |
56 void ConstructL(); |
39 void ConstructL(); |
57 |
|
58 void GetFileTypeL(TDataType aMimeType); |
40 void GetFileTypeL(TDataType aMimeType); |
59 |
41 |
60 protected: |
|
61 void DoCancel(); |
|
62 void RunL(); |
|
63 |
|
64 public: |
42 public: |
65 static CGlxImageReader* NewL(MImageReadyCallBack& aNotify); |
43 static CGlxImageReader* NewL(); |
66 ~CGlxImageReader(); |
44 ~CGlxImageReader(); |
67 TInt GetDRMRightsL(TInt aAttribute); |
45 TInt GetDRMRightsL(TInt aAttribute); |
|
46 TInt GetFrameCount(); |
|
47 TSize GetDimensions(); |
68 |
48 |
69 private: |
49 private: |
70 MImageReadyCallBack& iNotify; |
|
71 CImageDecoder* iImageDecoder; |
50 CImageDecoder* iImageDecoder; |
72 CFbsBitmap* iFrame; |
|
73 CGlxImageViewerManager* iImgViewerMgr; |
51 CGlxImageViewerManager* iImgViewerMgr; |
74 }; |
52 }; |
75 |
53 |
76 #endif /* GLXIMAGEREADER_H_ */ |
54 #endif /* GLXIMAGEREADER_H_ */ |