FreeRDP
Loading...
Searching...
No Matches
include/freerdp/client/printer.h
1
23#ifndef FREERDP_CHANNEL_PRINTER_CLIENT_PRINTER_H
24#define FREERDP_CHANNEL_PRINTER_CLIENT_PRINTER_H
25
26#include <freerdp/channels/rdpdr.h>
27
28#ifdef __cplusplus
29extern "C"
30{
31#endif
32
33 typedef struct rdp_printer_driver rdpPrinterDriver;
34 typedef struct rdp_printer rdpPrinter;
35 typedef struct rdp_print_job rdpPrintJob;
36
37 typedef void (*pcSetDeviceForPrinterDriver)(rdpPrinterDriver* driver,
38 const RDPDR_PRINTER* device);
39 typedef void (*pcReferencePrinterDriver)(rdpPrinterDriver* driver);
40 typedef rdpPrinter** (*pcEnumPrinters)(rdpPrinterDriver* driver);
41 typedef void (*pcReleaseEnumPrinters)(rdpPrinter** printers);
42
43 typedef rdpPrinter* (*pcGetPrinter)(rdpPrinterDriver* driver, const char* name,
44 const char* driverName, BOOL isDefault);
45 typedef void (*pcReferencePrinter)(rdpPrinter* printer);
46
48 {
49 ALIGN64 WINPR_ATTR_NODISCARD pcEnumPrinters EnumPrinters;
50 ALIGN64 pcReleaseEnumPrinters ReleaseEnumPrinters;
51 ALIGN64 WINPR_ATTR_NODISCARD pcGetPrinter GetPrinter;
52
53 ALIGN64 pcReferencePrinterDriver AddRef;
54 ALIGN64 pcReferencePrinterDriver ReleaseRef;
55
59 ALIGN64 pcSetDeviceForPrinterDriver SetDeviceContext;
60
61 UINT64 reserved[58];
62 };
63
64 typedef rdpPrintJob* (*pcCreatePrintJob)(rdpPrinter* printer, UINT32 id);
65 typedef rdpPrintJob* (*pcFindPrintJob)(rdpPrinter* printer, UINT32 id);
66
68 {
69 ALIGN64 size_t id;
70 ALIGN64 char* name;
71 ALIGN64 char* driver;
72 ALIGN64 BOOL is_default;
73
74 ALIGN64 size_t references;
75 ALIGN64 rdpPrinterDriver* backend;
76 ALIGN64 WINPR_ATTR_NODISCARD pcCreatePrintJob CreatePrintJob;
77 ALIGN64 WINPR_ATTR_NODISCARD pcFindPrintJob FindPrintJob;
78 ALIGN64 pcReferencePrinter AddRef;
79 ALIGN64 pcReferencePrinter ReleaseRef;
80 UINT64 reserved[54];
81 };
82
83 typedef UINT (*pcWritePrintJob)(rdpPrintJob* printjob, const BYTE* data, size_t size);
84 typedef void (*pcClosePrintJob)(rdpPrintJob* printjob);
85
87 {
88 ALIGN64 UINT32 id;
89 ALIGN64 rdpPrinter* printer;
90
91 ALIGN64 WINPR_ATTR_NODISCARD pcWritePrintJob Write;
92 ALIGN64 pcClosePrintJob Close;
93
94 UINT64 reserved[60];
95 };
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif /* FREERDP_CHANNEL_PRINTER_CLIENT_PRINTER_H */
ALIGN64 pcSetDeviceForPrinterDriver SetDeviceContext
Function allowing to set a context for a backend.