当前位置: 首页>>代码示例>>Python>>正文


Python dbusutils.DBusIntrospectable类代码示例

本文整理汇总了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)
开发者ID:LudoBike,项目名称:quodlibet,代码行数:28,代码来源:mpris2.py

示例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)
开发者ID:bernd-wechner,项目名称:quodlibet,代码行数:27,代码来源:mediaserver.py

示例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)
开发者ID:SimonLarsen,项目名称:quodlibet,代码行数:19,代码来源:mpris.py


注:本文中的quodlibet.util.dbusutils.DBusIntrospectable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。