1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*++
Copyright (c) 2005 Microsoft Corporation
All rights reserved.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
File Name:
bkdmptcnv.h
Abstract:
Booklet/Binding devmode <-> PrintTicket conversion class definition. The class
defines a common data representation between the DevMode (GPD) and PrintTicket
representations and implements the conversion and validation methods required
by CFeatureDMPTConvert.
--*/
#pragma once
#include "ftrdmptcnv.h"
#include "bkpthndlr.h"
//
// The PT handling code defines a single BindingData structure that covers both
// JobBindAllDocuments and DocumentBinding to avoid conflicts. The GPD however
// controls both so we re-use the BindingData structure to handle both in
// the DevMode
//
struct BookletSettings
{
XDPrintSchema::Binding::BindingData settings[XDPrintSchema::Binding::EBindingMax];
};
class CBookletDMPTConv : public CFeatureDMPTConvert<BookletSettings>
{
public:
CBookletDMPTConv();
~CBookletDMPTConv();
private:
HRESULT
GetPTDataSettingsFromDM(
_In_ PDEVMODE pDevmode,
_In_ ULONG cbDevmode,
_In_ PVOID pPrivateDevmode,
_In_ ULONG cbDrvPrivateSize,
_Out_ BookletSettings* pDataSettings
);
HRESULT
MergePTDataSettingsWithPT(
_In_ IXMLDOMDocument2* pPrintTicket,
_Inout_ BookletSettings* pDrvSettings
);
HRESULT
SetPTDataInDM(
_In_ CONST BookletSettings& drvSettings,
_Inout_ PDEVMODE pDevmode,
_In_ ULONG cbDevmode,
_Inout_ PVOID pPrivateDevmode,
_In_ ULONG cbDrvPrivateSize
);
HRESULT
SetPTDataInPT(
_In_ CONST BookletSettings& drvSettings,
_Inout_ IXMLDOMDocument2* pPrintTicket
);
HRESULT STDMETHODCALLTYPE
CompletePrintCapabilities(
_In_opt_ IXMLDOMDocument2* pPrintTicket,
_Inout_ IXMLDOMDocument2* pPrintCapabilities
);
};
|