MCPcopy Create free account
hub / github.com/cocagne/txdbus / exportObject

Method exportObject

txdbus/objects.py:662–685  ·  view source on GitHub ↗

Makes the specified object available over DBus @type dbusObject: an object implementing the L{IDBusObject} interface @param dbusObject: The object to export over DBus

(self, dbusObject)

Source from the content-addressed store, hash-verified

660 p.connectionLost(reason)
661
662 def exportObject(self, dbusObject):
663 """
664 Makes the specified object available over DBus
665
666 @type dbusObject: an object implementing the L{IDBusObject} interface
667 @param dbusObject: The object to export over DBus
668 """
669 o = IDBusObject(dbusObject)
670 self.exports[o.getObjectPath()] = o
671 o.setObjectHandler(self)
672
673 i = {}
674 for iface in o.getInterfaces():
675 i[iface.name] = o.getAllProperties(iface.name)
676
677 msig = message.SignalMessage(
678 o.getObjectPath(),
679 'InterfacesAdded',
680 'org.freedesktop.DBus.ObjectManager',
681 signature='sa{sa{sv}}',
682 body=[o.getObjectPath(), i],
683 )
684
685 self.conn.sendMessage(msig)
686
687 def unexportObject(self, objectPath):
688 """

Callers 7

__init__Method · 0.45
_connectedMethod · 0.45
test_unexport_objectsMethod · 0.45
senditMethod · 0.45
on_proxyMethod · 0.45
mainFunction · 0.45

Calls 6

getObjectPathMethod · 0.95
setObjectHandlerMethod · 0.95
getInterfacesMethod · 0.95
getAllPropertiesMethod · 0.95
IDBusObjectClass · 0.85
sendMessageMethod · 0.45

Tested by 5

_connectedMethod · 0.36
test_unexport_objectsMethod · 0.36
senditMethod · 0.36
on_proxyMethod · 0.36