Hi,
I have a problem with Dbus and GObject.
In fact, I want to emit a GObject signal in a
telepathy.client.Connection class.
I receive the signal correctly but I get also an Dbus exception:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod:
Method "do_signal_name" with signature "s" on interface
"org.freedesktop.Telepathy.Connection" doesn't exist
Seems like Dbus wants to interfere with the signal emission.
I put my python test file that reproduces the bug.
Thanks for your help,
--
Fabien LOUIS <[email protected]>
import dbus
import dbus.glib
import telepathy.client
import gobject
from telepathy.interfaces import (
CONNECTION,
CONNECTION_MANAGER,
)
class Listening(gobject.GObject):
def __init__(self):
conn = Connection()
gobject.GObject.connect(conn, "signal_name", self.__on_action)
def __on_action(self, object, string):
print "Get: ", string
class Connection(gobject.GObject, telepathy.client.Connection):
__gsignals__ = {'signal_name' : (gobject.SIGNAL_RUN_LAST,
gobject.TYPE_NONE, (gobject.TYPE_STRING,)),
}
def __init__(self):
# Get the requested manager
reg = telepathy.client.ManagerRegistry()
reg.LoadManagers()
manager = reg.GetManager("gabble")
# Request first connection
conn_bus_name, conn_object_path = \
manager[CONNECTION_MANAGER].RequestConnection("jabber",
{"account": "",
"password": ""})
conn1 = telepathy.client.Connection(conn_bus_name, conn_object_path)
telepathy.client.Connection.__init__(self, conn_bus_name, conn_object_path)
gobject.GObject.__init__(self)
gobject.timeout_add(2000, self.__send_signal)
def __send_signal(self):
gobject.GObject.emit(self, "signal_name", "It's correct?")
test = Listening();
# Wait
loop = gobject.MainLoop()
try:
loop.run()
except KeyboardInterrupt:
print 'interrupted'_______________________________________________
telepathy mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/telepathy