- cross-posted to:
- linux@programming.dev
- linux@lemmy.world
- cross-posted to:
- linux@programming.dev
- linux@lemmy.world
cross-posted from: https://feditown.com/post/3071906
Edit: To clarify, this is not my personal blog. It’s just intended to raise awareness and spread it around here as well. I just don’t believe in editorializing titles


I don’t know how you add a call to an API that doesn’t exist
as a solo dev, I honestly feel for him. It’s just too much work to actually even think about when you have other environments to support
As far as I know, these messages are passed to the portal using dbus. So the app could just fire the correct dbus message with correct parameters (you can find the correct values in the Wayland specs). The portal, used by the compositor, then takes the message and runs the requested action or returns something like not implemented or unknown method.
The trickier part is testing when no portal supports the API calls.
But yeah, interoperability between systems can be a pain in the ass.
The process is analogous to sending an http request. Your app sets up the httpclient and points it to a URI and after sending the request you get back either the content with 200 status or 404. If you get 404 you can show the user a message like “this website doesnt support feature xyz”