本文整理汇总了Python中quodlibet.util.dbusutils.DBusIntrospectable类的典型用法代码示例。如果您正苦于以下问题:Python DBusIntrospectable类的具体用法?Python DBusIntrospectable怎么用?Python DBusIntrospectable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DBusIntrospectable类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
DBusIntrospectable.__init__(self)
DBusProperty.__init__(self)
self.set_introspection(MPRIS2.ROOT_IFACE, MPRIS2.ROOT_ISPEC)
self.set_properties(MPRIS2.ROOT_IFACE, MPRIS2.ROOT_PROPS)
self.set_introspection(MPRIS2.PLAYER_IFACE, MPRIS2.PLAYER_ISPEC)
self.set_properties(MPRIS2.PLAYER_IFACE, MPRIS2.PLAYER_PROPS)
bus = dbus.SessionBus()
name = dbus.service.BusName(self.BUS_NAME, bus)
MPRISObject.__init__(self, bus, self.PATH, name)
self.__metadata = None
self.__cover = None
player_options = app.player_options
self.__repeat_id = player_options.connect(
"notify::repeat", self.__repeat_changed)
self.__random_id = player_options.connect(
"notify::shuffle", self.__shuffle_changed)
self.__single_id = player_options.connect(
"notify::single", self.__single_changed)
self.__lsig = app.librarian.connect("changed", self.__library_changed)
self.__vsig = app.player.connect("notify::volume",
self.__volume_changed)
self.__seek_sig = app.player.connect("seek", self.__seeked)
示例2: __init__
def __init__(self, parent, library):
DBusIntrospectable.__init__(self)
DBusPropertyFilter.__init__(self)
MediaObject.__init__(self, parent)
MediaContainer.__init__(self)
bus = dbus.SessionBus()
self.ref = dbus.service.BusName(BUS_NAME, bus)
dbus.service.FallbackObject.__init__(self, bus, self.PATH)
parent.register_child(self)
self.__library = library.albums
self.__library.load()
self.__map = dict((id(v), v) for v in self.__library.itervalues())
self.__reverse = dict((v, k) for k, v in self.__map.iteritems())
signals = [
("changed", self.__albums_changed),
("removed", self.__albums_removed),
("added", self.__albums_added),
]
self.__sigs = map(
lambda x: self.__library.connect(x[0], x[1]), signals)
self.__dummy = DummyAlbumObject(self)
示例3: __init__
def __init__(self):
DBusIntrospectable.__init__(self)
DBusProperty.__init__(self)
self.set_introspection(MPRIS2.ROOT_IFACE, MPRIS2.ROOT_ISPEC)
self.set_properties(MPRIS2.ROOT_IFACE, MPRIS2.ROOT_PROPS)
self.set_introspection(MPRIS2.PLAYER_IFACE, MPRIS2.PLAYER_ISPEC)
self.set_properties(MPRIS2.PLAYER_IFACE, MPRIS2.PLAYER_PROPS)
bus = dbus.SessionBus()
name = dbus.service.BusName(self.BUS_NAME, bus)
MPRISObject.__init__(self, bus, self.PATH, name)
self.__rsig = app.window.repeat.connect("toggled", self.__repeat_changed)
self.__ssig = app.window.order.connect("changed", self.__order_changed)
self.__lsig = app.librarian.connect("changed", self.__library_changed)
self.__vsig = app.player.connect("notify::volume", self.__volume_changed)
self.__seek_sig = app.player.connect("seek", self.__seeked)