Lines Matching refs:print_job

49     _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p);  in _init()  local
51 if (!print_job) return ERROR; in _init()
55 if (print_job->port_num == PORT_FILE) { in _init()
56 print_job->psock = open(printer_addr, O_CREAT | O_WRONLY | O_TRUNC, in _init()
59 if (print_job->psock == ERROR) { in _init()
66 print_job->psock = wConnect(printer_addr, print_job->port_num, _wprint_timeout_msec); in _init()
69 print_job->job_status = ((print_job->psock != -1) ? OK : ERROR); in _init()
70 return print_job->job_status; in _init()
74 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _destroy() local
75 if (print_job) { in _destroy()
76 free(print_job); in _destroy()
82 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _start_job() local
84 if (print_job) { in _start_job()
95 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _send_data() local
97 if (this_p && buffer && (print_job->job_status == OK)) { in _send_data()
98 if (print_job->port_num == PORT_FILE) { in _send_data()
100 bytes_written = write(print_job->psock, buffer, length); in _send_data()
115 FD_SET(print_job->psock, &w_fds); in _send_data()
118 selreturn = select(print_job->psock + 1, NULL, &w_fds, NULL, &timeout); in _send_data()
123 if (FD_ISSET(print_job->psock, &w_fds)) { in _send_data()
124 bytes_written = write(print_job->psock, buffer, length); in _send_data()
137 retval = (print_job->timeout_enabled ? ERROR : OK); in _send_data()
145 print_job->job_status = retval; in _send_data()
153 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _end_job() local
154 if (print_job) { in _end_job()
155 close(print_job->psock); in _end_job()
156 print_job->psock = -1; in _end_job()
157 return print_job->job_status; in _end_job()
163 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _enable_timeout() local
164 if (print_job) { in _enable_timeout()
165 print_job->timeout_enabled = enable; in _enable_timeout()
170 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _check_status() local
172 if (print_job) return print_job->job_status; in _check_status()
253 _print_job_t *print_job; in printer_connect() local
254 print_job = (_print_job_t *) malloc(sizeof(_print_job_t)); in printer_connect()
256 if (print_job) { in printer_connect()
257 print_job->port_num = port_num; in printer_connect()
258 print_job->psock = -1; in printer_connect()
259 print_job->job_id = WPRINT_BAD_JOB_HANDLE; in printer_connect()
260 print_job->job_status = ERROR; in printer_connect()
261 print_job->timeout_enabled = 0; in printer_connect()
262 memcpy(&print_job->ifc, &_print_job_ifc, sizeof(ifc_print_job_t)); in printer_connect()
264 return &print_job->ifc; in printer_connect()