Poster of Linux kernelThe best gift for a Linux geek
gspool_ptrmon

gspool_ptrmon

Section: GNUspool Print Manager (3) Updated: 2009-05-18
Local index Up
 

NAME

gspool_ptrmon - set a function to monitor changes to printers  

SYNOPSIS

#include <gspool.h>

int gspool_ptrmon(const int fd, void (*fn)(const int))  

DESCRIPTION

Note that this routine is not available in the Windows version, please see the section on gspool_setmon, which covers both jobs and printers. The gspool_ptrmon() function is used to set the function fn to be called upon notification of any changes to the printers list.

fd is a file descriptor previously returned by gspool_open

fn is a function which must be declared as returning void and taking one "const int" argument. Alternatively, this may be "NULL" to cancel monitoring.

The function fn will be called with fd as an argument upon each change to the printer list.

Please note that any changes to the printer list is reported as the API does not record which printers the user is interested in.  

RETURN VALUES

The function gspool_ptrmon() returns 0 if successful otherwise the error code "GSPOOL_INVALID_FD" if the file descriptor is invalid. Invalid fn parameters will not be detected and the application program will probably crash.  

SEE ALSO

gspool_open(3), gspool_close(3), gspool_joblist(3), gspool_jobmon(3), gspool_ptrlist(3).  

COPYRIGHT

Copyright (c) 2009 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.  

AUTHOR

John M Collins, Xi Software Ltd.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
SEE ALSO
COPYRIGHT
AUTHOR

This document was created by man2html, using the manual pages.
Time: 21:47:33 GMT, April 16, 2011