diff options
-rw-r--r-- | data/com.canonical.Unity.Greeter.Broadcast.xml | 7 | ||||
-rw-r--r-- | service/service.c | 17 |
2 files changed, 24 insertions, 0 deletions
diff --git a/data/com.canonical.Unity.Greeter.Broadcast.xml b/data/com.canonical.Unity.Greeter.Broadcast.xml index a3a5487..5d29ca5 100644 --- a/data/com.canonical.Unity.Greeter.Broadcast.xml +++ b/data/com.canonical.Unity.Greeter.Broadcast.xml @@ -7,6 +7,9 @@ <arg type="s" name="appId" direction="in" /> </method> + <method name="RequestHomeShown"> + <arg type="s" name="username" direction="in" /> + </method> <!-- To the Session --> <signal name="StartApplication"> @@ -14,6 +17,10 @@ <arg type="s" name="appId" direction="out" /> </signal> + <signal name="ShowHome"> + <arg type="s" name="username" direction="out" /> + </signal> + <!-- Other --> </interface> </node> diff --git a/service/service.c b/service/service.c index 7118f65..425e8ac 100644 --- a/service/service.c +++ b/service/service.c @@ -34,6 +34,19 @@ on_handle_request_application_start (ServiceIfaceComCanonicalUnityGreeterBroadca return TRUE; } +static gboolean +on_handle_request_home_shown (ServiceIfaceComCanonicalUnityGreeterBroadcast *object, + GDBusMethodInvocation *invocation, + const gchar *arg_username) +{ + /* Simply pass the request on */ + service_iface_com_canonical_unity_greeter_broadcast_emit_show_home (object, + arg_username); + service_iface_com_canonical_unity_greeter_broadcast_complete_request_home_shown (object, + invocation); + return TRUE; +} + static void on_bus_acquired (GDBusConnection *connection, const gchar *name, @@ -74,6 +87,10 @@ main (int argc, char * argv[]) "handle-request-application-start", G_CALLBACK (on_handle_request_application_start), NULL); + g_signal_connect (interface, + "handle-request-home-shown", + G_CALLBACK (on_handle_request_home_shown), + NULL); owner_id = g_bus_own_name (G_BUS_TYPE_SYSTEM, "com.canonical.Unity.Greeter.Broadcast", |