diff options
Diffstat (limited to '')
-rw-r--r-- | src/daemon.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/daemon.h b/src/daemon.h index f6ebaf0..773be85 100644 --- a/src/daemon.h +++ b/src/daemon.h @@ -168,3 +168,31 @@ char **sublist(char *const *list, size_t n); */ int reopen(int fd, int oflag); +/** + * Send a string to a client. + * + * @param sockfd The file descriptor of the socket. + * @param outfd The file descriptor to which the client shall output the message. + * @param ... `NULL`-terminated list of string to concatenate. + * @return 0 on success, -1 on error. + */ +int send_string(int sockfd, int outfd, ...); + +/** + * Removes (and optionally runs) a job. + * + * @param jobno The job number, `NULL` for any job. + * @param runjob Shall we run the job too? + * @return 0 on success, -1 on error. + * + * @throws 0 The job is not in the queue. + */ +int remove_job(const char *jobno, int runjob); + +/** + * Get a `NULL` terminated list of all queued jobs. + * + * @return A `NULL` terminated list of all queued jobs. `NULL` on error. + */ +struct job **get_jobs(void); + |