diff options
author | Ted Gould <ted@gould.cx> | 2014-02-26 09:47:32 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-02-26 09:47:32 -0600 |
commit | 812ba63f54089024f6ee61fe752046a36d6e973b (patch) | |
tree | 9c6d64c54a5c70270edddd102a3b9fc914dcc019 /service | |
parent | fc160ff366af18963333022ccfa7f704f0380e54 (diff) | |
download | ayatana-greeter-session-broadcast-812ba63f54089024f6ee61fe752046a36d6e973b.tar.gz ayatana-greeter-session-broadcast-812ba63f54089024f6ee61fe752046a36d6e973b.tar.bz2 ayatana-greeter-session-broadcast-812ba63f54089024f6ee61fe752046a36d6e973b.zip |
Reflecting the sound methods
Diffstat (limited to 'service')
-rw-r--r-- | service/service.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/service/service.c b/service/service.c index 425e8ac..7a83fb0 100644 --- a/service/service.c +++ b/service/service.c @@ -47,6 +47,45 @@ on_handle_request_home_shown (ServiceIfaceComCanonicalUnityGreeterBroadcast *obj return TRUE; } +static gboolean +on_handle_request_sound_play_pause (ServiceIfaceComCanonicalUnityGreeterBroadcast *object, + GDBusMethodInvocation *invocation, + const gchar *arg_username) +{ + /* Simply pass the request on */ + service_iface_com_canonical_unity_greeter_broadcast_emit_sound_play_pause (object, + arg_username); + service_iface_com_canonical_unity_greeter_broadcast_complete_request_sound_play_pause (object, + invocation); + return TRUE; +} + +static gboolean +on_handle_request_sound_next (ServiceIfaceComCanonicalUnityGreeterBroadcast *object, + GDBusMethodInvocation *invocation, + const gchar *arg_username) +{ + /* Simply pass the request on */ + service_iface_com_canonical_unity_greeter_broadcast_emit_sound_next (object, + arg_username); + service_iface_com_canonical_unity_greeter_broadcast_complete_request_sound_next (object, + invocation); + return TRUE; +} + +static gboolean +on_handle_request_sound_prev (ServiceIfaceComCanonicalUnityGreeterBroadcast *object, + GDBusMethodInvocation *invocation, + const gchar *arg_username) +{ + /* Simply pass the request on */ + service_iface_com_canonical_unity_greeter_broadcast_emit_sound_prev (object, + arg_username); + service_iface_com_canonical_unity_greeter_broadcast_complete_request_sound_prev (object, + invocation); + return TRUE; +} + static void on_bus_acquired (GDBusConnection *connection, const gchar *name, @@ -83,6 +122,7 @@ main (int argc, char * argv[]) interface = service_iface_com_canonical_unity_greeter_broadcast_skeleton_new (); + /* Application Launching */ g_signal_connect (interface, "handle-request-application-start", G_CALLBACK (on_handle_request_application_start), @@ -92,6 +132,20 @@ main (int argc, char * argv[]) G_CALLBACK (on_handle_request_home_shown), NULL); + /* Sound stuff */ + g_signal_connect (interface, + "handle-request-sound-play-pause", + G_CALLBACK (on_handle_request_sound_play_pause), + NULL); + g_signal_connect (interface, + "handle-request-sound-next", + G_CALLBACK (on_handle_request_sound_next), + NULL); + g_signal_connect (interface, + "handle-request-sound-prev", + G_CALLBACK (on_handle_request_sound_prev), + NULL); + owner_id = g_bus_own_name (G_BUS_TYPE_SYSTEM, "com.canonical.Unity.Greeter.Broadcast", G_BUS_NAME_OWNER_FLAGS_NONE, |