CUPS API: subscribe event
Michael Sweet
mike at easysw.com
Mon Jun 5 13:13:27 PDT 2006
Rytis wrote:
> Thank you for your response i've made a huge progress thanks to you!
> There were a several errors in your code but i've fixed them (the
> error s are listed in the back of this post if anyone is interested)
> I have few questions though. The first is how do i tell CUPS that i
> have already received job-completed notification? I don't need CUPS
> to remind me forever that job 54 has completed. That i do now is
> after i receive notification i cancel subscription and create a new
> one. I'm not sure that's the proper way any guidance on that? And for
> the second one i'll create a new post :)
Add a notify-sequence-numbers attribute after the
notify-subscription-ids attribute with the last event id + 1, e.g.:
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
"notify-sequence-numbers", last_sequence_number + 1);
However, it looks like the current CUPS release is not including the
notify-sequence-number attribute in the Get-Notifications response,
so right now you'll need to keep track of the number of events
you've received.
I've created STR #1747 to track this problem; it should be fixed in
the next CUPS 1.2 patch release.
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw dot com
Internet Printing and Document Software http://www.easysw.com
More information about the cups-devel
mailing list