2 * FreeRDP: A Remote Desktop Protocol client.
3 * Print Virtual Channel
5 * Copyright 2010-2011 Vic Lee
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #ifndef __PRINTER_MAIN_H
21 #define __PRINTER_MAIN_H
23 #include "rdpdr_types.h"
25 /* SERVER_PRINTER_CACHE_EVENT.cachedata */
26 #define RDPDR_ADD_PRINTER_EVENT 0x00000001
27 #define RDPDR_UPDATE_PRINTER_EVENT 0x00000002
28 #define RDPDR_DELETE_PRINTER_EVENT 0x00000003
29 #define RDPDR_RENAME_PRINTER_EVENT 0x00000004
31 /* DR_PRN_DEVICE_ANNOUNCE.Flags */
32 #define RDPDR_PRINTER_ANNOUNCE_FLAG_ASCII 0x00000001
33 #define RDPDR_PRINTER_ANNOUNCE_FLAG_DEFAULTPRINTER 0x00000002
34 #define RDPDR_PRINTER_ANNOUNCE_FLAG_NETWORKPRINTER 0x00000004
35 #define RDPDR_PRINTER_ANNOUNCE_FLAG_TSPRINTER 0x00000008
36 #define RDPDR_PRINTER_ANNOUNCE_FLAG_XPSFORMAT 0x00000010
38 typedef struct rdp_printer_driver rdpPrinterDriver;
39 typedef struct rdp_printer rdpPrinter;
40 typedef struct rdp_print_job rdpPrintJob;
42 typedef rdpPrinter** (*pcEnumPrinters) (rdpPrinterDriver* driver);
43 typedef rdpPrinter* (*pcGetPrinter) (rdpPrinterDriver* driver, const char* name);
45 struct rdp_printer_driver
47 pcEnumPrinters EnumPrinters;
48 pcGetPrinter GetPrinter;
51 typedef rdpPrintJob* (*pcCreatePrintJob) (rdpPrinter* printer, uint32 id);
52 typedef rdpPrintJob* (*pcFindPrintJob) (rdpPrinter* printer, uint32 id);
53 typedef void (*pcFreePrinter) (rdpPrinter* printer);
62 pcCreatePrintJob CreatePrintJob;
63 pcFindPrintJob FindPrintJob;
67 typedef void (*pcWritePrintJob) (rdpPrintJob* printjob, uint8* data, int size);
68 typedef void (*pcClosePrintJob) (rdpPrintJob* printjob);
75 pcWritePrintJob Write;
76 pcClosePrintJob Close;