aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-29 02:00:31 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-29 02:00:31 +0100
commita2ec37e465adc15cf440907582dd4822feafc01c (patch)
tree8a7625eaa98753b03a79ae86717c34bae26e1d90 /src/daemon.h
parentfeature test macros (diff)
downloadsat-a2ec37e465adc15cf440907582dd4822feafc01c.tar.gz
sat-a2ec37e465adc15cf440907582dd4822feafc01c.tar.bz2
sat-a2ec37e465adc15cf440907582dd4822feafc01c.tar.xz
the missing bits
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--src/daemon.h28
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);
+