Rename interface name to org.laptop

This commit is contained in:
Marco Pesenti Gritti 2007-05-22 14:49:28 +02:00
parent 1dc104126d
commit 1cb7700136
2 changed files with 6 additions and 2 deletions

View File

@ -31,6 +31,8 @@ _ACTIVITY_SERVICE_NAME = "org.laptop.Activity"
_ACTIVITY_SERVICE_PATH = "/org/laptop/Activity" _ACTIVITY_SERVICE_PATH = "/org/laptop/Activity"
_ACTIVITY_INTERFACE = "org.laptop.Activity" _ACTIVITY_INTERFACE = "org.laptop.Activity"
_ACTIVITY_FACTORY_INTERFACE = "org.laptop.ActivityFactory"
def create_activity_id(): def create_activity_id():
"""Generate a new, unique ID for this activity""" """Generate a new, unique ID for this activity"""
pservice = presenceservice.get_instance() pservice = presenceservice.get_instance()
@ -103,7 +105,7 @@ class ActivityCreationHandler(gobject.GObject):
bus = dbus.SessionBus() bus = dbus.SessionBus()
proxy_obj = bus.get_object(service_name, bundle.get_object_path(), follow_name_owner_changes=True) proxy_obj = bus.get_object(service_name, bundle.get_object_path(), follow_name_owner_changes=True)
factory = dbus.Interface(proxy_obj, "com.redhat.Sugar.ActivityFactory") factory = dbus.Interface(proxy_obj, _ACTIVITY_FACTORY_INTERFACE)
factory.create(self._activity_handle.get_dict(), factory.create(self._activity_handle.get_dict(),
reply_handler=self._reply_handler, reply_handler=self._reply_handler,

View File

@ -34,6 +34,8 @@ from sugar import logger
gobject.threads_init() gobject.threads_init()
dbus.glib.threads_init() dbus.glib.threads_init()
_ACTIVITY_FACTORY_INTERFACE = "org.laptop.ActivityFactory"
class ActivityFactoryService(dbus.service.Object): class ActivityFactoryService(dbus.service.Object):
"""D-Bus service that creates instances of Python activities """D-Bus service that creates instances of Python activities
@ -92,7 +94,7 @@ class ActivityFactoryService(dbus.service.Object):
object_path = '/' + service_name.replace('.', '/') object_path = '/' + service_name.replace('.', '/')
dbus.service.Object.__init__(self, bus_name, object_path) dbus.service.Object.__init__(self, bus_name, object_path)
@dbus.service.method("com.redhat.Sugar.ActivityFactory", in_signature="a{ss}") @dbus.service.method("org.laptop.ActivityFactory", in_signature="a{ss}")
def create(self, handle): def create(self, handle):
"""Create a new instance of this activity """Create a new instance of this activity