• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/samba-3.0.25b/source/python/
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#include "python/py_spoolss.h"
22#include "python/py_conv.h"
23
24struct pyconv py_PORT_INFO_1[] = {
25	{ "name", PY_UNISTR, offsetof(PORT_INFO_1, port_name) },
26	{ NULL }
27};
28
29struct 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};
37
38BOOL py_from_PORT_INFO_1(PyObject **dict, PORT_INFO_1 *info)
39{
40	*dict = from_struct(info, py_PORT_INFO_1);
41	return True;
42}
43
44BOOL py_to_PORT_INFO_1(PORT_INFO_1 *info, PyObject *dict)
45{
46	return False;
47}
48
49BOOL py_from_PORT_INFO_2(PyObject **dict, PORT_INFO_2 *info)
50{
51	*dict = from_struct(info, py_PORT_INFO_2);
52	return True;
53}
54
55BOOL py_to_PORT_INFO_2(PORT_INFO_2 *info, PyObject *dict)
56{
57	return False;
58}
59