15
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd.
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "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 |
* Kanrikogaku Kenkyusho, Ltd. - Initial contribution
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* Test print band ECOM plugin
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
// Protection against nested includes
|
|
20 |
#ifndef DIRECTPRINTBAND_H
|
|
21 |
#define DIRECTPRINTBAND_H
|
|
22 |
|
|
23 |
// System includes
|
|
24 |
#include <e32std.h>
|
|
25 |
#include <e32base.h>
|
|
26 |
#include <gdi.h>
|
|
27 |
#include <ecom/ecom.h>
|
|
28 |
|
|
29 |
// Forward declarations
|
|
30 |
class CDirectPrintBand;
|
|
31 |
class CPrintSetup;
|
|
32 |
class RXmlEngDocument;
|
|
33 |
class MPageRegionPrinter;
|
|
34 |
|
|
35 |
// CLASS DECLARATION
|
|
36 |
|
|
37 |
/**
|
|
38 |
* CDirectPrintBand
|
|
39 |
*
|
|
40 |
*/
|
|
41 |
class CDirectPrintBand : public CBase
|
|
42 |
{
|
|
43 |
public:
|
|
44 |
inline static CDirectPrintBand* NewL(TUid aImplementationUid);
|
|
45 |
virtual ~CDirectPrintBand();
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Initialize the print band
|
|
49 |
*
|
|
50 |
* @param aPrintSetup Pointer to the CPrintSetup
|
|
51 |
* @param aParam Xml parameter object
|
|
52 |
* @param aFileName Sets the file name if define the file name to xml,
|
|
53 |
* Not set if not define the file name to xml
|
|
54 |
*/
|
|
55 |
virtual void InitPrintBandL(CPrintSetup* aPrintSetup,
|
|
56 |
RXmlEngDocument* aParam,
|
|
57 |
const TDesC& aFileName) = 0;
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Return the print band object
|
|
61 |
*
|
|
62 |
* @return MPageRegionPrinter* Pointer to the print band object
|
|
63 |
*/
|
|
64 |
virtual MPageRegionPrinter* RegionPrinter() = 0;
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Return the total page number
|
|
68 |
*
|
|
69 |
* @return TInt the total page number
|
|
70 |
*/
|
|
71 |
virtual TInt PageNum() = 0;
|
|
72 |
|
|
73 |
public:
|
|
74 |
TUid iDtorIdKey;
|
|
75 |
};
|
|
76 |
|
|
77 |
inline CDirectPrintBand* CDirectPrintBand::NewL(TUid aImplementationUid)
|
|
78 |
{ // static
|
|
79 |
TAny* any = REComSession::CreateImplementationL(aImplementationUid,
|
|
80 |
_FOFF(CDirectPrintBand, iDtorIdKey));
|
|
81 |
CDirectPrintBand* plugin = reinterpret_cast<CDirectPrintBand*>(any);
|
|
82 |
return plugin;
|
|
83 |
}
|
|
84 |
|
|
85 |
inline CDirectPrintBand::~CDirectPrintBand()
|
|
86 |
{
|
|
87 |
REComSession::DestroyedImplementation(iDtorIdKey);
|
|
88 |
}
|
|
89 |
|
|
90 |
#endif // DIRECTPRINTBAND_H
|
|
91 |
// End of file
|