|
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 #ifndef CIMAGEPRINTENGINE_H |
|
20 #define CIMAGEPRINTENGINE_H |
|
21 |
|
22 #include <e32def.h> |
|
23 #include <badesca.h> |
|
24 |
|
25 class CIFFactory; |
|
26 class CRepository; |
|
27 |
|
28 /** |
|
29 * |
|
30 * The main engine class, creates the factory that initializes the interface |
|
31 * implementations and other instances |
|
32 * |
|
33 */ |
|
34 class CImagePrintEngine |
|
35 : public CBase |
|
36 { |
|
37 public: // Constructors and destructors |
|
38 |
|
39 /** |
|
40 * Two-phase constructor |
|
41 * |
|
42 * @param aImageFiles The printed image files, ownership of the |
|
43 * array is transferred. Can be also NULL at this |
|
44 * stage |
|
45 * @param aIdleObserver Observer to notify UI about idle events |
|
46 * |
|
47 * @return Initialized instance of CImagePrintEngine |
|
48 */ |
|
49 IMPORT_C static CImagePrintEngine* NewL( |
|
50 CDesCArrayFlat* aImageFiles ); |
|
51 IMPORT_C static CImagePrintEngine* NewLC( |
|
52 CDesCArrayFlat* aImageFiles ); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 virtual ~CImagePrintEngine(); |
|
58 |
|
59 protected: // Constructors and destructors |
|
60 |
|
61 /** |
|
62 * Constructor |
|
63 */ |
|
64 CImagePrintEngine(); |
|
65 |
|
66 /** |
|
67 * Second phase constructor |
|
68 * |
|
69 * @param aImageFiles The printed image files, ownership of the |
|
70 * array is transferred |
|
71 * @param aIdleObserver Observer to notify UI about idle events |
|
72 */ |
|
73 void ConstructL( CDesCArrayFlat* aImageFiles ); |
|
74 |
|
75 public: // New methods |
|
76 |
|
77 /** |
|
78 * Returns reference to the interface factory class that |
|
79 * can be used to get the pointers to the concrete implementations |
|
80 * of the mixin-interface classes |
|
81 * |
|
82 * @return Reference to the initialized interface factory |
|
83 */ |
|
84 IMPORT_C CIFFactory& InterfaceFactory(); |
|
85 |
|
86 /** |
|
87 * Sets the new image array. Ownership of the array is transferred |
|
88 * |
|
89 * @param aArray New array |
|
90 */ |
|
91 IMPORT_C void SetImageArrayL( CDesCArrayFlat* aArray ); |
|
92 |
|
93 /** |
|
94 * Returns the array of images |
|
95 * @return array of images |
|
96 */ |
|
97 IMPORT_C RPointerArray<TDesC>& FileArray(); |
|
98 |
|
99 /** |
|
100 * Restarts Image Print engine by deleting and reconstructing it. |
|
101 */ |
|
102 IMPORT_C void RestartEngine(); |
|
103 |
|
104 |
|
105 protected: // New methods |
|
106 |
|
107 /** |
|
108 * Creates new TFileName for file array |
|
109 * @return pointer to new TFileName object |
|
110 */ |
|
111 TFileName* CreateFileNameL(); |
|
112 |
|
113 protected: // Data |
|
114 |
|
115 // Printed image files |
|
116 CDesCArrayFlat* iFiles; |
|
117 |
|
118 // RArray variant of the files for server |
|
119 RPointerArray<TDesC> iFileArray; |
|
120 |
|
121 // Factory |
|
122 CIFFactory* iIFFactory; |
|
123 |
|
124 // A Central Repository session |
|
125 CRepository* iCRSession; |
|
126 }; |
|
127 |
|
128 #endif // CIMAGEPRINTENGINE_H |
|
129 |
|
130 // End of File |