diff options
author | Tim Potter <tpot@samba.org> | 2002-09-03 01:10:21 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-09-03 01:10:21 +0000 |
commit | 2a18e89da74c9b4e352e41ca5fe261f332018f85 (patch) | |
tree | d14daf7dbf3e4114d23a35cb6a417b1760dd13b9 /source3 | |
parent | 611f9c899dceb912a27a20e74a5bb22809999286 (diff) | |
download | samba-2a18e89da74c9b4e352e41ca5fe261f332018f85.tar.gz samba-2a18e89da74c9b4e352e41ca5fe261f332018f85.tar.bz2 samba-2a18e89da74c9b4e352e41ca5fe261f332018f85.zip |
Implement deleteprinterdataex
(This used to be commit a89fe79e222b36eda123ccdbca96badb7714776e)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/python/py_spoolss_printerdata.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/source3/python/py_spoolss_printerdata.c b/source3/python/py_spoolss_printerdata.c index 7f2c0bfe88..0c62baab72 100644 --- a/source3/python/py_spoolss_printerdata.c +++ b/source3/python/py_spoolss_printerdata.c @@ -358,6 +358,26 @@ PyObject *spoolss_hnd_enumprinterdataex(PyObject *self, PyObject *args, PyObject PyObject *spoolss_hnd_deleteprinterdataex(PyObject *self, PyObject *args, PyObject *kw) { - PyErr_SetString(spoolss_error, "Not implemented"); - return NULL; + spoolss_policy_hnd_object *hnd = (spoolss_policy_hnd_object *)self; + static char *kwlist[] = { "key", "value", NULL }; + char *key, *value; + WERROR werror; + + /* Parse parameters */ + + if (!PyArg_ParseTupleAndKeywords(args, kw, "ss", kwlist, &key, &value)) + return NULL; + + /* Call rpc function */ + + werror = cli_spoolss_deleteprinterdataex( + hnd->cli, hnd->mem_ctx, &hnd->pol, key, value); + + if (!W_ERROR_IS_OK(werror)) { + PyErr_SetObject(spoolss_werror, py_werror_tuple(werror)); + return NULL; + } + + Py_INCREF(Py_None); + return Py_None; } |