Пример #1
0
 def __init__(self, allow_system_internal=False, bus=None, show_all=False):
     Backend.__init__(self)
     self.mounted_source = ''
     self.formatting = []
     self.show_all = show_all
     self.allow_system_internal = allow_system_internal
     logging.debug('UDisksBackend')
     DBusGMainLoop(set_as_default=True)
     if bus:
         self.bus = bus
     else:
         self.bus = dbus.SystemBus()
     udisks_obj = self.bus.get_object(DISKS_IFACE,
                                      '/org/freedesktop/UDisks')
     self.udisks = dbus.Interface(udisks_obj, DISKS_IFACE)
     self.helper = self.bus.get_object('com.ubuntu.USBCreator',
                                       '/com/ubuntu/USBCreator')
     self.helper = dbus.Interface(self.helper, 'com.ubuntu.USBCreator')
Пример #2
0
 def __init__(self, allow_system_internal=False, bus=None, show_all=False):
     Backend.__init__(self)
     self.mounted_source = ''
     self.formatting = []
     self.show_all = show_all
     self.allow_system_internal = allow_system_internal
     logging.debug('UDisksBackend')
     DBusGMainLoop(set_as_default=True)
     if bus:
         self.bus = bus
     else:
         self.bus = dbus.SystemBus()
     udisks_obj = self.bus.get_object(DISKS_IFACE,
                                      '/org/freedesktop/UDisks')
     self.udisks = dbus.Interface(udisks_obj, DISKS_IFACE)
     self.helper = self.bus.get_object('com.ubuntu.USBCreator',
                                       '/com/ubuntu/USBCreator')
     self.helper = dbus.Interface(self.helper, 'com.ubuntu.USBCreator')
Пример #3
0
    def __init__(self, allow_system_internal=False, bus=None):
        Backend.__init__(self)
        self.handles = []
        self.allow_system_internal = allow_system_internal
        logging.debug('UDisks2Backend')
        DBusGMainLoop(set_as_default=True)
        threads_init()
        if bus:
            self.bus = bus
        else:
            self.bus = dbus.SystemBus()

        self.udisks = UDisks.Client.new_sync(None)

        self.helper = self.bus.get_object('com.ubuntu.USBCreator',
                                          '/com/ubuntu/USBCreator')
        self.helper = dbus.Interface(self.helper, 'com.ubuntu.USBCreator')
        self.helper.connect_to_signal('Progress', self.got_progress)
        self.no_options = GLib.Variant('a{sv}', {})
Пример #4
0
    def __init__(self, allow_system_internal=False, bus=None, show_all=False):
        Backend.__init__(self)
        self.mounted_source = ''
        self.formatting = []
        self.handles = []
        self.show_all = show_all
        self.allow_system_internal = allow_system_internal
        logging.debug('UDisks2Backend')
        DBusGMainLoop(set_as_default=True)
        threads_init()
        if bus:
            self.bus = bus
        else:
            self.bus = dbus.SystemBus()

        self.udisks = UDisks.Client.new_sync(None)

        self.helper = self.bus.get_object('com.ubuntu.USBCreator',
                                          '/com/ubuntu/USBCreator')
        self.helper = dbus.Interface(self.helper, 'com.ubuntu.USBCreator')
Пример #5
0
 def __init__(self):
     Backend.__init__(self)
     logging.debug('FastbootBackend')
     self.client = GUdev.Client(subsystems=['usb'])
Пример #6
0
 def __init__(self):
     Backend.__init__(self)