void dbus_metadata_watcher(struct metadata_bundle *argc, __attribute__((unused)) void *userdata) {
char response[100];
gboolean current_status, new_status;
-
+
const char *th;
shairport_sync_advanced_remote_control_set_volume(shairportSyncAdvancedRemoteControlSkeleton,
argc->speaker_volume);
shairport_sync_remote_control_set_airplay_volume(shairportSyncRemoteControlSkeleton,
argc->airplay_volume);
- shairport_sync_remote_control_set_server(shairportSyncRemoteControlSkeleton, argc->client_ip);
+ shairport_sync_remote_control_set_client(shairportSyncRemoteControlSkeleton, argc->client_ip);
+
+ // although it's a DACP server, the server is in fact, part of the the AirPlay "client" (their term).
if (argc->dacp_server_active) {
shairport_sync_remote_control_set_available(shairportSyncRemoteControlSkeleton, TRUE);
} else {
shairportSyncAdvancedRemoteControlSkeleton, response);
}
-
+
switch (argc->shuffle_status) {
case SS_NOT_AVAILABLE:
new_status = FALSE;
new_status = FALSE;
debug(1, "Unknown shuffle status -- this should never happen.");
}
-
+
current_status = shairport_sync_advanced_remote_control_get_shuffle(
shairportSyncAdvancedRemoteControlSkeleton);
-
+
// only set this if it's different
if (current_status != new_status) {
debug(3, "Shuffle State should be changed");
// debug(1, "Set tracklength to %lu.", track_length_in_microseconds);
GVariant *tracklength = g_variant_new("x", track_length_in_microseconds);
g_variant_builder_add(dict_builder, "{sv}", "mpris:length", tracklength);
- }
+ }
GVariant *dict = g_variant_builder_end(dict_builder);
g_variant_builder_unref(dict_builder);
static gboolean on_handle_remote_command(ShairportSync *skeleton, GDBusMethodInvocation *invocation,
const gchar *command,
__attribute__((unused)) gpointer user_data) {
- debug(1, "RemoteCommand with command \"%s\".", command);
+ debug(1, "RemoteCommand with command \"%s\".", command);
int reply = 0;
- char *server_reply = NULL;
+ char *client_reply = NULL;
ssize_t reply_size = 0;
- reply = dacp_send_command((const char *)command, &server_reply, &reply_size);
- char *server_reply_hex = alloca(reply_size * 2 + 1);
- if (server_reply_hex) {
- char *p = server_reply_hex;
- if (server_reply) {
- char *q = server_reply;
+ reply = dacp_send_command((const char *)command, &client_reply, &reply_size);
+ char *client_reply_hex = alloca(reply_size * 2 + 1);
+ if (client_reply_hex) {
+ char *p = client_reply_hex;
+ if (client_reply) {
+ char *q = client_reply;
int i;
for (i = 0; i < reply_size; i++) {
snprintf(p, 3, "%02X", *q);
}
*p = '\0';
}
- shairport_sync_complete_remote_command(skeleton, invocation, reply, server_reply_hex);
+ shairport_sync_complete_remote_command(skeleton, invocation, reply, client_reply_hex);
return TRUE;
}
// else
// shairport_sync_set_convolution_impulse_response_file(SHAIRPORT_SYNC(shairportSyncSkeleton), NULL);
#endif
-
+
shairport_sync_set_version(SHAIRPORT_SYNC(shairportSyncSkeleton), PACKAGE_VERSION);
char *vs = get_version_string();
shairport_sync_set_version_string(SHAIRPORT_SYNC(shairportSyncSkeleton), vs);
<property name="DriftTolerance" type="d" access="readwrite" />
<method name="RemoteCommand">
<arg name="command" type="s" direction="in" />
- <arg name="reply" type="i" direction="out" />
+ <arg name="reply" type="i" direction="out" />
<arg name="response" type="s" direction="out" />
</method>
<property name="VolumeControlProfile" type="s" access="readwrite" />
<method name='VolumeDown'/>
<property name='PlayerState' type='s' access='read'/>
<property name='ProgressString' type='s' access='read'/>
- <property name='Server' type='s' access='read'/>
+ <property name='Client' type='s' access='read'/>
<property name='AirplayVolume' type='d' access='read'/>
<method name="SetAirplayVolume">
<arg name="volume" type="d" direction="in" />