]> git.ipfire.org Git - thirdparty/shairport-sync.git/blame - dacp.h
Update check_classic_systemd_full.yml
[thirdparty/shairport-sync.git] / dacp.h
CommitLineData
3198ec42
MB
1#pragma once
2#include "common.h"
3#include "config.h"
fe3b70b4 4#include <pthread.h>
1637a79d 5#include <sys/socket.h>
3198ec42
MB
6
7#include "player.h"
8
9typedef struct dacp_speaker_stuff {
10 int64_t speaker_number;
11 int active;
12 int32_t volume;
5f750ba9 13 char name[128]; // this is really just for debugging
3198ec42
MB
14} dacp_spkr_stuff;
15
88c55066 16void dacp_monitor_start();
f1d45034 17void dacp_monitor_stop();
88c55066 18
3198ec42
MB
19uint32_t dacp_tlv_crawl(
20 char **p,
21 int32_t *length); // return the code of the next TLV entity and advance the pointer beyond it.
1637a79d 22
3e2c3e83
MB
23int dacp_set_speaker_volume(int64_t machine_number, int32_t vo);
24
c36a7822
MB
25int dacp_get_speaker_list(dacp_spkr_stuff *speaker_array, int max_size_of_array,
26 int *actual_speaker_count);
1637a79d
MB
27void set_dacp_server_information(rtsp_conn_info *conn); // tell the DACP conversation thread that
28 // the dacp server information has been set
29 // or changed
01f2a374
MB
30void relinquish_dacp_server_information(rtsp_conn_info *conn); // tell the DACP conversation thread
31 // that the player thread is no
32 // longer associated with it.
32c7a535
MB
33void dacp_monitor_port_update_callback(
34 char *dacp_id, uint16_t port); // a callback to say the port is no longer in use
02224666
MB
35
36int dacp_send_command(const char *command, char **body, ssize_t *bodysize);
1637a79d 37int send_simple_dacp_command(const char *command);
3e2c3e83 38
a5862a9c
MB
39int dacp_set_include_speaker_volume(int64_t machine_number, int32_t vo);
40int dacp_get_client_volume(int32_t *result);
c36a7822
MB
41int dacp_get_volume(
42 int32_t *the_actual_volume); // get the speaker volume information from the DACP source
39f159bf 43int dacp_set_volume(int32_t vo); // set the volume of our speaker