2 * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 * Job control interfaces
29 void done ( struct job_interface *job, int rc ) {
30 struct job_interface *dest = job_dest ( job );
32 dest->op->done ( dest, rc );
35 /****************************************************************************
39 * These functions are designed to be used as methods in the
40 * job_interface_operations table.
44 void ignore_done ( struct job_interface *job __unused, int rc __unused ) {
48 void ignore_kill ( struct job_interface *job __unused ) {
52 void ignore_progress ( struct job_interface *job __unused,
53 struct job_progress *progress ) {
54 memset ( progress, 0, sizeof ( *progress ) );
57 /** Null job control interface operations */
58 struct job_interface_operations null_job_ops = {
61 .progress = ignore_progress,
65 * Null job control interface
67 * This is the interface to which job control interfaces are connected
68 * when unplugged. It will never generate messages, and will silently
69 * absorb all received messages.
71 struct job_interface null_job = {
73 .dest = &null_job.intf,
74 .refcnt = null_refcnt,