Lines Matching defs:svc
151 parse_lpd_job(service_t *svc, job_t **job, int fd, char *line, int len)
224 s = svc->uri->host;
267 "printer-name", queue_name_from_uri(svc->uri));
274 parse_lpd_query(service_t *svc, int fd)
285 "printer-name", queue_name_from_uri(svc->uri));
287 if (uri_to_string(svc->uri, status, sizeof (status)) == 0)
372 svc->cache = cache;
380 parse_lpd_job(svc, &job, fd, line, sizeof (line));
401 cache_update(service_t *svc)
405 if (svc == NULL)
408 if (svc->cache != NULL) { /* this should be time based */
409 if (svc->cache->jobs == NULL) {
410 free(svc->cache);
411 svc->cache = NULL;
416 if ((fd = lpd_open(svc, 'q', NULL, 15)) < 0)
419 parse_lpd_query(svc, fd);
425 lpd_find_printer_info(service_t *svc, printer_t **printer)
429 if ((svc == NULL) || (printer == NULL))
432 cache_update(svc);
434 if (svc->cache != NULL) {
435 *printer = svc->cache->printer;
444 lpd_find_jobs_info(service_t *svc, job_t ***jobs)
448 if (svc != NULL) {
449 cache_update(svc);
451 if (svc->cache != NULL) {
452 *jobs = svc->cache->jobs;
465 free(svc->cache);
466 svc->cache = NULL;
472 lpd_find_job_info(service_t *svc, int job_id, job_t **job)
477 if ((lpd_find_jobs_info(svc, &jobs) == PAPI_OK) && (jobs != NULL)) {