Skip to content

Use standard portal backend Request interface for cancellation #164

@iinuwa

Description

@iinuwa

There is a convention for setting up a request and cancelling it in other portals already: org.freedesktop.impl.portal.Request.

The Close method does what is currently on the org.freedesktop.impl.portal.experimental.Credential.Ceremony.Cancel() does, so it wouldn't very different, just a different interface and method name.

The UserInteracted::RequestCancelled event could be accomplished by listening for the InterfacesRemoved for the object path and org.freedesktop.impl.portal.experimental.Credential.Ceremony or org.freedesktop.impl.portal.Request interfaces. An application would need to do this anyway to be robust against the backend crashing and not emitting the RequestCancelled signal.

This would change the Initialize method to accept an object path generated by the frontend, which means that the frontend can subscribe to the UserInteracted signal before initializing the request, eliminating the need for the Ceremony.Start() method.

We should move in this direction for consistency and more robust cancellation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions