def _interfaces_added(self, object_path, interfaces_and_properties):
        """Internal method."""
        added = object_path not in self._objects
        self._objects.setdefault(object_path, {})
        old_state = copy(self._objects[object_path])
        self._objects[object_path].update(interfaces_and_properties)
        new_state = self._objects[object_path]
        if added:
            kind = object_kind(object_path)
            if kind in ('device', 'drive'):
                self.trigger('device_added', self[object_path])

        if Interface['Block'] in interfaces_and_properties:
            slave = self[object_path].luks_cleartext_slave
            if slave:
                if not self._has_job(slave.object_path, 'device_unlocked'):
                    self.trigger('device_unlocked', slave)

        if not added:
            self.trigger('device_changed',
                         self.get(object_path, old_state),
                         self.get(object_path, new_state))
def _interfaces_added ( self , object_path , interfaces_and_properties ) : added = object_path not in self . _objects self . _objects . setdefault ( object_path , { } ) old_state = copy ( self . _objects [ object_path ] ) self . _objects [ object_path ] . update ( interfaces_and_properties ) new_state = self . _objects [ object_path ] if added : kind = object_kind ( object_path ) if kind in ( 'device' , 'drive' ) : self . trigger ( 'device_added' , self [ object_path ] ) if Interface [ 'Block' ] in interfaces_and_properties : slave = self [ object_path ] . luks_cleartext_slave if slave : if not self . _has_job ( slave . object_path , 'device_unlocked' ) : self . trigger ( 'device_unlocked' , slave ) if not added : self . trigger ( 'device_changed' , self . get ( object_path , old_state ) , self . get ( object_path , new_state ) )
Internal method.