diff options
author | Tim Potter <tpot@samba.org> | 2002-05-08 04:26:22 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-05-08 04:26:22 +0000 |
commit | 02c63de9e58f9806e58d3862391e05e9b9cdb8fc (patch) | |
tree | 62f539d63fd5e1269dd4a1197096920a5993a6ae /source/python/py_spoolss_jobs.c | |
parent | 39f58333fa84dc05cac8d13cabb1f203c5cf2c62 (diff) | |
download | samba-02c63de9e58f9806e58d3862391e05e9b9cdb8fc.tar.gz samba-02c63de9e58f9806e58d3862391e05e9b9cdb8fc.tar.xz samba-02c63de9e58f9806e58d3862391e05e9b9cdb8fc.zip |
Added setjob() command.
Diffstat (limited to 'source/python/py_spoolss_jobs.c')
-rw-r--r-- | source/python/py_spoolss_jobs.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/source/python/py_spoolss_jobs.c b/source/python/py_spoolss_jobs.c index e049d82a33a..3e436849b16 100644 --- a/source/python/py_spoolss_jobs.c +++ b/source/python/py_spoolss_jobs.c @@ -84,3 +84,33 @@ PyObject *spoolss_enumjobs(PyObject *self, PyObject *args, PyObject *kw) Py_INCREF(result); return result; } + +/* Set job command */ + +PyObject *spoolss_setjob(PyObject *self, PyObject *args, PyObject *kw) +{ + spoolss_policy_hnd_object *hnd = (spoolss_policy_hnd_object *)self; + WERROR werror; + PyObject *result; + uint32 level = 0, command, jobid; + static char *kwlist[] = {"jobid", "command", "level", NULL}; + + /* Parse parameters */ + + if (!PyArg_ParseTupleAndKeywords(args, kw, "ii|i", kwlist, &jobid, + &command, &level)) + return NULL; + + /* Call rpc function */ + + werror = cli_spoolss_setjob(hnd->cli, hnd->mem_ctx, &hnd->pol, + jobid, level, command); + + if (!W_ERROR_IS_OK(werror)) { + PyErr_SetObject(spoolss_werror, py_werror_tuple(werror)); + return NULL; + } + + Py_INCREF(Py_None); + return Py_None; +} |