new method setServer()

Asked by hauki

Hi,
for monitoring purposes of different CUPS-servers a method setServer() proved to be quite useful for me.
The patch for it against version 2.7.10 is attached inline below.
I'd be grateful if you could incorporate into the mainstream version so that in future I don't have to patch it again.
Thank you very much.

Christof

--- hplip-2.7.10/prnt/cupsext/cupsext.c 2007-09-26 23:45:19.000000000 +0200
+++ hplip-2.7.10/prnt/cupsext/cupsext.c.new 2007-12-13 19:00:27.000000000 +0100
@@ -1014,6 +1014,14 @@
     return Py_BuildValue( "s", cupsServer() );
 }

+PyObject * setServer( PyObject * self, PyObject * args )
+{
+ char *Server=NULL;
+ PyArg_ParseTuple(args,"z",&Server);
+ cupsSetServer(Server);
+ return Py_BuildValue( "" );
+}
+

 // ***************************************************************************************************

@@ -1755,6 +1763,7 @@
         { "cancelJob", ( PyCFunction ) cancelJob, METH_VARARGS },
         { "getJobs", ( PyCFunction ) getJobs, METH_VARARGS },
         { "getServer", ( PyCFunction ) getServer, METH_VARARGS },
+ { "setServer", ( PyCFunction ) setServer, METH_VARARGS },
         { "addOption", ( PyCFunction ) addOption, METH_VARARGS },
         { "removeOption", ( PyCFunction ) removeOption, METH_VARARGS },
         { "resetOptions", ( PyCFunction ) resetOptions, METH_VARARGS },

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
dwelch91
Solved:
Last query:
Last reply:
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#1

I'll have an engineer look at this. If you don't mind what project are you working on?

Thanks!

A

Revision history for this message
hauki (hanke) said :
#2

Aaron Albright wrote:
> Your question #19981 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/19981
>
> Status: Open => Needs information
>
> Aaron Albright requested for more information:
> I'll have an engineer look at this. If you don't mind what project are
> you working on?
>
OK, thanks for the quick answer.
I'm just displaying the status of our printers on a plone-site.

Christof

Revision history for this message
Best dwelch91 (dwelch91) said :
#3

Patch applied. Will be in HPLIP 2.7.12.

-Don

On Dec 13, 2007 10:24 AM, hauki <email address hidden> wrote:

> Question #19981 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/19981
>
> Status: Needs information => Open
>
> hauki gave more information on the question:
> Aaron Albright wrote:
> > Your question #19981 on HPLIP changed:
> > https://answers.launchpad.net/hplip/+question/19981
> >
> > Status: Open => Needs information
> >
> > Aaron Albright requested for more information:
> > I'll have an engineer look at this. If you don't mind what project are
> > you working on?
> >
> OK, thanks for the quick answer.
> I'm just displaying the status of our printers on a plone-site.
>
> Christof
>
> --
> You received this question notification because you are a member of HP
> Linux Imaging and Printing, which is an answer contact for HPLIP.
>

Revision history for this message
hauki (hanke) said :
#4

Great.

T/Christof