X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/e3953a418a97e0512da7421bb1374c0336fdfd4d..9e42afcd09973d589b58be8f503f05b9f292c3b4:/lib/speaker-protocol.h diff --git a/lib/speaker-protocol.h b/lib/speaker-protocol.h index 200e4b5..4a8d3aa 100644 --- a/lib/speaker-protocol.h +++ b/lib/speaker-protocol.h @@ -26,6 +26,9 @@ #define SPEAKER_PROTOCOL_H #include "byte-order.h" +#if HAVE_NETINET_IN_H +# include +#endif /** @brief A message from the main server to the speaker, or vica versa */ struct speaker_message { @@ -37,6 +40,8 @@ struct speaker_message { * - @ref SM_RESUME * - @ref SM_CANCEL * - @ref SM_RELOAD + * - @ref SM_RTP_REQUEST + * - @ref SM_RTP_CANCEL * * Messages from the speaker: * - @ref SM_PAUSED @@ -53,6 +58,9 @@ struct speaker_message { union { /** @brief Track ID (including 0 terminator) */ char id[24]; /* ID including terminator */ + + /** @brief An IP address (for @ref SM_RTP_REQUEST and @ref SM_RTP_CANCEL) */ + struct sockaddr_storage address; } u; }; @@ -76,6 +84,12 @@ struct speaker_message { /** @brief Reload configuration */ #define SM_RELOAD 5 +/** @brief Reload configuration */ +#define SM_RTP_REQUEST 6 + +/** @brief Reload configuration */ +#define SM_RTP_CANCEL 7 + /* messages from the speaker */ /** @brief Paused track @c id, @c data seconds in *