|
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: S60 Document class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "imageprintuidocument.h" |
|
20 #include "imageprintuiappui.h" |
|
21 #include "imageprintuidebug.h" |
|
22 |
|
23 #include <e32cmn.h> |
|
24 #include <badesca.h> |
|
25 #include <bautils.h> |
|
26 |
|
27 |
|
28 |
|
29 // ======== MEMBER FUNCTIONS ======== |
|
30 |
|
31 // --------------------------------------------------------------------------- |
|
32 // Default constructor |
|
33 // --------------------------------------------------------------------------- |
|
34 // |
|
35 CImagePrintUiDocument::CImagePrintUiDocument(CEikApplication& aApp) |
|
36 : CAknDocument(aApp) |
|
37 { |
|
38 } |
|
39 |
|
40 // --------------------------------------------------------------------------- |
|
41 // Symbian 2nd phase constructor |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 void CImagePrintUiDocument::ConstructL() |
|
45 { |
|
46 FLOG(_L("[IMAGEPRINTUI]\t CImagePrintUiDocument::ConstructL START")); |
|
47 |
|
48 TRAPD(err, iEngine = CDpsEngine::GetEngineL()); |
|
49 if(err == KErrInUse) |
|
50 { |
|
51 FLOG(_L("[IMAGEPRINTUI]\t CImagePrintUiDocument::ConstructL, already in use")); |
|
52 } |
|
53 |
|
54 FLOG(_L("[IMAGEPRINTUI]\t CImagePrintUiDocument::ConstructL END")); |
|
55 } |
|
56 |
|
57 |
|
58 // --------------------------------------------------------------------------- |
|
59 // |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 CImagePrintUiDocument* CImagePrintUiDocument::NewL( CEikApplication& aApp) |
|
63 { |
|
64 FLOG(_L("[IMAGEPRINTUI]\t CImagePrintUiDocument::NewL()")); |
|
65 CImagePrintUiDocument* self = new (ELeave) CImagePrintUiDocument(aApp); |
|
66 CleanupStack::PushL(self); |
|
67 self->ConstructL(); |
|
68 CleanupStack::Pop(self); |
|
69 |
|
70 FLOG(_L("[IMAGEPRINTUI]\t CImagePrintUiDocument::NewL() complete")); |
|
71 return self; |
|
72 } |
|
73 |
|
74 |
|
75 // --------------------------------------------------------------------------- |
|
76 // Constructs CImagePrintUiAppUi |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 CEikAppUi* CImagePrintUiDocument::CreateAppUiL() |
|
80 { |
|
81 return new (ELeave) CImagePrintUiAppUi; |
|
82 } |
|
83 |
|
84 |
|
85 // --------------------------------------------------------------------------- |
|
86 // Returns an instance of Image Print UI engine |
|
87 // --------------------------------------------------------------------------- |
|
88 // |
|
89 CDpsEngine* CImagePrintUiDocument::Engine() |
|
90 { |
|
91 return iEngine; |
|
92 } |
|
93 |
|
94 |
|
95 // --------------------------------------------------------------------------- |
|
96 // destructor |
|
97 // --------------------------------------------------------------------------- |
|
98 // |
|
99 CImagePrintUiDocument::~CImagePrintUiDocument() |
|
100 { |
|
101 if(iEngine) |
|
102 { |
|
103 iEngine->Delete(); |
|
104 } |
|
105 } |
|
106 |
|
107 |
|
108 |
|
109 //End of File |