logo       

Re: ipp_request_t union help: msg#00027

printing.cups.devel

Subject: Re: ipp_request_t union help

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise