Exemple #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')
 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')
Exemple #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}', {})
Exemple #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')
Exemple #5
0
 def __init__(self):
     Backend.__init__(self)
     logging.debug('FastbootBackend')
     self.client = GUdev.Client(subsystems=['usb'])
 def __init__(self):
     Backend.__init__(self)