1 /* |
|
2 * Copyright (c) 2006 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: Loads a slide from file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_SLIDESHOWSLIDELOADER_H |
|
21 #define C_SLIDESHOWSLIDELOADER_H |
|
22 |
|
23 #include <e32std.h> |
|
24 #include <fbs.h> |
|
25 #include <f32file.h> |
|
26 #include <bautils.h> |
|
27 #include <coemain.h> |
|
28 #include <e32base.h> |
|
29 #include <bitstd.h> |
|
30 #include <imageconversion.h> |
|
31 |
|
32 class CSlideshowSlide; |
|
33 class CSlideshowSlideLoader : public CActive |
|
34 { |
|
35 public: |
|
36 // Creator |
|
37 static CSlideshowSlideLoader* NewL(CSlideshowSlide *aSlide); |
|
38 |
|
39 // Called when image decoding done |
|
40 void RunL(); |
|
41 |
|
42 // Called if user calls Cancel() on active object |
|
43 void DoCancel(); |
|
44 |
|
45 //virtual distructor |
|
46 virtual ~CSlideshowSlideLoader(); |
|
47 |
|
48 //start decoding the slide |
|
49 void LoadSlideL(const TDesC& aFilename, const TSize& aTargetSize); |
|
50 |
|
51 private: |
|
52 |
|
53 // Default constructor |
|
54 CSlideshowSlideLoader(CSlideshowSlide *aSlide); |
|
55 |
|
56 //Two Phase constructor |
|
57 void ConstructL(); |
|
58 |
|
59 //Delete the Decoder object |
|
60 void DeleteDecoder(); |
|
61 |
|
62 //From CActive |
|
63 TInt RunError(TInt aError); |
|
64 |
|
65 private: |
|
66 |
|
67 // Target size (Phone screen size) |
|
68 TSize iTargetSize; |
|
69 //Bitmap size |
|
70 TSize iBitmapsize; |
|
71 //Decoder |
|
72 CImageDecoder * iDecoder; |
|
73 //Slide |
|
74 CSlideshowSlide * iSlide; |
|
75 |
|
76 }; |
|
77 |
|
78 #endif // C_SLIDESHOWSLIDELOADER_H |
|