Lines Matching defs:svc
53 check_job_id(papi_service_t svc, char *printer, int32_t id)
61 status = papiPrinterListJobs(svc, printer, jattrs, PAPI_LIST_JOBS_ALL,
65 detailed_error(svc,
176 create_request(papi_service_t svc, char *printer, papi_attribute_t **attributes)
199 job_attributes_to_lpsched_request(svc, r, attributes);
206 authorized(service_t *svc, int32_t id)
223 s = papiAttributeListGetString(svc->attributes, NULL,
541 service_t *svc = handle;
552 if ((svc == NULL) || (printer == NULL) || (files == NULL) ||
562 detailed_error(svc,
568 detailed_error(svc,
574 detailed_error(svc,
585 status = lpsched_alloc_files(svc, file_no + 1, &request_id);
589 request = create_request(svc, (char *)printer,
598 detailed_error(svc,
618 detailed_error(svc, "unable to copy attributes to file: %s: %s",
627 detailed_error(svc, gettext("unable to save request: %s: %s"),
633 status = lpsched_commit_job(svc, lpfile, &tmp);
659 service_t *svc = handle;
671 if ((svc == NULL) || (printer == NULL) || (files == NULL) ||
681 detailed_error(svc,
687 detailed_error(svc,
693 detailed_error(svc,
703 detailed_error(svc, gettext(
712 detailed_error(svc, gettext(
726 status = lpsched_alloc_files(svc, 1, &request_id);
730 request = create_request(svc, (char *)printer,
745 detailed_error(svc, "unable to copy attributes to file: %s: %s",
754 detailed_error(svc, gettext("unable to save request: %s: %s"),
760 status = lpsched_commit_job(svc, lpfile, &tmp);
818 service_t *svc = handle;
823 if ((svc == NULL) || (printer == NULL) || (stream == NULL))
833 status = lpsched_alloc_files(svc, 2, &request_id);
840 s->request = create_request(svc, (char *)printer,
858 detailed_error(svc, "unable to copy attributes to file: %s: %s",
870 detailed_error(svc, gettext("unable to save request: %s: %s"),
883 service_t *svc = handle;
886 if ((svc == NULL) || (stream == NULL) || (buffer == NULL))
899 service_t *svc = handle;
904 if ((svc == NULL) || (stream == NULL) || (job == NULL))
915 status = lpsched_commit_job(svc, s->meta_data_file, &tmp);
939 service_t *svc = handle;
962 rc = snd_msg(svc, S_INQUIRE_REQUEST_RANK, 0, "", "", req_id, "", "");
966 if (rcv_msg(svc, R_INQUIRE_REQUEST_RANK, &rc, &request_id,
969 detailed_error(svc,
981 lpsched_read_job_configuration(svc, j, req_id);
995 service_t *svc = handle;
1000 if ((svc == NULL) || (printer == NULL) || (job_id < 0) ||
1008 if (papiAttributeListGetString(svc->attributes, NULL, "user-name",
1022 if ((snd_msg(svc, S_MOVE_REQUEST, req_id, dest) < 0) ||
1023 (rcv_msg(svc, R_MOVE_REQUEST, &status, &bits) < 0))
1038 service_t *svc = handle;
1043 if ((svc == NULL) || (printer == NULL) || (job_id < 0))
1050 if (papiAttributeListGetString(svc->attributes, NULL, "user-name",
1066 if ((snd_msg(svc, S_CANCEL_REQUEST, req_id) < 0) ||
1067 (rcv_msg(svc, R_CANCEL_REQUEST, &status) < 0))
1081 service_t *svc = handle;
1086 if ((svc == NULL) || (printer == NULL) || (job_id < 0))
1089 if ((status = authorized(svc, job_id)) != PAPI_OK)
1093 status = lpsched_start_change(svc, dest, job_id, &file);
1111 detailed_error(svc,
1119 detailed_error(svc, gettext("failed to read job: %s: %s"),
1124 status = lpsched_end_change(svc, dest, job_id);
1153 service_t *svc = handle;
1160 if ((svc == NULL) || (printer == NULL) || (job_id < 0) ||
1174 job_id_actual = check_job_id(svc, printer, job_id);
1178 detailed_error(svc,
1184 status = lpsched_start_change(svc, dest, job_id_actual, &file);
1201 detailed_error(svc,
1209 detailed_error(svc,
1216 detailed_error(svc, gettext("failed to read job: %s: %s"),
1221 status = lpsched_end_change(svc, dest, job_id_actual);
1243 service_t *svc = handle;
1251 if ((svc == NULL) || (printer == NULL) || (job == NULL))
1261 status = lpsched_alloc_files(svc, 1, &request_id);
1266 request = create_request(svc, (char *)printer,
1284 detailed_error(svc, "unable to copy attributes to file: %s: %s",
1295 detailed_error(svc, gettext("unable to save request: %s: %s"),
1300 status = lpsched_commit_job(svc, metadata_file, &tmp);
1322 service_t *svc = handle;
1327 if ((svc == NULL) || (printer == NULL))
1332 status = lpsched_start_change(svc, dest, id, &metadata_file);
1342 detailed_error(svc,
1349 detailed_error(svc, gettext("failed to read job: %s: %s"),
1354 status = lpsched_end_change(svc, dest, id);
1365 service_t *svc = handle;
1379 detailed_error(svc, gettext("unable to create sink (%s): %s"),
1386 status = lpsched_start_change(svc, dest, id, &metadata_file);
1395 detailed_error(svc, gettext("unable to load request: %s: %s"),
1406 detailed_error(svc, gettext("unable to save request: %s: %s"),
1414 status = lpsched_end_change(svc, dest, id);