Factor out a helper function
Factor out a helper function

Exporting a portal implementation is worth its own helper
function, to avoid lots of repetition.

matthiasclasen/xdg-desktop-portal,matthiasclasen/xdg-desktop-portal,flatpak/xdg-desktop-portal,matthiasclasen/xdg-desktop-portal,matthiasclasen/xdg-desktop-portal,flatpak/xdg-desktop-portal,flatpak/xdg-desktop-portal,matthiasclasen/xdg-desktop-portal,flatpak/xdg-desktop-portal