using with header files

Tournie tourney.email at yahoo.com
Mon Mar 26 15:15:58 PDT 2012


Thanks Michael,

this helps.  But I feel like I am going back to square 1 again.  I'll use httpConnect() but then what?  I assume ippNew() or ippNewRequest() would come next, so I looked at ipptool.c for examples.  There is a variable declared of type 'ipp_t *'  As soon as I have one of these and I try and fill in the request.op.operation_id field I need ipp-private.h for the definition of the _ipp_s struct.  All ipp.h has is typedef struct _ipp_s ipp_t; so that's why I need the ipp-private.h, no?


Thanks,

Tournie


> Tournie,
>
> On Mar 26, 2012, at 2:05 PM, Tournie wrote:
> > ...
> > want to find out about its jobs, send jobs to it, cancel jobs if necessary, etc.  When do I need to use ippNew().  What about httpConnect()?  Is there a page that explains this or gives an example?  http://www.cups.org/doc-1.1/spm.html is in the right direction....
>
> and is wholly out-of-date...
>
> Try the following:
>
> 	http://www.cups.org/documentation.php/doc-1.6/api-httpipp.html
>
> What you want is:
>
> 	http_t *http = httpConnect(hostname, port);
>
> 	/* or httpConnectEncrypt, if the printer supports SSL or TLS */
>
> and then the example code you see in the above link.
>
>
> >
> >
> >
> >> The documentation here will provide what you want for CUPS 1.5 and earlier:
> >>
> >> 	http://www.cups.org/documentation.php/api-httpipp.html
> >>
> >> It has not (yet) been updated for CUPS 1.6 and its new data accessor APIs.
> >>
> >>
> >> On Mar 26, 2012, at 11:49 AM, Tournie wrote:
> >>
> >>> Thanks,
> >>>
> >>> I guess what would be helpful is an example of how to do something basic, like query the server for its active jobs.  I had assumed I would make variables of type 'ipp_t *' and 'http_t *' and call ippNew(), fill out the resulting fields of the 'ipp_t *' variable, kind of like this:
> >>>
> >>> ipp_t * pIpp;
> >>>
> >>> pIpp = ippNew();
> >>> pIpp->request.op.operation_id = IPP_GET_JOBS;
> >>> ..
> >>> ..
> >>> ..
> >>>
> >>> but I'm certainly welcome to suggestions.
> >>>
> >>>
> >>> -T
> >>>
> >>>
> >>>> Tournie,
> >>>>
> >>>> You need the following header files:
> >>>>
> >>>> array.h
> >>>> cups.h
> >>>> dir.h
> >>>> file.h
> >>>> http.h
> >>>> ipp.h
> >>>> language.h
> >>>> transcode.h
> >>>> versioning.h
> >>>>
> >>>> The -private headers are not for user programs, and you don't access those structures directly but instead use accessor functions to get or set values as needed.
> >>>>
> >>>> I am working on a libcupsinstalller project that will provide the necessary bits without compiling CUPS yourself.
> >>>>
> >>>>
> >>>> On Mar 26, 2012, at 10:37 AM, Tournie wrote:
> >>>>
> >>>>> I built libcups2.lib with Visual Studio.  To use it with my project, I included it along with ipp.h and http.h.  But now I'm seeing that to use variables of type 'ipp_t *' or 'http_t *' I need to bring over the files ipp-private.h and http-private.h, and the http-private.h wants config.h, and there are two config.h files, etc.
> >>>>>
> >>>>> Before I proceed further, am I going down the wrong path?  When I got past just needing ipp.h and http.h I started thinking I might be looking at this wrong.  Just looking for comments before I get too deep into bring in include files, etc.
> >>>>> _______________________________________________
> >>>>> cups mailing list
> >>>>> cups at easysw.com
> >>>>> http://lists.easysw.com/mailman/listinfo/cups
> >>>>
> >>>> ________________________________________________________________________
> >>>> Michael Sweet, Senior Printing System Engineer, PWG Chair
> >>>>
> >>>
> >>> _______________________________________________
> >>> cups mailing list
> >>> cups at easysw.com
> >>> http://lists.easysw.com/mailman/listinfo/cups
> >>
> >> ________________________________________________________________________
> >> Michael Sweet, Senior Printing System Engineer, PWG Chair
> >>
> >
> > _______________________________________________
> > cups mailing list
> > cups at easysw.com
> > http://lists.easysw.com/mailman/listinfo/cups
>
> ________________________________________________________________________
> Michael Sweet, Senior Printing System Engineer, PWG Chair
>





More information about the cups mailing list