1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MEMSPYEXPORTBITMAPSTOMEMORYCARDDIALOG_H |
|
19 #define MEMSPYEXPORTBITMAPSTOMEMORYCARDDIALOG_H |
|
20 |
|
21 // System includes |
|
22 #include <AknProgressDialog.h> |
|
23 #include <AknWaitDialog.h> |
|
24 #include <imageconversion.h> |
|
25 |
|
26 // Classes referenced |
|
27 class CMemSpyEngineFbServBitmap; |
|
28 class CMemSpyEngineFbServBitmapArray; |
|
29 |
|
30 |
|
31 |
|
32 class CMemSpyExportBitmapsToMemoryCardDialog : public CActive, public MProgressDialogCallback |
|
33 { |
|
34 public: |
|
35 static CMemSpyExportBitmapsToMemoryCardDialog* NewL( RFs& aFsSession, const CMemSpyEngineFbServBitmapArray& aBitmaps ); |
|
36 ~CMemSpyExportBitmapsToMemoryCardDialog(); |
|
37 |
|
38 private: |
|
39 CMemSpyExportBitmapsToMemoryCardDialog( RFs& aFsSession, const CMemSpyEngineFbServBitmapArray& aBitmaps ); |
|
40 void ConstructL(); |
|
41 |
|
42 public: // API |
|
43 void Cancel(); |
|
44 static TBool CheckMemoryCardAvailableL( RFs& aFsSession ); |
|
45 |
|
46 private: // From CActive |
|
47 void RunL(); |
|
48 void DoCancel(); |
|
49 TInt RunError(TInt aError); |
|
50 |
|
51 private: // From MProgressDialogCallback |
|
52 void DialogDismissedL( TInt aButtonId ); |
|
53 |
|
54 private: // Internal methods |
|
55 void CompleteSelf( TInt aError ); |
|
56 void ExportBitmapL( const CMemSpyEngineFbServBitmap& aBitmap ); |
|
57 void IdentifyBmpMimeTypeL(); |
|
58 void PruneExistingBitmapFilesL(); |
|
59 void PrepareFolderNameSpecL(); |
|
60 TBool TryToExportSingleBitmapL(); |
|
61 |
|
62 private: // Member data |
|
63 RFs& iFsSession; |
|
64 const CMemSpyEngineFbServBitmapArray& iBitmaps; |
|
65 TInt iBitmapIndex; |
|
66 TBool iDialogDismissed; |
|
67 CEikProgressInfo* iProgressInfo; |
|
68 CAknProgressDialog* iProgressDialog; |
|
69 CImageEncoder* iEncoder; |
|
70 HBufC8* iBmpMimeType; |
|
71 HBufC* iFolderName; |
|
72 RFileExtensionMIMETypeArray iMimeTypeArray; |
|
73 }; |
|
74 |
|
75 |
|
76 #endif |
|