summaryrefslogtreecommitdiff
path: root/daemon.h
blob: d3ea5d0545c68b3c93a8e70db1b3e8d5d35618fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef DAEMON_H_
#define DAEMON_H_

#include "common.h"

/**
 * Functions related to client-daemon IPC over a unix-domain socket.
 */

/* Servers symbols */
extern int daemon_run;

/**
 * Allocate a cybd streamer and kickstart the cybd daemon even loop. This
 * function is blocking and thread-unsafe due to its interaction with the global
 * daemon_run variable. This function returns 0 on success or -1 on failure.
 */
int daemon_start  (int fd, const struct StreamerOpt *opts);

/* Client symbols */
int daemon_push   (int fd, const char *track, unsigned int index);
int daemon_pop    (int fd, unsigned int index);
int daemon_skip   (int fd);
int daemon_pause  (int fd);
int daemon_resume (int fd);
int daemon_kill   (int fd);
int daemon_query  (int fd, struct StateInfo *entries);

#endif // DAEMON_H_