From kde-frameworks-devel Fri Jun 26 14:08:31 2020 From: Kevin Ottens Date: Fri, 26 Jun 2020 14:08:31 +0000 To: kde-frameworks-devel Subject: Re: Add loop device interface to Solid framework Message-Id: <2351156.QEgEgRP31c () wintermute> X-MARC-Message: https://marc.info/?l=kde-frameworks-devel&m=159318052020823 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1974113.NA035lN9cy" --nextPart1974113.NA035lN9cy Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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=20 DeviceInterface. =20 > 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 ha= ve=20 a device manager concept in the API and well... let's say it didn't end up= =20 well. The problem of having one is that it somehow starts behaving like an attrac= tor=20 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=20 in solid (I suspect it's more something you'd want in the file manager and= =20 solid reacting to it) then maybe just this time we could have a static meth= od=20 in the future "LoopDevice" (or whatever name ends up picked) interface for= =20 creating those. Just my 0.02=E2=82=AC. Regards. =2D-=20 Kevin Ottens, http://ervin.ipsquad.net --nextPart1974113.NA035lN9cy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQXFmpSdcX6bxpI/XgHS7vLjezJ4gUCXvYBXwAKCRAHS7vLjezJ 4kUJAKCjFmllppXBluepca0jqP0HVkkUBgCggbkuAW+kZuVQlJxoz95Q0WqypeQ= =QJkY -----END PGP SIGNATURE----- --nextPart1974113.NA035lN9cy--