aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Terry <michael.terry@canonical.com>2014-03-24 14:57:36 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-03-24 14:57:36 +0000
commit8cb0407fa3b9951dd0e11bed900d9d07f2f7850b (patch)
tree59ec5c36f6e05d4685b22b6afbc544e990ee0dff
parent4999139dbd3c18121c4cd4047acc184a752de903 (diff)
parentd04b5637fa83495d6ab2640cba7c6efd996e10f9 (diff)
downloadayatana-greeter-session-broadcast-8cb0407fa3b9951dd0e11bed900d9d07f2f7850b.tar.gz
ayatana-greeter-session-broadcast-8cb0407fa3b9951dd0e11bed900d9d07f2f7850b.tar.bz2
ayatana-greeter-session-broadcast-8cb0407fa3b9951dd0e11bed900d9d07f2f7850b.zip
Switch to handling URLs instead of AppIDs.
-rw-r--r--data/com.canonical.Unity.Greeter.Broadcast.gschema.xml6
-rw-r--r--data/com.canonical.Unity.Greeter.Broadcast.xml8
-rw-r--r--data/unity-greeter-session-broadcast-session.conf6
-rw-r--r--debian/control2
-rw-r--r--service/service.c22
-rwxr-xr-xtest-call.sh2
6 files changed, 22 insertions, 24 deletions
diff --git a/data/com.canonical.Unity.Greeter.Broadcast.gschema.xml b/data/com.canonical.Unity.Greeter.Broadcast.gschema.xml
index 4799d68..f9fbf22 100644
--- a/data/com.canonical.Unity.Greeter.Broadcast.gschema.xml
+++ b/data/com.canonical.Unity.Greeter.Broadcast.gschema.xml
@@ -1,10 +1,10 @@
<schemalist>
<schema id="com.canonical.Unity.Greeter.Broadcast" path="/com/canonical/Unity/Greeter/Broadcast/" gettext-domain="unity-greeter-session-broadcast">
- <key name="allow-start-application" type="b">
- <summary>Allow the Greeter to start applications in this session</summary>
+ <key name="allow-start-url" type="b">
+ <summary>Allow the Greeter to start URLs in this session</summary>
<description>
The key controls whether the service in the session will listen
- for and react to the request from the greeter to start an application
+ for and react to the request from the greeter to start an url
from the greeter.
</description>
<default>true</default>
diff --git a/data/com.canonical.Unity.Greeter.Broadcast.xml b/data/com.canonical.Unity.Greeter.Broadcast.xml
index af08286..5a4276a 100644
--- a/data/com.canonical.Unity.Greeter.Broadcast.xml
+++ b/data/com.canonical.Unity.Greeter.Broadcast.xml
@@ -2,9 +2,9 @@
<node>
<interface name="com.canonical.Unity.Greeter.Broadcast">
<!-- From the Greeter -->
- <method name="RequestApplicationStart">
+ <method name="RequestUrlStart">
<arg type="s" name="username" direction="in" />
- <arg type="s" name="appId" direction="in" />
+ <arg type="s" name="url" direction="in" />
</method>
<method name="RequestHomeShown">
@@ -24,9 +24,9 @@
</method>
<!-- To the Session -->
- <signal name="StartApplication">
+ <signal name="StartUrl">
<arg type="s" name="username" direction="out" />
- <arg type="s" name="appId" direction="out" />
+ <arg type="s" name="url" direction="out" />
</signal>
<signal name="ShowHome">
diff --git a/data/unity-greeter-session-broadcast-session.conf b/data/unity-greeter-session-broadcast-session.conf
index 675bbc2..7f45187 100644
--- a/data/unity-greeter-session-broadcast-session.conf
+++ b/data/unity-greeter-session-broadcast-session.conf
@@ -3,10 +3,8 @@ author "Ted Gould <ted@canonical.com>"
task
-emits application-start
-
#TODO: Check GSettings Key
-start on dbus BUS=system SIGNAL="StartApplication" INTERFACE="com.canonical.Unity.Greeter.Broadcast" OBJPATH="/com/canonical/Unity/Greeter/Broadcast"
+start on dbus BUS=system SIGNAL="StartUrl" INTERFACE="com.canonical.Unity.Greeter.Broadcast" OBJPATH="/com/canonical/Unity/Greeter/Broadcast"
pre-start script
if [ -z $ARG0 ] ; then
@@ -30,4 +28,4 @@ pre-start script
fi
end script
-exec initctl emit application-start APP_ID=${ARG1}
+exec url-dispatcher ${ARG1}
diff --git a/debian/control b/debian/control
index ed12280..1b2bada 100644
--- a/debian/control
+++ b/debian/control
@@ -26,7 +26,7 @@ Vcs-Browser: https://code.launchpad.net/~indicator-applet-developers/unity-greet
Package: unity-greeter-session-broadcast
Architecture: any
Depends: upstart (>= 1.10-0ubuntu2),
- upstart-app-launch,
+ url-dispatcher-tools,
${misc:Depends},
${shlibs:Depends},
Description: Service to allow the greeter to communicate to sessions
diff --git a/service/service.c b/service/service.c
index 7a83fb0..88f0ffa 100644
--- a/service/service.c
+++ b/service/service.c
@@ -20,17 +20,17 @@
#include "service-iface.h"
static gboolean
-on_handle_request_application_start (ServiceIfaceComCanonicalUnityGreeterBroadcast *object,
- GDBusMethodInvocation *invocation,
- const gchar *arg_username,
- const gchar *arg_appId)
+on_handle_request_url_start (ServiceIfaceComCanonicalUnityGreeterBroadcast *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *arg_username,
+ const gchar *arg_url)
{
/* Simply pass the request on */
- service_iface_com_canonical_unity_greeter_broadcast_emit_start_application (object,
- arg_username,
- arg_appId);
- service_iface_com_canonical_unity_greeter_broadcast_complete_request_application_start (object,
- invocation);
+ service_iface_com_canonical_unity_greeter_broadcast_emit_start_url (object,
+ arg_username,
+ arg_url);
+ service_iface_com_canonical_unity_greeter_broadcast_complete_request_url_start (object,
+ invocation);
return TRUE;
}
@@ -124,8 +124,8 @@ main (int argc, char * argv[])
/* Application Launching */
g_signal_connect (interface,
- "handle-request-application-start",
- G_CALLBACK (on_handle_request_application_start),
+ "handle-request-url-start",
+ G_CALLBACK (on_handle_request_url_start),
NULL);
g_signal_connect (interface,
"handle-request-home-shown",
diff --git a/test-call.sh b/test-call.sh
index bc1ffac..5ad9b9e 100755
--- a/test-call.sh
+++ b/test-call.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-gdbus call --system --dest com.canonical.Unity.Greeter.Broadcast --object-path /com/canonical/Unity/Greeter/Broadcast --method com.canonical.Unity.Greeter.Broadcast.RequestApplicationStart $1 $2
+gdbus call --system --dest com.canonical.Unity.Greeter.Broadcast --object-path /com/canonical/Unity/Greeter/Broadcast --method com.canonical.Unity.Greeter.Broadcast.RequestUrlStart $1 $2