Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/activity/bundleregistry.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar/activity/bundleregistry.py')
-rw-r--r--sugar/activity/bundleregistry.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/sugar/activity/bundleregistry.py b/sugar/activity/bundleregistry.py
index 7b12492..58b1700 100644
--- a/sugar/activity/bundleregistry.py
+++ b/sugar/activity/bundleregistry.py
@@ -15,8 +15,25 @@ def _get_data_dirs():
return [ '/usr/local/share/', '/usr/share/' ]
class _ServiceManager(object):
+ """Internal class responsible for creating dbus service files
+
+ DBUS services are defined in files which bind a service name
+ to the name of an executable which provides the service name.
+
+ In Sugar, the service files are automatically generated from
+ the activity registry (by this class). When an activity's
+ dbus launch service is requested, dbus will launch the
+ specified executable in order to allow it to provide the
+ requested activity-launching service.
+
+ In the case of activities which provide a "class", instead of
+ an "exec" attribute in their activity.info, the
+ sugar-activity-factory script is used with an appropriate
+ argument to service that bundle.
+ """
+ SERVICE_DIRECTORY = '~/.local/share/dbus-1/services'
def __init__(self):
- service_dir = os.path.expanduser('~/.local/share/dbus-1/services')
+ service_dir = os.path.expanduser(self.SERVICE_DIRECTORY)
if not os.path.isdir(service_dir):
os.makedirs(service_dir)