1 /* |
|
2 * Copyright (c) 2004-2007 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 |
|
19 #include "cimageprintdoc.h" |
|
20 #include "cimageprintappui.h" |
|
21 #include "cimageprintengine.h" |
|
22 #include "ciffactory.h" |
|
23 |
|
24 CImagePrintDoc::CImagePrintDoc( |
|
25 CEikApplication& aApp ) |
|
26 : CAknDocument(aApp) |
|
27 { |
|
28 } |
|
29 |
|
30 // DESTRUCTION |
|
31 CImagePrintDoc::~CImagePrintDoc() |
|
32 { |
|
33 delete iEngine; |
|
34 } |
|
35 |
|
36 // default constructor |
|
37 void CImagePrintDoc::InitializeEngineL() |
|
38 { |
|
39 iEngine = CImagePrintEngine::NewL( 0 ); |
|
40 } |
|
41 |
|
42 // Two-phased constructor. |
|
43 CImagePrintDoc* CImagePrintDoc::NewL( |
|
44 CEikApplication& aApp ) |
|
45 { |
|
46 CImagePrintDoc* self = new (ELeave) CImagePrintDoc( aApp ); |
|
47 return self; |
|
48 } |
|
49 |
|
50 // METHODS |
|
51 |
|
52 //Creates AppUi class for application |
|
53 CEikAppUi* CImagePrintDoc::CreateAppUiL() |
|
54 { |
|
55 return new (ELeave) CImagePrintAppUi; |
|
56 } |
|
57 |
|
58 // Returns pointer to engine |
|
59 CImagePrintEngine* CImagePrintDoc::Engine() |
|
60 { |
|
61 return iEngine; |
|
62 } |
|
63 |
|
64 // Returns discovery interface |
|
65 MDiscovery* CImagePrintDoc::Discovery() |
|
66 { |
|
67 return iEngine->InterfaceFactory().DiscoveryIF(); |
|
68 } |
|
69 |
|
70 // Returns print job interface |
|
71 MPrintJob* CImagePrintDoc::PrintJob() |
|
72 { |
|
73 return iEngine->InterfaceFactory().PrintJobIF(); |
|
74 } |
|
75 |
|
76 |
|
77 // Returns print settings interface |
|
78 MPrintSettings* CImagePrintDoc::PrintSettings() |
|
79 { |
|
80 return iEngine->InterfaceFactory().SettingsIF(); |
|
81 } |
|
82 |
|
83 // Set selected images to engine. |
|
84 void CImagePrintDoc::SetImageArrayL( |
|
85 CDesCArrayFlat* aArray ) |
|
86 { |
|
87 iEngine->SetImageArrayL( aArray ); |
|
88 } |
|
89 |
|
90 // Restarts Image Print engine |
|
91 void CImagePrintDoc::RestartEngine() |
|
92 { |
|
93 iEngine->RestartEngine(); |
|
94 } |
|
95 |
|
96 // End of File |
|