[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: Add loop device interface to Solid framework
From:       Kevin Ottens <ervin () kde ! org>
Date:       2020-06-26 14:08:31
Message-ID: 2351156.QEgEgRP31c () wintermute
[Download RAW message or body]


Hello,

Sorry for the slow reply time. :-)

On Monday, 15 June 2020 20:19:54 CEST Kwon-Young Choi wrote:
> Well, I don't know if it possible to make an optional action such as a
> delete method which would work only if the device is a loop device
> backed by a file.

That's totally doable, and probably a good idea to put it on a separate 
DeviceInterface.
 
> In my opinion, it would be better to check if the device is a loop
> device, if it is you can convert it to the Loop type and can call
> methods like `delete` and access properties like `backingFile`.

Exactly.

> However, I still have no idea where to put the create loop device method
> since there is no concept of a device manager in solid which can modify
> the global state of the system.

That's something I'd be a bit more wary of having into solid. We used to have 
a device manager concept in the API and well... let's say it didn't end up 
well.

The problem of having one is that it somehow starts behaving like an attractor 
for all kinds of weird features and we'd end up doing too much in solid.

Since it's something very specific to loop devices... if we rrrreally want it 
in solid (I suspect it's more something you'd want in the file manager and 
solid reacting to it) then maybe just this time we could have a static method 
in the future "LoopDevice" (or whatever name ends up picked) interface for 
creating those.

Just my 0.02€.

Regards.
-- 
Kevin Ottens, http://ervin.ipsquad.net

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic