29 // CImageHandler::CImageHandler |
29 // CImageHandler::CImageHandler |
30 // C++ constructor can NOT contain any code, that |
30 // C++ constructor can NOT contain any code, that |
31 // might leave. |
31 // might leave. |
32 // ----------------------------------------------------------------------------- |
32 // ----------------------------------------------------------------------------- |
33 // |
33 // |
34 CImageHandler::CImageHandler( RFs& aFs ) |
34 CImageHandler::CImageHandler( RFs& aFs, CPodcastModel& aPodcastModel ) |
35 : CActive(CActive::EPriorityStandard) |
35 : CActive(CActive::EPriorityStandard) |
36 , iDecoder(NULL) |
36 , iDecoder(NULL) |
37 , iScaler(NULL) |
37 , iScaler(NULL) |
38 , iFs(aFs) |
38 , iFs(aFs) |
39 , iSize(0,0) |
39 , iSize(0,0) |
|
40 , iPodcastModel(aPodcastModel) |
40 { |
41 { |
41 } |
42 } |
42 |
43 |
43 // ----------------------------------------------------------------------------- |
44 // ----------------------------------------------------------------------------- |
44 // CImageHandler::ConstructL |
45 // CImageHandler::ConstructL |
54 // ----------------------------------------------------------------------------- |
55 // ----------------------------------------------------------------------------- |
55 // CImageHandler::NewLC |
56 // CImageHandler::NewLC |
56 // Two-phased constructor. |
57 // Two-phased constructor. |
57 // ----------------------------------------------------------------------------- |
58 // ----------------------------------------------------------------------------- |
58 // |
59 // |
59 EXPORT_C CImageHandler* CImageHandler::NewL(RFs& aFs) |
60 EXPORT_C CImageHandler* CImageHandler::NewL(RFs& aFs, CPodcastModel& aPodcastModel) |
60 { |
61 { |
61 CImageHandler* self = NewLC(aFs); |
62 CImageHandler* self = NewLC(aFs, aPodcastModel); |
62 CleanupStack::Pop(); |
63 CleanupStack::Pop(); |
63 return self; |
64 return self; |
64 } |
65 } |
65 |
66 |
66 // ----------------------------------------------------------------------------- |
67 // ----------------------------------------------------------------------------- |
67 // CImageHandler::NewLC |
68 // CImageHandler::NewLC |
68 // Two-phased constructor. |
69 // Two-phased constructor. |
69 // ----------------------------------------------------------------------------- |
70 // ----------------------------------------------------------------------------- |
70 // |
71 // |
71 EXPORT_C CImageHandler* CImageHandler::NewLC(RFs& aFs) |
72 EXPORT_C CImageHandler* CImageHandler::NewLC(RFs& aFs, CPodcastModel& aPodcastModel) |
72 { |
73 { |
73 CImageHandler* self = new (ELeave) CImageHandler(aFs); |
74 CImageHandler* self = new (ELeave) CImageHandler(aFs, aPodcastModel); |
74 CleanupStack::PushL( self ); |
75 CleanupStack::PushL( self ); |
75 self->ConstructL(); |
76 self->ConstructL(); |
76 |
77 |
77 return self; |
78 return self; |
78 } |
79 } |
200 iSize.SetSize(0,0); |
201 iSize.SetSize(0,0); |
201 } |
202 } |
202 else |
203 else |
203 { |
204 { |
204 // Invoke callback. |
205 // Invoke callback. |
205 iCallback->ImageOperationCompleteL(iStatus.Int(), iHandle); |
206 iCallback->ImageOperationCompleteL(iStatus.Int(), iHandle, iPodcastModel); |
206 if(iCallbackQue.Count()) |
207 if(iCallbackQue.Count()) |
207 { |
208 { |
208 TInt loaderror = KErrNotFound; |
209 TInt loaderror = KErrNotFound; |
209 while(loaderror != KErrNone && iCallbackQue.Count()) |
210 while(loaderror != KErrNone && iCallbackQue.Count()) |
210 { |
211 { |