Hello,
Thanks for your response. I'm already working on a Loop DeviceInterface to just implement the `delete` method and `backingFile` attribute which I need for the dolphin plugin and since you seem interested I will try to create a merge request soon. After that, I'll think about how to create a loop device. Best regards, Kwon-Young Choi On 26/06/2020 16:08, Kevin Ottens wrote: > 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.