Apply the changes that Derrell Lipman supplied ...
[Samba/gebeck_regimport.git] / source3 / python / py_spoolss_ports_conv.c
blob3f6d94bf7e7d93ecf4476ff47eb62602afe5dc98
1 /*
2 Python wrappers for DCERPC/SMB client routines.
4 Copyright (C) Tim Potter, 2002
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.
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.
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.
21 #include "python/py_spoolss.h"
22 #include "python/py_conv.h"
24 struct pyconv py_PORT_INFO_1[] = {
25 { "name", PY_UNISTR, offsetof(PORT_INFO_1, port_name) },
26 { NULL }
29 struct pyconv py_PORT_INFO_2[] = {
30 { "name", PY_UNISTR, offsetof(PORT_INFO_2, port_name) },
31 { "monitor_name", PY_UNISTR, offsetof(PORT_INFO_2, monitor_name) },
32 { "description", PY_UNISTR, offsetof(PORT_INFO_2, description) },
33 { "reserved", PY_UINT32, offsetof(PORT_INFO_2, reserved) },
34 { "type", PY_UINT32, offsetof(PORT_INFO_2, port_type) },
35 { NULL }
36 };
38 BOOL py_from_PORT_INFO_1(PyObject **dict, PORT_INFO_1 *info)
40 *dict = from_struct(info, py_PORT_INFO_1);
41 return True;
44 BOOL py_to_PORT_INFO_1(PORT_INFO_1 *info, PyObject *dict)
46 return False;
49 BOOL py_from_PORT_INFO_2(PyObject **dict, PORT_INFO_2 *info)
51 *dict = from_struct(info, py_PORT_INFO_2);
52 return True;
55 BOOL py_to_PORT_INFO_2(PORT_INFO_2 *info, PyObject *dict)
57 return False;