From d8b60d56fb961639e0d79c751c619badecadce8e Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 14 May 2002 07:13:25 +0000 Subject: Added deleteprinterdata function. Stub for deleteprinterdataex. (This used to be commit 14acdbf06dec517a4f2fee5904cae1c0b72a90aa) --- source3/python/py_spoolss_printerdata.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source3/python') diff --git a/source3/python/py_spoolss_printerdata.c b/source3/python/py_spoolss_printerdata.c index 352252f2bd..c22eaa2239 100644 --- a/source3/python/py_spoolss_printerdata.c +++ b/source3/python/py_spoolss_printerdata.c @@ -198,3 +198,33 @@ PyObject *spoolss_enumprinterdata(PyObject *self, PyObject *args, PyObject *kw) return result; } + +PyObject *spoolss_deleteprinterdata(PyObject *self, PyObject *args, PyObject *kw) +{ + spoolss_policy_hnd_object *hnd = (spoolss_policy_hnd_object *)self; + static char *kwlist[] = { "value", NULL }; + char *value; + WERROR werror; + + /* Parse parameters */ + + if (!PyArg_ParseTupleAndKeywords(args, kw, "s", kwlist, &value)) + return NULL; + + /* Call rpc function */ + + werror = cli_spoolss_deleteprinterdata( + hnd->cli, hnd->mem_ctx, &hnd->pol, value); + + if (!W_ERROR_IS_OK(werror)) { + PyErr_SetObject(spoolss_werror, py_werror_tuple(werror)); + return NULL; + } + + Py_INCREF(Py_None); + return Py_None; +} + +PyObject *spoolss_deleteprinterdataex(PyObject *self, PyObject *args, PyObject *kw) +{ +} -- cgit