diff options
author | Michael Terry <michael.terry@canonical.com> | 2013-09-12 10:07:54 -0400 |
---|---|---|
committer | Michael Terry <michael.terry@canonical.com> | 2013-09-12 10:07:54 -0400 |
commit | 0fbbe7c35ab8674867b55c326b06e680246743cd (patch) | |
tree | 11d416ec44a78dc254b451815f9c3455b6ec2b07 | |
parent | dddb0ed84a6cd0da6294fca0fc594f0e2cf40f89 (diff) | |
download | ayatana-greeter-session-broadcast-0fbbe7c35ab8674867b55c326b06e680246743cd.tar.gz ayatana-greeter-session-broadcast-0fbbe7c35ab8674867b55c326b06e680246743cd.tar.bz2 ayatana-greeter-session-broadcast-0fbbe7c35ab8674867b55c326b06e680246743cd.zip |
Add RequestHomeShown method / ShowHome signal
-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", |