Logo Search packages:      
Sourcecode: zeitgeist version File versions

def zeitgeist::dbusutils::DBusInterface::_get_proxy (   cls  )  [private]

Returns the proxy instance used by the interface.

If the current interface has no proxy object set, it tries to
generate one. If this fails because no zeitgeist-daemon is
running a RuntimeError will be raised

Definition at line 52 of file dbusutils.py.

00052                          :
            """Returns the proxy instance used by the interface.
            
            If the current interface has no proxy object set, it tries to
            generate one. If this fails because no zeitgeist-daemon is
            running a RuntimeError will be raised
            """
            try:
                  return cls.__shared_state["proxy_object"]
            except KeyError, e:
                  bus = cls.get_session_bus()
                  try:
                        cls.__shared_state["proxy_object"] = bus.get_object(
                              cls.BUS_NAME,
                              cls.OBJECT_PATH
                        )
                  except dbus.exceptions.DBusException, e:
                        if e.get_dbus_name() == "org.freedesktop.DBus.Error.ServiceUnknown":
                              raise RuntimeError(("Found no running instance of the "
                                    "Zeitgeist daemon: %s") % e.get_dbus_message())
                        else:
                              raise
                  return cls.__shared_state["proxy_object"]
      
      @classmethod
      def connect(cls, signal, callback, arg0=None):


Generated by  Doxygen 1.6.0   Back to index