Add loop device interface to Solid framework

Kevin Ottens ervin at kde.org
Fri Jun 26 15:08:31 BST 2020


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200626/815a3de5/attachment.sig>


More information about the Kde-frameworks-devel mailing list