1 | /*
|
---|
2 | Python wrappers for DCERPC/SMB client routines.
|
---|
3 |
|
---|
4 | Copyright (C) Tim Potter, 2002
|
---|
5 |
|
---|
6 | This program is free software; you can redistribute it and/or modify
|
---|
7 | it under the terms of the GNU General Public License as published by
|
---|
8 | the Free Software Foundation; either version 2 of the License, or
|
---|
9 | (at your option) any later version.
|
---|
10 |
|
---|
11 | This program is distributed in the hope that it will be useful,
|
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | GNU General Public License for more details.
|
---|
15 |
|
---|
16 | You should have received a copy of the GNU General Public License
|
---|
17 | along with this program; if not, write to the Free Software
|
---|
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
19 | */
|
---|
20 |
|
---|
21 | #ifndef _PY_SPOOLSS_H
|
---|
22 | #define _PY_SPOOLSS_H
|
---|
23 |
|
---|
24 | #include "python/py_common.h"
|
---|
25 |
|
---|
26 | /* Spoolss policy handle object */
|
---|
27 |
|
---|
28 | typedef struct {
|
---|
29 | PyObject_HEAD
|
---|
30 | struct rpc_pipe_client *cli;
|
---|
31 | TALLOC_CTX *mem_ctx;
|
---|
32 | POLICY_HND pol;
|
---|
33 | } spoolss_policy_hnd_object;
|
---|
34 |
|
---|
35 | /* Exceptions raised by this module */
|
---|
36 |
|
---|
37 | extern PyTypeObject spoolss_policy_hnd_type;
|
---|
38 |
|
---|
39 | extern PyObject *spoolss_error, *spoolss_werror;
|
---|
40 |
|
---|
41 | /* The following definitions come from python/py_spoolss_common.c */
|
---|
42 |
|
---|
43 | PyObject *new_spoolss_policy_hnd_object(struct cli_state *cli,
|
---|
44 | TALLOC_CTX *mem_ctx, POLICY_HND *pol);
|
---|
45 |
|
---|
46 | /* The following definitions come from python/py_spoolss_drivers.c */
|
---|
47 |
|
---|
48 | PyObject *spoolss_enumprinterdrivers(PyObject *self, PyObject *args,
|
---|
49 | PyObject *kw);
|
---|
50 | PyObject *spoolss_hnd_getprinterdriver(PyObject *self, PyObject *args,
|
---|
51 | PyObject *kw);
|
---|
52 | PyObject *spoolss_getprinterdriverdir(PyObject *self, PyObject *args,
|
---|
53 | PyObject *kw);
|
---|
54 | PyObject *spoolss_addprinterdriver(PyObject *self, PyObject *args,
|
---|
55 | PyObject *kw);
|
---|
56 | PyObject *spoolss_addprinterdriverex(PyObject *self, PyObject *args,
|
---|
57 | PyObject *kw);
|
---|
58 | PyObject *spoolss_deleteprinterdriver(PyObject *self, PyObject *args,
|
---|
59 | PyObject *kw);
|
---|
60 | PyObject *spoolss_deleteprinterdriverex(PyObject *self, PyObject *args,
|
---|
61 | PyObject *kw);
|
---|
62 |
|
---|
63 | /* The following definitions come from python/py_spoolss_drivers_conv.c */
|
---|
64 |
|
---|
65 | BOOL py_from_DRIVER_INFO_1(PyObject **dict, DRIVER_INFO_1 *info);
|
---|
66 | BOOL py_to_DRIVER_INFO_1(DRIVER_INFO_1 *info, PyObject *dict);
|
---|
67 | BOOL py_from_DRIVER_INFO_2(PyObject **dict, DRIVER_INFO_2 *info);
|
---|
68 | BOOL py_to_DRIVER_INFO_2(DRIVER_INFO_2 *info, PyObject *dict);
|
---|
69 | BOOL py_from_DRIVER_INFO_3(PyObject **dict, DRIVER_INFO_3 *info);
|
---|
70 | BOOL py_to_DRIVER_INFO_3(DRIVER_INFO_3 *info, PyObject *dict,
|
---|
71 | TALLOC_CTX *mem_ctx);
|
---|
72 | BOOL py_from_DRIVER_INFO_6(PyObject **dict, DRIVER_INFO_6 *info);
|
---|
73 | BOOL py_to_DRIVER_INFO_6(DRIVER_INFO_6 *info, PyObject *dict);
|
---|
74 | BOOL py_from_DRIVER_DIRECTORY_1(PyObject **dict, DRIVER_DIRECTORY_1 *info);
|
---|
75 | BOOL py_to_DRIVER_DIRECTORY_1(DRIVER_DIRECTORY_1 *info, PyObject *dict);
|
---|
76 |
|
---|
77 | /* The following definitions come from python/py_spoolss_forms.c */
|
---|
78 |
|
---|
79 | PyObject *spoolss_hnd_addform(PyObject *self, PyObject *args, PyObject *kw);
|
---|
80 | PyObject *spoolss_hnd_getform(PyObject *self, PyObject *args, PyObject *kw);
|
---|
81 | PyObject *spoolss_hnd_setform(PyObject *self, PyObject *args, PyObject *kw);
|
---|
82 | PyObject *spoolss_hnd_deleteform(PyObject *self, PyObject *args, PyObject *kw);
|
---|
83 | PyObject *spoolss_hnd_enumforms(PyObject *self, PyObject *args, PyObject *kw);
|
---|
84 |
|
---|
85 | /* The following definitions come from python/py_spoolss_forms_conv.c */
|
---|
86 |
|
---|
87 | BOOL py_from_FORM_1(PyObject **dict, FORM_1 *form);
|
---|
88 | BOOL py_to_FORM(FORM *form, PyObject *dict);
|
---|
89 |
|
---|
90 | /* The following definitions come from python/py_spoolss_jobs.c */
|
---|
91 |
|
---|
92 | PyObject *spoolss_hnd_enumjobs(PyObject *self, PyObject *args, PyObject *kw);
|
---|
93 | PyObject *spoolss_hnd_setjob(PyObject *self, PyObject *args, PyObject *kw);
|
---|
94 | PyObject *spoolss_hnd_getjob(PyObject *self, PyObject *args, PyObject *kw);
|
---|
95 | PyObject *spoolss_hnd_startpageprinter(PyObject *self, PyObject *args, PyObject *kw);
|
---|
96 | PyObject *spoolss_hnd_endpageprinter(PyObject *self, PyObject *args, PyObject *kw);
|
---|
97 | PyObject *spoolss_hnd_startdocprinter(PyObject *self, PyObject *args, PyObject *kw);
|
---|
98 | PyObject *spoolss_hnd_enddocprinter(PyObject *self, PyObject *args, PyObject *kw);
|
---|
99 | PyObject *spoolss_hnd_writeprinter(PyObject *self, PyObject *args, PyObject *kw);
|
---|
100 | PyObject *spoolss_hnd_addjob(PyObject *self, PyObject *args, PyObject *kw);
|
---|
101 |
|
---|
102 | /* The following definitions come from python/py_spoolss_jobs_conv.c */
|
---|
103 |
|
---|
104 | BOOL py_from_JOB_INFO_1(PyObject **dict, JOB_INFO_1 *info);
|
---|
105 | BOOL py_to_JOB_INFO_1(JOB_INFO_1 *info, PyObject *dict);
|
---|
106 | BOOL py_from_JOB_INFO_2(PyObject **dict, JOB_INFO_2 *info);
|
---|
107 | BOOL py_to_JOB_INFO_2(JOB_INFO_2 *info, PyObject *dict);
|
---|
108 | BOOL py_from_DOC_INFO_1(PyObject **dict, DOC_INFO_1 *info);
|
---|
109 | BOOL py_to_DOC_INFO_1(DOC_INFO_1 *info, PyObject *dict);
|
---|
110 |
|
---|
111 | /* The following definitions come from python/py_spoolss_ports.c */
|
---|
112 |
|
---|
113 | PyObject *spoolss_enumports(PyObject *self, PyObject *args, PyObject *kw);
|
---|
114 |
|
---|
115 | /* The following definitions come from python/py_spoolss_ports_conv.c */
|
---|
116 |
|
---|
117 | BOOL py_from_PORT_INFO_1(PyObject **dict, PORT_INFO_1 *info);
|
---|
118 | BOOL py_to_PORT_INFO_1(PORT_INFO_1 *info, PyObject *dict);
|
---|
119 | BOOL py_from_PORT_INFO_2(PyObject **dict, PORT_INFO_2 *info);
|
---|
120 | BOOL py_to_PORT_INFO_2(PORT_INFO_2 *info, PyObject *dict);
|
---|
121 |
|
---|
122 | /* The following definitions come from python/py_spoolss_printerdata.c */
|
---|
123 |
|
---|
124 | PyObject *spoolss_hnd_getprinterdata(PyObject *self, PyObject *args, PyObject *kw);
|
---|
125 | PyObject *spoolss_hnd_setprinterdata(PyObject *self, PyObject *args, PyObject *kw);
|
---|
126 | PyObject *spoolss_hnd_enumprinterdata(PyObject *self, PyObject *args, PyObject *kw);
|
---|
127 | PyObject *spoolss_hnd_deleteprinterdata(PyObject *self, PyObject *args, PyObject *kw);
|
---|
128 | PyObject *spoolss_hnd_getprinterdataex(PyObject *self, PyObject *args, PyObject *kw);
|
---|
129 | PyObject *spoolss_hnd_setprinterdataex(PyObject *self, PyObject *args, PyObject *kw);
|
---|
130 | PyObject *spoolss_hnd_enumprinterdataex(PyObject *self, PyObject *args, PyObject *kw);
|
---|
131 | PyObject *spoolss_hnd_deleteprinterdataex(PyObject *self, PyObject *args, PyObject *kw);
|
---|
132 | PyObject *spoolss_hnd_enumprinterkey(PyObject *self, PyObject *args,
|
---|
133 | PyObject *kw);
|
---|
134 | PyObject *spoolss_hnd_deleteprinterkey(PyObject *self, PyObject *args,
|
---|
135 | PyObject *kw);
|
---|
136 |
|
---|
137 | /* The following definitions come from python/py_spoolss_printers.c */
|
---|
138 |
|
---|
139 | PyObject *spoolss_openprinter(PyObject *self, PyObject *args, PyObject *kw);
|
---|
140 | PyObject *spoolss_closeprinter(PyObject *self, PyObject *args);
|
---|
141 | PyObject *spoolss_hnd_getprinter(PyObject *self, PyObject *args, PyObject *kw);
|
---|
142 | PyObject *spoolss_hnd_setprinter(PyObject *self, PyObject *args, PyObject *kw);
|
---|
143 | PyObject *spoolss_enumprinters(PyObject *self, PyObject *args, PyObject *kw);
|
---|
144 | PyObject *spoolss_addprinterex(PyObject *self, PyObject *args, PyObject *kw);
|
---|
145 |
|
---|
146 | /* The following definitions come from python/py_spoolss_printers_conv.c */
|
---|
147 |
|
---|
148 | BOOL py_from_DEVICEMODE(PyObject **dict, DEVICEMODE *devmode);
|
---|
149 | BOOL py_to_DEVICEMODE(DEVICEMODE *devmode, PyObject *dict);
|
---|
150 | BOOL py_from_PRINTER_INFO_0(PyObject **dict, PRINTER_INFO_0 *info);
|
---|
151 | BOOL py_to_PRINTER_INFO_0(PRINTER_INFO_0 *info, PyObject *dict);
|
---|
152 | BOOL py_from_PRINTER_INFO_1(PyObject **dict, PRINTER_INFO_1 *info);
|
---|
153 | BOOL py_to_PRINTER_INFO_1(PRINTER_INFO_1 *info, PyObject *dict);
|
---|
154 | BOOL py_from_PRINTER_INFO_2(PyObject **dict, PRINTER_INFO_2 *info);
|
---|
155 | BOOL py_to_PRINTER_INFO_2(PRINTER_INFO_2 *info, PyObject *dict,
|
---|
156 | TALLOC_CTX *mem_ctx);
|
---|
157 | BOOL py_from_PRINTER_INFO_3(PyObject **dict, PRINTER_INFO_3 *info);
|
---|
158 | BOOL py_to_PRINTER_INFO_3(PRINTER_INFO_3 *info, PyObject *dict,
|
---|
159 | TALLOC_CTX *mem_ctx);
|
---|
160 |
|
---|
161 | #endif /* _PY_SPOOLSS_H */
|
---|