# telamon-framework-flatpak

> The Rust crate for Flatpak updates through libflatpak, used by Telamon Updater and the future Telamon Store, with update listing, update runs and a check for newly requested permissions.

`telamon-framework-flatpak` lists and runs Flatpak updates through libflatpak. It exists for Telamon Updater and the future Telamon Store; an app that does not manage Flatpaks does not need it.

System installations go through flatpak's own system helper, which asks polkit itself, so the Telamon system helper is not involved. The calls block, so run them on a worker thread, never on a UI thread.

## Add it

```toml
telamon-framework-flatpak = { git = "https://github.com/EternalCoder454/atlas-framework", tag = "v2.0.0" }
```

The commit is the one tagged `v1.4.0`. Pin apps to a commit or a release tag and build with `cargo build --locked`. It needs `flatpak-devel` to build (the `libflatpak` 0.7 bindings link libflatpak), so a build container needs that package.

## Features

None.

## Pages

| Page | What it covers |
|---|---|
| [Updates](https://telamon.eterneon.net/framework/telamon-framework-flatpak/updates.md) | Listing updates, running them, options, progress, outcome and errors |
| [Permissions](https://telamon.eterneon.net/framework/telamon-framework-flatpak/permissions.md) | `new_permissions` and the strings that report held-back apps |

## Crate root

| Name | Kind | Description |
|---|---|---|
| `InstallationKind`, `AppUpdate`, `Progress`, `Updated`, `Held`, `Outcome`, `UpdateOptions`, `CancelToken`, `ListOptions`, `ListOutcome`, `InstallationError`, `DEFAULT_CALL_TIMEOUT` | types | See [Updates](https://telamon.eterneon.net/framework/telamon-framework-flatpak/updates.md) |
| `Error`, `Result` | types | See [Updates](https://telamon.eterneon.net/framework/telamon-framework-flatpak/updates.md#errors-and-text-from-remotes) |
| `list_updates`, `list_updates_with`, `list_updates_report`, `update_all`, `update`, `update_cancellable` | functions | See [Updates](https://telamon.eterneon.net/framework/telamon-framework-flatpak/updates.md) |
| `clean`, `clean_to` | functions | Make text from a remote safe to show |
| `new_permissions`, `UNREADABLE`, `UNMATCHED`, `NEW_APP` | function and constants | See [Permissions](https://telamon.eterneon.net/framework/telamon-framework-flatpak/permissions.md) |


## Pages

- [Updates](https://telamon.eterneon.net/framework/telamon-framework-flatpak/updates.md): Listing the Flatpak updates available in the system and user installations, running them with progress, and the types that describe the result.
- [Permissions](https://telamon.eterneon.net/framework/telamon-framework-flatpak/permissions.md): new\_permissions compares two Flatpak metadata files and lists what the new one grants that the old one did not, which is how an update can be held back until the user approves.
