=head1 NAME

gspool_ptrmon - set a function to monitor changes to printers

=head1 SYNOPSIS

=for man
\&\fB#include <gspool.h>\fR
.PP

=for html
<STRONG>#include &lt;gspool.h&gt;</STRONG>
<br>

B<int gspool_ptrmon(const int>
I<fd>B<, void (*>I<fn>B<)(const int))>

=head1 DESCRIPTION

=for html
<P>Note that this routine is not available in the Windows
version, please see <a href="#Xt_setmon_def">the section on
gspool_setmon</a> which covers both jobs and printers.</P>

=for man
Note that this routine is not available in the Windows version, please
see the section on \fBgspool_setmon\fR, which covers both jobs and
printers.

The B<gspool_ptrmon()> function is used to set the function I<fn> to be
called upon notification of any changes to the printers list.

I<fd> is a file descriptor previously returned by B<gspool_open>

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

The function I<fn> will be called with I<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.

=head1 RETURN VALUES

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

=head1 SEE ALSO

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

=head1 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.

=head1 AUTHOR

John M Collins, Xi Software Ltd.

=cut

## Local Variables:
## mode: nroff
## End:
