• Home
  • Raw
  • Download

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()
81 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _start_job() local
83 if (print_job) { in _start_job()
94 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _send_data() local
96 if (this_p && buffer && (print_job->job_status == OK)) { in _send_data()
97 if (print_job->port_num == PORT_FILE) { in _send_data()
99 bytes_written = write(print_job->psock, buffer, length); in _send_data()
114 FD_SET(print_job->psock, &w_fds); in _send_data()
117 selreturn = select(print_job->psock + 1, NULL, &w_fds, NULL, &timeout); in _send_data()
122 if (FD_ISSET(print_job->psock, &w_fds)) { in _send_data()
123 bytes_written = write(print_job->psock, buffer, length); in _send_data()
136 retval = (print_job->timeout_enabled ? ERROR : OK); in _send_data()
144 print_job->job_status = retval; in _send_data()
152 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _end_job() local
153 if (print_job) { in _end_job()
154 close(print_job->psock); in _end_job()
155 print_job->psock = -1; in _end_job()
156 return print_job->job_status; in _end_job()
162 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _enable_timeout() local
163 if (print_job) { in _enable_timeout()
164 print_job->timeout_enabled = enable; in _enable_timeout()
169 _print_job_t *print_job = IMPL(_print_job_t, ifc, this_p); in _check_status() local
171 if (print_job) return print_job->job_status; in _check_status()
252 _print_job_t *print_job; in printer_connect() local
253 print_job = (_print_job_t *) malloc(sizeof(_print_job_t)); in printer_connect()
255 if (print_job) { in printer_connect()
256 print_job->port_num = port_num; in printer_connect()
257 print_job->psock = -1; in printer_connect()
258 print_job->job_id = WPRINT_BAD_JOB_HANDLE; in printer_connect()
259 print_job->job_status = ERROR; in printer_connect()
260 print_job->timeout_enabled = 0; in printer_connect()
261 memcpy(&print_job->ifc, &_print_job_ifc, sizeof(ifc_print_job_t)); in printer_connect()
263 return &print_job->ifc; in printer_connect()