# vim:ft=apparmor
# ------------------------------------------------------------------
#
#    Copyright (C) 2026 Canonical Ltd.
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License published by the Free Software Foundation.
#
# ------------------------------------------------------------------

  # https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.FileTransfer.html

  abi <abi/5.0>,

  dbus send
       bus=session
       path=/org/freedesktop/portal/desktop
       interface=org.freedesktop.portal.FileTransfer
       member={StartTransfer,AddFiles,RetrieveFiles,StopTransfer},

  dbus receive
       bus=session
       path=/org/freedesktop/portal/desktop
       interface=org.freedesktop.portal.FileTransfer
       member=TransferClosed,

  dbus (send)
       bus=session
       path=/org/freedesktop/portal/desktop
       interface=org.freedesktop.DBus.Properties
       member={Get,GetAll},

  # Include additions to the abstraction
  include if exists <abstractions/dbus-xdg/portal-file-transfer.d>
