Lines Matching refs:ipp_job

65     ipp_print_job_t *ipp_job = (ipp_print_job_t *) malloc(sizeof(ipp_print_job_t));  in ipp_get_print_ifc()  local
67 if (ipp_job == NULL) { in ipp_get_print_ifc()
71 memset(ipp_job, 0, sizeof(ipp_print_job_t)); in ipp_get_print_ifc()
72 ipp_job->status = HTTP_CONTINUE; in ipp_get_print_ifc()
74 memcpy(&ipp_job->ifc, &_print_job_ifc, sizeof(ifc_print_job_t)); in ipp_get_print_ifc()
76 return &ipp_job->ifc; in ipp_get_print_ifc()
82 ipp_print_job_t *ipp_job; in _init() local
89 ipp_job = IMPL(ipp_print_job_t, ifc, this_p); in _init()
90 if (ipp_job->http != NULL) { in _init()
91 httpClose(ipp_job->http); in _init()
102 httpAssembleURIf(HTTP_URI_CODING_ALL, ipp_job->printer_uri, sizeof(ipp_job->printer_uri), in _init()
104 getResourceFromURI(ipp_job->printer_uri, ipp_job->http_resource, 1024); in _init()
106 ipp_job->http = httpConnect2(printer_address, ippPortNumber, NULL, AF_UNSPEC, in _init()
110 if (ipp_job->http == NULL) { in _init()
111 ipp_job->http = httpConnect2(printer_address, ippPortNumber, NULL, AF_UNSPEC, in _init()
115 ipp_job->http = httpConnect2(printer_address, ippPortNumber, NULL, AF_UNSPEC, in _init()
119 httpSetTimeout(ipp_job->http, DEFAULT_IPP_TIMEOUT, NULL, 0); in _init()
126 ipp_print_job_t *ipp_job; in _destroy() local
131 ipp_job = IMPL(ipp_print_job_t, ifc, this_p); in _destroy()
132 if (ipp_job->http != NULL) { in _destroy()
133 httpClose(ipp_job->http); in _destroy()
136 free(ipp_job); in _destroy()
440 ipp_print_job_t *ipp_job; in _validate_job() local
455 ipp_job = IMPL(ipp_print_job_t, ifc, this_p); in _validate_job()
456 if (ipp_job->http == NULL) { in _validate_job()
460 ipp_job->useragent = NULL; in _validate_job()
462 ipp_job->useragent = job_params->useragent; in _validate_job()
465 request = _fill_job(IPP_VALIDATE_JOB, ipp_job->printer_uri, job_params, printer_caps); in _validate_job()
467 if (ipp_job->useragent != NULL) { in _validate_job()
468 httpSetDefaultField(ipp_job->http, HTTP_FIELD_USER_AGENT, ipp_job->useragent); in _validate_job()
470 if ((response = ipp_doCupsRequest(ipp_job->http, request, ipp_job->http_resource, in _validate_job()
471 ipp_job->printer_uri)) in _validate_job()
509 ipp_print_job_t *ipp_job; in _start_job() local
522 ipp_job = IMPL(ipp_print_job_t, ifc, this_p); in _start_job()
524 ipp_job->useragent = NULL; in _start_job()
526 ipp_job->useragent = job_params->useragent; in _start_job()
528 request = _fill_job(IPP_PRINT_JOB, ipp_job->printer_uri, job_params, printer_caps); in _start_job()
534 if (ipp_job->useragent != NULL) { in _start_job()
535 httpSetDefaultField(ipp_job->http, HTTP_FIELD_USER_AGENT, ipp_job->useragent); in _start_job()
537 ipp_job->status = cupsSendRequest(ipp_job->http, request, ipp_job->http_resource, 0); in _start_job()
538 if (ipp_job->status != HTTP_CONTINUE) { in _start_job()
541 ((ipp_job->status == HTTP_ERROR) || (ipp_job->status >= HTTP_BAD_REQUEST))) { in _start_job()
552 LOGI("_start_job httpPrint fd %d status %d ipp_status %d", ipp_job->http->fd, in _start_job()
553 ipp_job->status, cupsLastError()); in _start_job()
555 result = ((ipp_job->status == HTTP_CONTINUE) ? OK : ERROR); in _start_job()
562 ipp_print_job_t *ipp_job; in _send_data() local
567 ipp_job = IMPL(ipp_print_job_t, ifc, this_p); in _send_data()
568 if (ipp_job->http == NULL) { in _send_data()
572 if (ipp_job->status != HTTP_CONTINUE) { in _send_data()
577 if (ipp_job->useragent != NULL) { in _send_data()
578 httpSetDefaultField(ipp_job->http, HTTP_FIELD_USER_AGENT, ipp_job->useragent); in _send_data()
580 ipp_job->status = cupsWriteRequestData(ipp_job->http, buffer, length); in _send_data()
582 return ((ipp_job->status == HTTP_CONTINUE) ? length : (int) ERROR); in _send_data()
591 ipp_print_job_t *ipp_job; in _end_job() local
600 ipp_job = IMPL(ipp_print_job_t, ifc, this_p); in _end_job()
602 if (ipp_job->http == NULL) { in _end_job()
606 LOGD("_end_job: entry httpPrint %d", ipp_job->http->fd); in _end_job()
608 if (ipp_job->useragent != NULL) { in _end_job()
609 httpSetDefaultField(ipp_job->http, HTTP_FIELD_USER_AGENT, ipp_job->useragent); in _end_job()
611 ipp_job->status = cupsWriteRequestData(ipp_job->http, buffer, 0); in _end_job()
613 if (ipp_job->status != HTTP_CONTINUE) { in _end_job()
615 ipp_job->http->fd, ipp_job->status); in _end_job()
618 LOGD("0 length Bytes sent, status %d", ipp_job->status); in _end_job()
619 response = cupsGetResponse(ipp_job->http, ipp_job->http_resource); in _end_job()
646 LOGD("_end_job: exit status %d job_id %d", ipp_job->status, job_id); in _end_job()