Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/shellservice.py
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-01-27 11:54:56 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-01-27 11:54:56 (GMT)
commit9d13a9836d10e8ef5d2dda4dff6a7931ca2af728 (patch)
treeb05c8b37576e56201ebb6fb7b030e3c018da35f5 /shell/shellservice.py
parent37c6c1e9fa9b42d7a65f2234eac61307352887c2 (diff)
Added new tool sugar-install-bundle.
Diffstat (limited to 'shell/shellservice.py')
-rw-r--r--shell/shellservice.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/shell/shellservice.py b/shell/shellservice.py
new file mode 100644
index 0000000..dcbfc0e
--- /dev/null
+++ b/shell/shellservice.py
@@ -0,0 +1,19 @@
+import dbus
+
+_DBUS_SERVICE = "org.laptop.Shell"
+_DBUS_INTERFACE = "org.laptop.Shell"
+_DBUS_PATH = "/org/laptop/Shell"
+
+class ShellService(dbus.service.Object):
+
+ def __init__(self, shellModel):
+ self._shellModel = shellModel
+
+ bus = dbus.SessionBus()
+ bus_name = dbus.service.BusName(_DBUS_SERVICE, bus=bus)
+ dbus.service.Object.__init__(self, bus_name, _DBUS_PATH)
+
+ @dbus.service.method(_DBUS_INTERFACE, in_signature="s", out_signature="b")
+ def add_bundle(self, bundle_path):
+ registry = self._shellModel.get_bundle_registry()
+ return registry.add_bundle(bundle_path)