## org.freedesktop.portal.Flatpak.UpdateMonitor org.freedesktop.portal.Flatpak.UpdateMonitor |

## Methods

    Close  ();
    Update (IN  s     parent_window,
            IN  a{sv} options);

## Signals

    UpdateAvailable (a{sv} update_info);
    Progress        (a{sv} info);

## Description

## Method Details

### The Close() method

    Close ();

Ends the update monitoring and cancels any ongoing installation.

### The Update() method

    Update (IN  s     parent_window,
            IN  a{sv} options);

see Common Conventions `options`: Vardict with optional further information

Asks to install an update of the calling app. During the installation, "Progress" signals will be emitted to communicate the status and progress.

Note that updates are only allowed if the new version has the same permissions (or less) than the currently installed version. If the new version requires a new permission then the operation will fail with the error org.freedesktop.DBus.Error.NotSupported and updates has to be done with the system tools.

Currently, no options are accepted.

`IN s `parent_window``: | Identifier for the application window,
`IN a{sv} `options``: |

## Signal Details

### The "UpdateAvailable" signal

    UpdateAvailable (a{sv} update_info);

Gets emitted when a new update is available. This is only sent once with the same information, but can be sent many times if new updates appear.

The following information may be included in the `update_info` dictionary:

running-commit s | The commit of the currently running instance.
local-commit s | The commit that is currently installed. Restarting the application will cause this commit to be used.
remote-commit s | The commit that is available as an update from the remote. Updating the application will deploy this commit.

`a{sv} `update_info``: | More information about the available update

### The "Progress" signal

    Progress (a{sv} info);

Gets emitted to indicate progress of the installation. It's undefined exactly how often this is sent, but it will be emitted at least once at the end with non-zero status field. For each successful operation in the update we're also guaranteed to send one (and only one) signal with progress 100.

The following fields may be included in the info:

n_ops u | The number of operations that the update consists of.
op u | The position of the currently active operation.
progress u | The progress of the currently active operation, as a number between 0 and 100.
status u | The overall status of the update.
0: Running
1: Empty. No update to install
2: Done
3: Failed
error s | The error name, sent when status is Failed
error_message s | The error message, sent when status is Failed

`a{sv} `info``: | More information about the update progress