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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
/*++
Copyright (c) 2005 Microsoft Corporation
All rights reserved.
File Name:
pthndlr.h
Abstract:
Base PrintTicket handler class definition. This class provides common
PrintTicket handling functionality for any filter that requires print
ticket handling. A filter can from this class to get feature unspecific
XML handling functionality.
--*/
#pragma once
#include "schema.h"
#include "pshndlr.h"
class CPTHandler : public CPSHandler
{
public:
//
// Constructors and destructors
//
CPTHandler(
_In_ IXMLDOMDocument2 *pPrintTicket
);
virtual ~CPTHandler();
public:
HRESULT
DeleteFeature(
_In_z_ BSTR bstrFeature
);
HRESULT
DeleteProperty(
_In_z_ BSTR bstrProperty
);
protected:
HRESULT
QueryNodeOption(
_In_z_ BSTR bstrQuery,
_Outptr_result_maybenull_z_ BSTR* pbstrOption
);
HRESULT
FeaturePresent(
_In_z_ BSTR bstrFeature,
_Outptr_opt_ IXMLDOMNode** ppFeatureNode = NULL
);
HRESULT
GetFeatureOption(
_In_z_ BSTR bstrFeature,
_Outptr_result_maybenull_z_ BSTR* pbstrOption
);
HRESULT
GetSubFeatureOption(
_In_z_ BSTR bstrParentFeature,
_In_z_ BSTR bstrFeature,
_Outptr_result_maybenull_z_ BSTR* pbstrOption
);
HRESULT
GetScoredPropertyValue(
_In_z_ BSTR bstrParentFeature,
_In_z_ BSTR bstrProperty,
_Outptr_result_maybenull_ BSTR* pbstrValue
);
HRESULT
GetScoredPropertyValue(
_In_z_ BSTR bstrParentFeature,
_In_z_ BSTR bstrProperty,
_Out_ INT* pValue
);
HRESULT
GetScoredPropertyValue(
_In_z_ BSTR bstrParentFeature,
_In_z_ BSTR bstrProperty,
_Out_ REAL* pValue
);
HRESULT
SetFeatureOption(
_In_z_ BSTR bstrFeature,
_In_z_ BSTR bstrOption
);
HRESULT
SetSubFeatureOption(
_In_z_ BSTR bstrParentFeature,
_In_z_ BSTR bstrFeature,
_In_z_ BSTR bstrOption
);
HRESULT
SetPropertyAsValue(
_In_z_ BSTR bstrFeature,
_In_z_ BSTR bstrProperty,
_In_z_ BSTR bstrValue
);
HRESULT
SetPropertyAsParameterRef(
_In_z_ BSTR bstrFeature,
_In_z_ BSTR bstrProperty,
_In_z_ BSTR bstrParameterRef,
_In_z_ BSTR bstrValue
);
HRESULT
CreateParamRefInitPair(
_In_ CONST BSTR bstrParam,
_In_ CONST BSTR bstrType,
_In_ CONST BSTR bstrValue,
_Outptr_ IXMLDOMElement** ppParamRef,
_Outptr_ IXMLDOMElement** ppParamInit
);
HRESULT
CreateParamRefInitPair(
_In_ CONST BSTR bstrParam,
_In_ CONST INT intValue,
_Outptr_ IXMLDOMElement** ppParamRef,
_Outptr_ IXMLDOMElement** ppParamInit
);
HRESULT
CreateFeatureOptionPair(
_In_ CONST BSTR bstrFeatureName,
_Outptr_ IXMLDOMElement** ppFeatureElement,
_Outptr_ IXMLDOMElement** ppOptionElement
);
HRESULT
CreateFeatureOptionPair(
_In_ CONST BSTR bstrFeatureName,
_In_ CONST BSTR bstrOptionName,
_Outptr_ IXMLDOMElement** ppFeatureElement,
_Outptr_ IXMLDOMElement** ppOptionElement
);
HRESULT
AppendToElement(
_In_ CONST BSTR bstrElementName,
_In_ IXMLDOMNode* pAppendNode
);
private:
HRESULT
StripKeywordNamespace(
_Inout_ BSTR* pbstrValue
);
HRESULT
DeleteNodeList(
_Inout_ IXMLDOMNodeList* pNodeList
);
HRESULT
DeleteParamInitOrphans(
_In_ IXMLDOMNodeList* pRefList,
_Inout_ IXMLDOMNodeList* pInitList
);
};
|