[cups.development] ipp_request_t union help
Michael Sweet
mike at easysw.com
Sat Oct 23 07:00:01 PDT 2004
D. Hageman wrote:
>
> I am looking at exposing the IPP functions of CUPS in the Net::CUPS perl
> package that I have put together, but have run into an issue that I need
> some clarification.
>
> How does one know what struct is active in the union of structs in
> ipp_request_t (any, op, status, event)?
>
> Usually a field exists in the struct to indicate which is "active". I
> look at the code a bit and didn't see anything obvious. I am sure I
> just missed it.
It is implied from the context, and in reality the IPP request,
response, and event notification messages are identical except for
the meaning of the second field (operation or status code).
You can just expose the "any" part of the union.
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw dot com
Printing Software for UNIX http://www.easysw.com
More information about the cups-devel
mailing list