static char * server = "vespa.holoscopio.com";
static char * username = "pubsub";
static char * password = "pubsub";
-static char * pbservice = "pubsub.vespa.holoscopio.com";
+static char * pbservice = "pubsub@vespa.holoscopio.com";
static char * authed_jid = "vespa";
static iks *
iks *tune;
if (dbus_message_is_signal (msg, "org.MetaPlayer.tag", "playing"))
{
+ printf("publishing tune\n");
tune = tune_from_dbus (msg);
pushtune (data, "http://jabber.org/protocol/tune", tune);
return DBUS_HANDLER_RESULT_HANDLED;
}
+ else if (dbus_message_is_signal (msg, "org.MetaPlayer.player", "stop"))
+ {
+ printf("tune stopped\n");
+ tune = iks_new ("tune");
+ iks_insert_attrib (tune, "xmlns", "http://jabber.org/protocol/tune");
+ pushtune (data, "http://jabber.org/protocol/tune", tune);
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
else
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}