diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e62cc73..f1955ed6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: - name: Install Dependencies run: | apt update - apt install -y desktop-file-utils gettext meson libaccountsservice-dev libgtk-3-dev libgee-0.8-dev libgranite-dev libhandy-1-dev libxml2-dev libjson-glib-dev libgnomekbd-dev libpolkit-gobject-1-dev libpwquality-dev libxml2-utils valac + apt install -y desktop-file-utils gettext meson libaccountsservice-dev libflatpak-dev libgtk-3-dev libgee-0.8-dev libgranite-dev libhandy-1-dev libxml2-dev libjson-glib-dev libgnomekbd-dev libpolkit-gobject-1-dev libpwquality-dev libxml2-utils valac - name: Build run: | meson build diff --git a/README.md b/README.md index 76141727..46e06271 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ You'll need the following dependencies: * gettext * granite >= 0.5 * libaccountsservice-dev +* libflatpak-dev * libgnomekbd-dev * libgtk-3-dev * libhandy-1-dev diff --git a/meson.build b/meson.build index 0dacbcf7..caeea935 100644 --- a/meson.build +++ b/meson.build @@ -12,6 +12,7 @@ gnome = import('gnome') i18n = import('i18n') accountservice_dep = dependency('accountsservice') +flatpak_dep = dependency ('flatpak') gee_dep = dependency('gee-0.8') glib_dep = dependency('glib-2.0') gobject_dep = dependency('gobject-2.0') @@ -26,6 +27,7 @@ xml2_dep = dependency('libxml-2.0') dependencies = [ accountservice_dep, + flatpak_dep, gee_dep, glib_dep, gobject_dep, diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 09a04563..bf483af5 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -24,6 +24,8 @@ public class Installer.MainWindow : Hdy.Window { private LanguageView language_view; private KeyboardLayoutView keyboard_layout_view; private NetworkView network_view; + private ProgressView progress_view; + private SoftwareView software_view; construct { language_view = new LanguageView (); @@ -71,7 +73,24 @@ public class Installer.MainWindow : Hdy.Window { deck.add (network_view); deck.visible_child = network_view; - network_view.next_step.connect (load_account_view); + network_view.next_step.connect (load_software_view); + } else { + load_software_view (); + } + } + + private void load_software_view () { + if (software_view != null) { + software_view.destroy (); + } + + if (NetworkMonitor.get_default ().get_network_available ()) { + software_view = new SoftwareView (); + + deck.add (software_view); + deck.visible_child = software_view; + + software_view.next_step.connect (load_account_view); } else { load_account_view (); } @@ -86,5 +105,20 @@ public class Installer.MainWindow : Hdy.Window { deck.add (account_view); deck.visible_child = account_view; + + account_view.next_step.connect (on_finish); + } + + private void on_finish () { + if (progress_view != null) { + progress_view.destroy (); + } + + progress_view = new ProgressView (); + + deck.add (progress_view); + deck.visible_child = progress_view; + + progress_view.start_setup (); } } diff --git a/src/Objects/Configuration.vala b/src/Objects/Configuration.vala index dd8c74a9..92cb5bd3 100644 --- a/src/Objects/Configuration.vala +++ b/src/Objects/Configuration.vala @@ -33,4 +33,9 @@ public class Configuration : GLib.Object { public InitialSetup.KeyboardLayout keyboard_layout { get; set; } public InitialSetup.KeyboardVariant? keyboard_variant { get; set; default = null; } public bool left_handed { get; set; } + public bool install_additional_media_formats { get; set; default = false; } + public string realname { get; set; } + public string username { get; set; } + public string password { get; set; } + public string hostname { get; set; } } diff --git a/src/Views/AccountView.vala b/src/Views/AccountView.vala index 3013abe5..f9f9354f 100644 --- a/src/Views/AccountView.vala +++ b/src/Views/AccountView.vala @@ -28,24 +28,6 @@ public class Installer.AccountView : AbstractInstallerView { } } - private Polkit.Permission? _permission = null; - private Polkit.Permission? permission { - get { - if (_permission != null) { - return _permission; - } - - try { - _permission = new Polkit.Permission.sync ("org.freedesktop.accounts.user-administration", new Polkit.UnixProcess (Posix.getpid ())); - } catch (Error e) { - critical (e.message); - } - - return _permission; - } - } - - private Act.User? created_user = null; private ErrorRevealer confirm_entry_revealer; private ErrorRevealer pw_error_revealer; private ErrorRevealer username_error_revealer; @@ -191,7 +173,7 @@ public class Installer.AccountView : AbstractInstallerView { update_finish_button (); }); - finish_button.clicked.connect (create_new_user); + finish_button.clicked.connect (on_finish_button_clicked); show_all (); @@ -199,6 +181,16 @@ public class Installer.AccountView : AbstractInstallerView { realname_entry.grab_focus (); } + private void on_finish_button_clicked () { + unowned var configuration = Configuration.get_default (); + configuration.realname = realname_entry.text; + configuration.username = username_entry.text; + configuration.password = pw_entry.text; + configuration.hostname = hostname_entry.text; + + next_step (); + } + private bool check_password () { if (pw_entry.text == "") { confirm_entry.text = ""; @@ -286,146 +278,6 @@ public class Installer.AccountView : AbstractInstallerView { } } - private void create_new_user () { - string? primary_text = null; - string? error_message = null; - - if (permission != null && permission.allowed) { - try { - created_user = user_manager.create_user (username_entry.text, realname_entry.text, Act.UserAccountType.ADMINISTRATOR); - set_settings.begin ((obj, res) => { - set_settings.end (res); - - Application.get_default ().quit (); - }); - } catch (Error e) { - if (created_user != null) { - try { - user_manager.delete_user (created_user, true); - } catch (Error e) { - critical ("Unable to clean up failed user: %s", e.message); - } - } - - primary_text = _("Creating an account for “%s” failed").printf (username_entry.text); - error_message = e.message; - } - } else { - primary_text = _("Couldn't get permission to create an account for “%s”").printf (username_entry.text); - } - - if (primary_text != null) { - var error_dialog = new Granite.MessageDialog.with_image_from_icon_name ( - primary_text, - _("Initial Setup could not create this account. Without it, you will not be able to log in and may need to reinstall the OS."), - "system-users", - Gtk.ButtonsType.CLOSE - ) { - badge_icon = new ThemedIcon ("dialog-error"), - modal = true, - transient_for = (Gtk.Window) get_toplevel () - }; - - if (error_message != null) { - error_dialog.show_error_details (error_message); - } - - error_dialog.present (); - error_dialog.response.connect (error_dialog.destroy); - } - } - - private async void set_settings () { - created_user.set_password (pw_entry.text, ""); - yield set_accounts_service_settings (); - yield set_locale (); - set_hostname (hostname_entry.text); - } - - public bool set_hostname (string hostname) { - string? primary_text = null; - string? error_message = null; - - try { - var permission = new Polkit.Permission.sync ("org.freedesktop.hostname1.set-static-hostname", new Polkit.UnixProcess (Posix.getpid ())); - - if (permission != null && permission.allowed) { - Utils.get_hostname_interface_instance (); - Utils.hostname_interface_instance.set_pretty_hostname (hostname, false); - Utils.hostname_interface_instance.set_static_hostname (Utils.gen_hostname (hostname), false); - } else { - primary_text = _("Couldn't get permission to name this device “%s”").printf (hostname); - } - } catch (GLib.Error e) { - primary_text = _("Unable to name this device “%s”").printf (hostname); - error_message = e.message; - } - - if (primary_text != null) { - var error_dialog = new Granite.MessageDialog.with_image_from_icon_name ( - primary_text, - _("Initial Setup could not set your hostname."), - "dialog-error", - Gtk.ButtonsType.CLOSE - ) { - modal = true, - transient_for = (Gtk.Window) get_toplevel () - }; - - if (error_message != null) { - error_dialog.show_error_details (error_message); - } - - error_dialog.present (); - error_dialog.response.connect (error_dialog.destroy); - - return false; - } - - return true; - } - - private async void set_locale () { - string lang = Configuration.get_default ().lang; - string? locale = null; - bool success = yield LocaleHelper.language2locale (lang, out locale); - - if (!success || locale == null || locale == "") { - warning ("Falling back to setting unconverted language as user's locale, may result in incorrect language"); - created_user.set_language (lang); - } else { - created_user.set_language (locale); - } - } - - private async void set_accounts_service_settings () { - AccountsService accounts_service = null; - - try { - var act_service = yield GLib.Bus.get_proxy (GLib.BusType.SYSTEM, - "org.freedesktop.Accounts", - "/org/freedesktop/Accounts"); - var user_path = act_service.find_user_by_name (created_user.user_name); - - accounts_service = yield GLib.Bus.get_proxy (GLib.BusType.SYSTEM, - "org.freedesktop.Accounts", - user_path, - GLib.DBusProxyFlags.GET_INVALIDATED_PROPERTIES); - } catch (Error e) { - warning ("Unable to get AccountsService proxy, settings on new user may be incorrect: %s", e.message); - } - - if (accounts_service != null) { - var layouts = Configuration.get_default ().keyboard_layout.to_accountsservice_array (); - if (Configuration.get_default ().keyboard_variant != null) { - layouts = Configuration.get_default ().keyboard_variant.to_accountsservice_array (); - } - - accounts_service.keyboard_layouts = layouts; - accounts_service.left_handed = Configuration.get_default ().left_handed; - } - } - private bool is_taken_username (string username) { foreach (unowned Act.User user in user_manager.list_users ()) { if (user.get_user_name () == username) { diff --git a/src/Views/ProgressView.vala b/src/Views/ProgressView.vala new file mode 100644 index 00000000..f98e9a74 --- /dev/null +++ b/src/Views/ProgressView.vala @@ -0,0 +1,290 @@ +/*- + * Copyright 2023 elementary, Inc. (https://elementary.io) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * Authored by: Marius Meisenzahl + */ + +public class Installer.ProgressView : AbstractInstallerView { + public Gtk.ProgressBar progressbar; + public Gtk.Label progressbar_label; + + private Act.User? created_user = null; + + private Act.UserManager _user_manager = null; + private Act.UserManager user_manager { + get { + if (_user_manager != null && _user_manager.is_loaded) { + return _user_manager; + } + + _user_manager = Act.UserManager.get_default (); + return _user_manager; + } + } + + private Polkit.Permission? _permission = null; + private Polkit.Permission? permission { + get { + if (_permission != null) { + return _permission; + } + + try { + _permission = new Polkit.Permission.sync ("org.freedesktop.accounts.user-administration", new Polkit.UnixProcess (Posix.getpid ())); + } catch (Error e) { + critical (e.message); + } + + return _permission; + } + } + + construct { + var logo = new Gtk.Image (); + logo.icon_name = "distributor-logo"; + logo.pixel_size = 128; + logo.get_style_context ().add_class ("logo"); + + var logo_stack = new Gtk.Stack (); + logo_stack.transition_type = Gtk.StackTransitionType.OVER_UP_DOWN; + logo_stack.add (logo); + + progressbar_label = new Gtk.Label (null); + progressbar_label.xalign = 0; + progressbar_label.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL); + + progressbar = new Gtk.ProgressBar (); + progressbar.hexpand = true; + + var progress_grid = new Gtk.Grid () { + column_homogeneous = true, + column_spacing = 12, + row_spacing = 12, + expand = true, + hexpand = true, + orientation = Gtk.Orientation.VERTICAL + }; + progress_grid.attach (logo_stack, 0, 0, 2, 1); + progress_grid.attach (progressbar_label, 0, 1, 1, 1); + progress_grid.attach (progressbar, 0, 2, 2, 1); + + content_area.margin_end = 22; + content_area.margin_start = 22; + content_area.add (progress_grid); + + get_style_context ().add_class ("progress-view"); + + show_all (); + } + + public void start_setup () { + string? primary_text = null; + string? error_message = null; + + unowned var configuration = Configuration.get_default (); + var realname = configuration.realname; + var username = configuration.username; + + if (permission != null && permission.allowed) { + try { + progressbar_label.label = _("Create account"); + created_user = user_manager.create_user (username, realname, Act.UserAccountType.ADMINISTRATOR); + set_settings.begin ((obj, res) => { + set_settings.end (res); + + Application.get_default ().quit (); + }); + } catch (Error e) { + if (created_user != null) { + try { + user_manager.delete_user (created_user, true); + } catch (Error e) { + critical ("Unable to clean up failed user: %s", e.message); + } + } + + primary_text = _("Creating an account for “%s” failed").printf (username); + error_message = e.message; + } + } else { + primary_text = _("Couldn't get permission to create an account for “%s”").printf (username); + } + + if (primary_text != null) { + var error_dialog = new Granite.MessageDialog.with_image_from_icon_name ( + primary_text, + _("Initial Setup could not create this account. Without it, you will not be able to log in and may need to reinstall the OS."), + "system-users", + Gtk.ButtonsType.CLOSE + ) { + badge_icon = new ThemedIcon ("dialog-error"), + modal = true, + transient_for = (Gtk.Window) get_toplevel () + }; + + if (error_message != null) { + error_dialog.show_error_details (error_message); + } + + error_dialog.present (); + error_dialog.response.connect (error_dialog.destroy); + } + } + + private async void set_settings () { + progressbar_label.label = _("Set password"); + created_user.set_password (Configuration.get_default ().password, ""); + yield set_accounts_service_settings (); + yield set_locale (); + set_hostname (Configuration.get_default ().hostname); + install_software (); + } + + public bool set_hostname (string hostname) { + progressbar_label.label = _("Set hostname"); + string? primary_text = null; + string? error_message = null; + + try { + var permission = new Polkit.Permission.sync ("org.freedesktop.hostname1.set-static-hostname", new Polkit.UnixProcess (Posix.getpid ())); + + if (permission != null && permission.allowed) { + Utils.get_hostname_interface_instance (); + Utils.hostname_interface_instance.set_pretty_hostname (hostname, false); + Utils.hostname_interface_instance.set_static_hostname (Utils.gen_hostname (hostname), false); + } else { + primary_text = _("Couldn't get permission to name this device “%s”").printf (hostname); + } + } catch (GLib.Error e) { + primary_text = _("Unable to name this device “%s”").printf (hostname); + error_message = e.message; + } + + if (primary_text != null) { + var error_dialog = new Granite.MessageDialog.with_image_from_icon_name ( + primary_text, + _("Initial Setup could not set your hostname."), + "dialog-error", + Gtk.ButtonsType.CLOSE + ) { + modal = true, + transient_for = (Gtk.Window) get_toplevel () + }; + + if (error_message != null) { + error_dialog.show_error_details (error_message); + } + + error_dialog.present (); + error_dialog.response.connect (error_dialog.destroy); + + return false; + } + + return true; + } + + private async void set_locale () { + progressbar_label.label = _("Set locale"); + string lang = Configuration.get_default ().lang; + string? locale = null; + bool success = yield LocaleHelper.language2locale (lang, out locale); + + if (!success || locale == null || locale == "") { + warning ("Falling back to setting unconverted language as user's locale, may result in incorrect language"); + created_user.set_language (lang); + } else { + created_user.set_language (locale); + } + } + + private async void set_accounts_service_settings () { + progressbar_label.label = _("Set account settings"); + AccountsService accounts_service = null; + + try { + var act_service = yield GLib.Bus.get_proxy (GLib.BusType.SYSTEM, + "org.freedesktop.Accounts", + "/org/freedesktop/Accounts"); + var user_path = act_service.find_user_by_name (created_user.user_name); + + accounts_service = yield GLib.Bus.get_proxy (GLib.BusType.SYSTEM, + "org.freedesktop.Accounts", + user_path, + GLib.DBusProxyFlags.GET_INVALIDATED_PROPERTIES); + } catch (Error e) { + warning ("Unable to get AccountsService proxy, settings on new user may be incorrect: %s", e.message); + } + + if (accounts_service != null) { + var layouts = Configuration.get_default ().keyboard_layout.to_accountsservice_array (); + if (Configuration.get_default ().keyboard_variant != null) { + layouts = Configuration.get_default ().keyboard_variant.to_accountsservice_array (); + } + + accounts_service.keyboard_layouts = layouts; + accounts_service.left_handed = Configuration.get_default ().left_handed; + } + } + + private string? architecture () { + try { + string standard_output; + int exit_status; + Process.spawn_command_line_sync ("/usr/bin/uname -p", + out standard_output, + null, + out exit_status); + + if (exit_status == 0) { + return standard_output.strip (); + } + } catch (SpawnError e) { + warning (e.message); + } + + return null; + } + + private void install_software () { + var arch = architecture (); + if (arch == null) { + return; + } + + const string REMOTE = "freedesktop"; + string _ref = "runtime/org.freedesktop.Platform.ffmpeg-full/%s/22.08".printf (arch); + + var install_additional_media_formats = Configuration.get_default ().install_additional_media_formats; + + if (!install_additional_media_formats) { + return; + } + + progressbar_label.label = _("Install Software"); + + try { + var system_installation = new Flatpak.Installation.system (); + + Flatpak.Transaction transaction; + transaction = new Flatpak.Transaction.for_installation (system_installation); + transaction.add_default_dependency_sources (); + transaction.add_install (REMOTE, _ref, null); + transaction.run (); + } catch (Error e) { + warning ("Unable to install additional software: %s", e.message); + } + } +} diff --git a/src/Views/SoftwareView.vala b/src/Views/SoftwareView.vala new file mode 100644 index 00000000..b30caf5e --- /dev/null +++ b/src/Views/SoftwareView.vala @@ -0,0 +1,77 @@ +/*- + * Copyright 2023 elementary, Inc. (https://elementary.io) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * Authored by: Marius Meisenzahl + */ + +public class Installer.SoftwareView : AbstractInstallerView { + construct { + var image = new Gtk.Image.from_icon_name ("system-software-update", Gtk.IconSize.DIALOG) { + pixel_size = 128, + valign = Gtk.Align.END + }; + + var title_label = new Gtk.Label (_("Software")); + + var form_grid = new Gtk.Grid (); + form_grid.row_spacing = 3; + form_grid.valign = Gtk.Align.CENTER; + form_grid.vexpand = true; + + var additional_media_formats_name_label = new Gtk.Label (_("Install additional media formats")); + additional_media_formats_name_label.get_style_context ().add_class (Granite.STYLE_CLASS_H3_LABEL); + additional_media_formats_name_label.halign = Gtk.Align.START; + additional_media_formats_name_label.hexpand = true; + + var additional_media_formats_description_label = new Gtk.Label (_("This software is subject to license terms included with its documentation. Some is propietary.")); + additional_media_formats_description_label.wrap = true; + additional_media_formats_description_label.xalign = 0; + + var additional_media_formats_switch = new Gtk.Switch (); + additional_media_formats_switch.valign = Gtk.Align.CENTER; + + unowned var configuration = Configuration.get_default (); + configuration.bind_property ("install_additional_media_formats", additional_media_formats_switch, "active", BindingFlags.BIDIRECTIONAL); + + form_grid.attach (additional_media_formats_name_label, 0, 0); + form_grid.attach (additional_media_formats_description_label, 0, 1); + form_grid.attach (additional_media_formats_switch, 1, 0, 1, 2); + + title_area.add (image); + title_area.add (title_label); + + content_area.add (form_grid); + + var back_button = new Gtk.Button.with_label (_("Back")) { + width_request = 86 + }; + + var next_button = new Gtk.Button.with_label (_("Next")); + next_button.sensitive = true; + next_button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION); + + action_area.add (back_button); + action_area.add (next_button); + + back_button.clicked.connect (() => ((Hdy.Deck) get_parent ()).navigate (Hdy.NavigationDirection.BACK)); + next_button.clicked.connect (on_next_button_clicked); + + show_all (); + } + + private void on_next_button_clicked () { + next_step (); + } +} diff --git a/src/meson.build b/src/meson.build index 17a3d6af..602b6485 100644 --- a/src/meson.build +++ b/src/meson.build @@ -13,6 +13,8 @@ vala_files = [ 'Views/KeyboardLayoutView.vala', 'Views/LanguageView.vala', 'Views/NetworkView.vala', + 'Views/ProgressView.vala', + 'Views/SoftwareView.vala', 'Widgets/VariantWidget.vala' ] diff --git a/vapi/Flatpak-1.0.metadata b/vapi/Flatpak-1.0.metadata new file mode 100644 index 00000000..67d07c0e --- /dev/null +++ b/vapi/Flatpak-1.0.metadata @@ -0,0 +1,3 @@ +Transaction.operation_done.commit nullable +TransactionErrorDetails.fatal name="non_fatal" +TransactionErrorDetails cprefix="FLATPAK_TRANSACTION_ERROR_DETAILS_" diff --git a/vapi/flatpak.vapi b/vapi/flatpak.vapi new file mode 100644 index 00000000..4f767d50 --- /dev/null +++ b/vapi/flatpak.vapi @@ -0,0 +1,551 @@ +/* flatpak.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Flatpak", gir_namespace = "Flatpak", gir_version = "1.0", lower_case_cprefix = "flatpak_")] +namespace Flatpak { + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_bundle_ref_get_type ()")] + public class BundleRef : Flatpak.Ref { + [CCode (has_construct_function = false)] + public BundleRef (GLib.File file) throws GLib.Error; + public GLib.Bytes get_appstream (); + public GLib.File get_file (); + public GLib.Bytes get_icon (int size); + public uint64 get_installed_size (); + public GLib.Bytes get_metadata (); + public string get_origin (); + [Version (since = "0.8.0")] + public string get_runtime_repo_url (); + public GLib.File file { owned get; construct; } + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_installation_get_type ()")] + public class Installation : GLib.Object { + [CCode (has_construct_function = false)] + protected Installation (); + [Version (since = "1.3.4")] + public bool add_remote (Flatpak.Remote remote, bool if_needed, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "0.10.0")] + public bool cleanup_local_refs_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.FileMonitor create_monitor (GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool drop_caches (GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.Bytes fetch_remote_metadata_sync (string remote_name, Flatpak.Ref @ref, GLib.Cancellable? cancellable = null) throws GLib.Error; + public Flatpak.RemoteRef fetch_remote_ref_sync (string remote_name, Flatpak.RefKind kind, string name, string? arch, string? branch, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "1.3.3")] + public Flatpak.RemoteRef fetch_remote_ref_sync_full (string remote_name, Flatpak.RefKind kind, string name, string? arch, string? branch, Flatpak.QueryFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool fetch_remote_size_sync (string remote_name, Flatpak.Ref @ref, out uint64 download_size, out uint64 installed_size, GLib.Cancellable? cancellable = null) throws GLib.Error; + [CCode (has_construct_function = false)] + public Installation.for_path (GLib.File path, bool user, GLib.Cancellable? cancellable = null) throws GLib.Error; + public string get_config (string key, GLib.Cancellable? cancellable = null) throws GLib.Error; + public Flatpak.InstalledRef get_current_installed_app (string name, GLib.Cancellable? cancellable = null) throws GLib.Error; + [CCode (array_length = false, array_null_terminated = true)] + [Version (since = "1.5.0")] + public string[] get_default_languages () throws GLib.Error; + [CCode (array_length = false, array_null_terminated = true)] + [Version (since = "1.5.1")] + public string[] get_default_locales () throws GLib.Error; + [Version (since = "0.8")] + public unowned string get_display_name (); + [Version (since = "0.8")] + public unowned string get_id (); + public Flatpak.InstalledRef get_installed_ref (Flatpak.RefKind kind, string name, string? arch, string? branch, GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool get_is_user (); + [Version (since = "1.1")] + public bool get_min_free_space_bytes (out uint64 out_bytes) throws GLib.Error; + [Version (since = "1.1.1")] + public bool get_no_interaction (); + public GLib.File get_path (); + [Version (since = "0.8")] + public int get_priority (); + public Flatpak.Remote get_remote_by_name (string name, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "0.8")] + public Flatpak.StorageType get_storage_type (); + [Version (deprecated = true, deprecated_since = "1.7.0")] + public Flatpak.InstalledRef install (string remote_name, Flatpak.RefKind kind, string name, string? arch, string? branch, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (deprecated = true, deprecated_since = "1.7.0")] + public Flatpak.InstalledRef install_bundle (GLib.File file, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (deprecated = true, deprecated_since = "1.7.0")] + public Flatpak.InstalledRef install_full (Flatpak.InstallFlags flags, string remote_name, Flatpak.RefKind kind, string name, string? arch, string? branch, [CCode (array_length = false, array_null_terminated = true)] string[]? subpaths, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (deprecated = true, deprecated_since = "1.7.0", since = "0.6.10")] + public Flatpak.RemoteRef install_ref_file (GLib.Bytes ref_file_data, GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool launch (string name, string? arch, string? branch, string? commit, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "1.1")] + public bool launch_full (Flatpak.LaunchFlags flags, string name, string? arch, string? branch, string? commit, Flatpak.Instance? instance_out, GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.GenericArray list_installed_refs (GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.GenericArray list_installed_refs_by_kind (Flatpak.RefKind kind, GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.GenericArray list_installed_refs_for_update (GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "0.6.7")] + public GLib.GenericArray list_installed_related_refs_sync (string remote_name, string @ref, GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.GenericArray list_remote_refs_sync (string remote_or_uri, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "1.3.3")] + public GLib.GenericArray list_remote_refs_sync_full (string remote_or_uri, Flatpak.QueryFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "0.6.7")] + public GLib.GenericArray list_remote_related_refs_sync (string remote_name, string @ref, GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.GenericArray list_remotes (GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.GenericArray list_remotes_by_type ([CCode (array_length_cname = "num_types", array_length_pos = 1.5, array_length_type = "gsize")] Flatpak.RemoteType[] types, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "1.1.2")] + public GLib.GenericArray list_unused_refs (string? arch, GLib.Cancellable? cancellable = null) throws GLib.Error; + public string load_app_overrides (string app_id, GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool modify_remote (Flatpak.Remote remote, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "0.10.0")] + public bool prune_local_repo (GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "0.10.0")] + public bool remove_local_ref_sync (string remote_name, string @ref, GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool remove_remote (string name, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "1.0.3")] + public bool run_triggers (GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool set_config_sync (string key, string value, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "1.1.1")] + public void set_no_interaction (bool no_interaction); + [CCode (has_construct_function = false)] + public Installation.system (GLib.Cancellable? cancellable = null) throws GLib.Error; + [CCode (has_construct_function = false)] + [Version (since = "0.8")] + public Installation.system_with_id (string? id, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (deprecated = true, deprecated_since = "1.7.0")] + public bool uninstall (Flatpak.RefKind kind, string name, string? arch, string? branch, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (deprecated = true, deprecated_since = "1.7.0", since = "0.11.8")] + public bool uninstall_full (Flatpak.UninstallFlags flags, Flatpak.RefKind kind, string name, string? arch, string? branch, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (deprecated = true, deprecated_since = "1.7.0")] + public Flatpak.InstalledRef update (Flatpak.UpdateFlags flags, Flatpak.RefKind kind, string name, string? arch, string? branch, GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool update_appstream_full_sync (string remote_name, string? arch, bool? out_changed, GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool update_appstream_sync (string remote_name, string? arch, bool? out_changed, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (deprecated = true, deprecated_since = "1.7.0")] + public Flatpak.InstalledRef update_full (Flatpak.UpdateFlags flags, Flatpak.RefKind kind, string name, string? arch, string? branch, [CCode (array_length = false, array_null_terminated = true)] string[]? subpaths, GLib.Cancellable? cancellable = null) throws GLib.Error; + [Version (since = "0.6.13")] + public bool update_remote_sync (string name, GLib.Cancellable? cancellable = null) throws GLib.Error; + [CCode (has_construct_function = false)] + public Installation.user (GLib.Cancellable? cancellable = null) throws GLib.Error; + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_installed_ref_get_type ()")] + public class InstalledRef : Flatpak.Ref { + [CCode (has_construct_function = false)] + protected InstalledRef (); + [Version (since = "1.4.2")] + public unowned GLib.HashTable? get_appdata_content_rating (); + [Version (since = "1.4.2")] + public unowned string? get_appdata_content_rating_type (); + [Version (since = "1.1.2")] + public unowned string get_appdata_license (); + [Version (since = "1.1.2")] + public unowned string get_appdata_name (); + [Version (since = "1.1.2")] + public unowned string get_appdata_summary (); + [Version (since = "1.1.2")] + public unowned string get_appdata_version (); + public unowned string get_deploy_dir (); + public unowned string get_eol (); + public unowned string get_eol_rebase (); + public uint64 get_installed_size (); + public bool get_is_current (); + public unowned string? get_latest_commit (); + public unowned string get_origin (); + [CCode (array_length = false, array_null_terminated = true)] + public unowned string[] get_subpaths (); + [Version (since = "1.1.2")] + public GLib.Bytes load_appdata (GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.Bytes load_metadata (GLib.Cancellable? cancellable = null) throws GLib.Error; + public GLib.HashTable appdata_content_rating { get; construct; } + public string appdata_content_rating_type { get; construct; } + public string appdata_license { get; construct; } + public string appdata_name { get; construct; } + public string appdata_summary { get; construct; } + public string appdata_version { get; construct; } + [NoAccessorMethod] + public string deploy_dir { owned get; set; } + [NoAccessorMethod] + public string end_of_life { owned get; construct; } + [NoAccessorMethod] + public string end_of_life_rebase { owned get; construct; } + [NoAccessorMethod] + public uint64 installed_size { get; set; } + [NoAccessorMethod] + public bool is_current { get; set; } + [NoAccessorMethod] + public string latest_commit { owned get; set; } + [NoAccessorMethod] + public string origin { owned get; set; } + [CCode (array_length = false, array_null_terminated = true)] + [NoAccessorMethod] + public string[] subpaths { owned get; set; } + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_instance_get_type ()")] + public class Instance : GLib.Object { + [CCode (has_construct_function = false)] + protected Instance (); + [Version (since = "1.1")] + public static GLib.GenericArray get_all (); + [Version (since = "1.1")] + public unowned string get_app (); + [Version (since = "1.1")] + public unowned string get_arch (); + [Version (since = "1.1")] + public unowned string get_branch (); + [Version (since = "1.1")] + public int get_child_pid (); + [Version (since = "1.1")] + public unowned string get_commit (); + [Version (since = "1.1")] + public unowned string get_id (); + [Version (since = "1.1")] + public GLib.KeyFile get_info (); + [Version (since = "1.1")] + public int get_pid (); + [Version (since = "1.1")] + public unowned string get_runtime (); + [Version (since = "1.1")] + public unowned string get_runtime_commit (); + public bool is_running (); + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_ref_get_type ()")] + public class Ref : GLib.Object { + [CCode (has_construct_function = false)] + protected Ref (); + public string format_ref (); + public unowned string get_arch (); + public unowned string get_branch (); + public unowned string get_collection_id (); + public unowned string get_commit (); + public Flatpak.RefKind get_kind (); + public unowned string get_name (); + public static Flatpak.Ref parse (string @ref) throws GLib.Error; + public string arch { get; construct; } + public string branch { get; construct; } + public string collection_id { get; construct; } + public string commit { get; construct; } + public Flatpak.RefKind kind { get; construct; } + public string name { get; construct; } + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_related_ref_get_type ()")] + public class RelatedRef : Flatpak.Ref { + [CCode (has_construct_function = false)] + protected RelatedRef (); + [CCode (array_length = false, array_null_terminated = true)] + [Version (since = "0.6.7")] + public unowned string[] get_subpaths (); + [NoAccessorMethod] + public bool should_autoprune { get; construct; } + [NoAccessorMethod] + public bool should_delete { get; construct; } + [NoAccessorMethod] + public bool should_download { get; construct; } + [CCode (array_length = false, array_null_terminated = true)] + public string[] subpaths { get; construct; } + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_remote_get_type ()")] + public class Remote : GLib.Object { + [CCode (has_construct_function = false)] + public Remote (string name); + [CCode (has_construct_function = false)] + [Version (since = "1.3.4")] + public Remote.from_file (string name, GLib.Bytes data) throws GLib.Error; + public GLib.File get_appstream_dir (string? arch); + public GLib.File get_appstream_timestamp (string? arch); + public string? get_collection_id (); + [Version (since = "1.4")] + public string get_comment (); + [Version (since = "0.6.12")] + public string get_default_branch (); + [Version (since = "1.4")] + public string get_description (); + public bool get_disabled (); + [Version (since = "1.4")] + public string get_filter (); + public bool get_gpg_verify (); + [Version (since = "1.4")] + public string get_homepage (); + [Version (since = "1.4")] + public string get_icon (); + [Version (since = "1.1.1")] + public string get_main_ref (); + public unowned string get_name (); + public bool get_nodeps (); + public bool get_noenumerate (); + public int get_prio (); + [Version (since = "0.9.8")] + public Flatpak.RemoteType get_remote_type (); + public string get_title (); + public string get_url (); + public void set_collection_id (string? collection_id); + [Version (since = "1.4")] + public void set_comment (string comment); + [Version (since = "0.6.12")] + public void set_default_branch (string default_branch); + [Version (since = "1.4")] + public void set_description (string description); + public void set_disabled (bool disabled); + [Version (since = "1.4")] + public void set_filter (string filter_path); + public void set_gpg_key (GLib.Bytes gpg_key); + public void set_gpg_verify (bool gpg_verify); + [Version (since = "1.4")] + public void set_homepage (string homepage); + [Version (since = "1.4")] + public void set_icon (string icon); + [Version (since = "1.1.1")] + public void set_main_ref (string main_ref); + public void set_nodeps (bool nodeps); + public void set_noenumerate (bool noenumerate); + public void set_prio (int prio); + public void set_title (string title); + public void set_url (string url); + [NoAccessorMethod] + public string name { owned get; set; } + [NoAccessorMethod] + [Version (since = "0.9.8")] + public Flatpak.RemoteType type { get; construct; } + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_remote_ref_get_type ()")] + public class RemoteRef : Flatpak.Ref { + [CCode (has_construct_function = false)] + protected RemoteRef (); + public uint64 get_download_size (); + public unowned string get_eol (); + public unowned string get_eol_rebase (); + public uint64 get_installed_size (); + public unowned GLib.Bytes? get_metadata (); + public unowned string get_remote_name (); + public uint64 download_size { get; construct; } + [NoAccessorMethod] + public string end_of_life { owned get; construct; } + [NoAccessorMethod] + public string end_of_life_rebase { owned get; construct; } + public uint64 installed_size { get; construct; } + public GLib.Bytes metadata { get; construct; } + public string remote_name { get; construct; } + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_transaction_get_type ()")] + public class Transaction : GLib.Object, GLib.Initable { + [CCode (has_construct_function = false)] + protected Transaction (); + [Version (since = "1.5.1")] + public void abort_webflow (uint id); + public void add_default_dependency_sources (); + public void add_dependency_source (Flatpak.Installation installation); + public bool add_install (string remote, string @ref, [CCode (array_length = false, array_null_terminated = true)] string[]? subpaths) throws GLib.Error; + public bool add_install_bundle (GLib.File file, GLib.Bytes? gpg_data) throws GLib.Error; + public bool add_install_flatpakref (GLib.Bytes flatpakref_data) throws GLib.Error; + [Version (since = "1.3.3.")] + public bool add_rebase (string remote, string @ref, string? subpaths, [CCode (array_length = false, array_null_terminated = true)] string[]? previous_ids) throws GLib.Error; + [Version (since = "1.7.1")] + public void add_sideload_repo (string path); + public bool add_uninstall (string @ref) throws GLib.Error; + public bool add_update (string @ref, [CCode (array_length = false, array_null_terminated = true)] string[]? subpaths, string? commit) throws GLib.Error; + [Version (since = "1.5.2")] + public void complete_basic_auth (uint id, string user, string password, GLib.Variant options); + [CCode (has_construct_function = false)] + public Transaction.for_installation (Flatpak.Installation installation, GLib.Cancellable? cancellable = null) throws GLib.Error; + public Flatpak.TransactionOperation get_current_operation (); + public Flatpak.Installation get_installation (); + [Version (since = "1.5.1")] + public bool get_no_deploy (); + [Version (since = "1.5.1")] + public bool get_no_pull (); + public GLib.List get_operations (); + [Version (since = "1.5.1")] + public unowned string get_parent_window (); + public bool is_empty (); + public virtual bool run (GLib.Cancellable? cancellable = null) throws GLib.Error; + public void set_default_arch (string arch); + public void set_disable_dependencies (bool disable_dependencies); + public void set_disable_prune (bool disable_prune); + public void set_disable_related (bool disable_related); + public void set_disable_static_deltas (bool disable_static_deltas); + public void set_force_uninstall (bool force_uninstall); + public void set_no_deploy (bool no_deploy); + [Version (since = "1.7.3")] + public void set_no_interaction (bool no_interaction); + public void set_no_pull (bool no_pull); + [Version (since = "1.5.1")] + public void set_parent_window (string parent_window); + public void set_reinstall (bool reinstall); + public Flatpak.Installation installation { owned get; construct; } + public virtual signal bool add_new_remote (Flatpak.TransactionRemoteReason reason, string from_id, string remote_name, string url); + [Version (since = "1.5.2")] + public virtual signal bool basic_auth_start (string remote, string realm, GLib.Variant options, int id); + public virtual signal int choose_remote_for_ref (string for_ref, string runtime_ref, [CCode (array_length = false, array_null_terminated = true)] string[] remotes); + public virtual signal void end_of_lifed (string @ref, string reason, string rebase); + public virtual signal bool end_of_lifed_with_rebase (string remote, string @ref, string reason, string rebased_to_ref, [CCode (array_length = false, array_null_terminated = true)] string[] previous_ids); + [Version (since = "1.7.4")] + public virtual signal void install_authenticator (string remote, string authenticator_ref); + public virtual signal void new_operation (Flatpak.TransactionOperation operation, Flatpak.TransactionProgress progress); + public virtual signal void operation_done (Flatpak.TransactionOperation operation, string? commit, Flatpak.TransactionResult details); + public virtual signal bool operation_error (Flatpak.TransactionOperation operation, GLib.Error error, Flatpak.TransactionErrorDetails detail); + public virtual signal bool ready (); + [Version (since = "1.5.1")] + public virtual signal void webflow_done (GLib.Variant options, int id); + [Version (since = "1.5.1")] + public virtual signal bool webflow_start (string remote, string url, GLib.Variant options, int id); + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_transaction_operation_get_type ()")] + public class TransactionOperation : GLib.Object { + [CCode (has_construct_function = false)] + protected TransactionOperation (); + public unowned GLib.File get_bundle_path (); + public unowned string get_commit (); + [Version (since = "1.1.2")] + public uint64 get_download_size (); + [Version (since = "1.1.2")] + public uint64 get_installed_size (); + [Version (since = "1.7.3")] + public bool get_is_skipped (); + public unowned GLib.KeyFile get_metadata (); + public unowned GLib.KeyFile get_old_metadata (); + public Flatpak.TransactionOperationType get_operation_type (); + public unowned string get_ref (); + [Version (since = "1.7.3")] + public unowned GLib.GenericArray? get_related_to_ops (); + public unowned string get_remote (); + } + [CCode (cheader_filename = "flatpak.h", type_id = "flatpak_transaction_progress_get_type ()")] + public class TransactionProgress : GLib.Object { + [CCode (has_construct_function = false)] + protected TransactionProgress (); + [Version (since = "1.1.2")] + public uint64 get_bytes_transferred (); + public bool get_is_estimating (); + public int get_progress (); + [Version (since = "1.1.2")] + public uint64 get_start_time (); + public string get_status (); + public void set_update_frequency (uint update_interval); + public signal void changed (); + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_INSTALL_FLAGS_", type_id = "flatpak_install_flags_get_type ()")] + [Flags] + public enum InstallFlags { + NONE, + NO_STATIC_DELTAS, + NO_DEPLOY, + NO_PULL, + NO_TRIGGERS + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_LAUNCH_FLAGS_", type_id = "flatpak_launch_flags_get_type ()")] + [Flags] + public enum LaunchFlags { + NONE, + DO_NOT_REAP + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_QUERY_FLAGS_", type_id = "flatpak_query_flags_get_type ()")] + [Flags] + [Version (since = "1.3.3")] + public enum QueryFlags { + NONE, + ONLY_CACHED, + ONLY_SIDELOADED + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_REF_KIND_", type_id = "flatpak_ref_kind_get_type ()")] + public enum RefKind { + APP, + RUNTIME + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_REMOTE_TYPE_", type_id = "flatpak_remote_type_get_type ()")] + public enum RemoteType { + STATIC, + USB, + LAN + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_STORAGE_TYPE_", type_id = "flatpak_storage_type_get_type ()")] + [Version (since = "0.6.15")] + public enum StorageType { + DEFAULT, + HARD_DISK, + SDCARD, + MMC, + NETWORK + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_TRANSACTION_ERROR_DETAILS_", type_id = "flatpak_transaction_error_details_get_type ()")] + [Flags] + public enum TransactionErrorDetails { + NON_FATAL + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_TRANSACTION_OPERATION_", type_id = "flatpak_transaction_operation_type_get_type ()")] + public enum TransactionOperationType { + INSTALL, + UPDATE, + INSTALL_BUNDLE, + UNINSTALL, + LAST_TYPE; + public unowned string to_string (); + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_TRANSACTION_REMOTE_", type_id = "flatpak_transaction_remote_reason_get_type ()")] + public enum TransactionRemoteReason { + GENERIC_REPO, + RUNTIME_DEPS + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_TRANSACTION_RESULT_NO_", type_id = "flatpak_transaction_result_get_type ()")] + [Flags] + public enum TransactionResult { + CHANGE + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_UNINSTALL_FLAGS_", type_id = "flatpak_uninstall_flags_get_type ()")] + [Flags] + [Version (since = "0.11.8")] + public enum UninstallFlags { + NONE, + NO_PRUNE, + NO_TRIGGERS + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_UPDATE_FLAGS_", type_id = "flatpak_update_flags_get_type ()")] + [Flags] + public enum UpdateFlags { + NONE, + NO_DEPLOY, + NO_PULL, + NO_STATIC_DELTAS, + NO_PRUNE, + NO_TRIGGERS + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_ERROR_")] + public errordomain Error { + ALREADY_INSTALLED, + NOT_INSTALLED, + ONLY_PULLED, + DIFFERENT_REMOTE, + ABORTED, + SKIPPED, + NEED_NEW_FLATPAK, + REMOTE_NOT_FOUND, + RUNTIME_NOT_FOUND, + DOWNGRADE, + INVALID_REF, + INVALID_DATA, + UNTRUSTED, + SETUP_FAILED, + EXPORT_FAILED, + REMOTE_USED, + RUNTIME_USED, + INVALID_NAME, + OUT_OF_SPACE, + WRONG_USER, + NOT_CACHED, + REF_NOT_FOUND, + PERMISSION_DENIED, + AUTHENTICATION_FAILED, + NOT_AUTHORIZED; + public static GLib.Quark quark (); + } + [CCode (cheader_filename = "flatpak.h", cprefix = "FLATPAK_PORTAL_ERROR_")] + public errordomain PortalError { + FAILED, + INVALID_ARGUMENT, + NOT_FOUND, + EXISTS, + NOT_ALLOWED, + CANCELLED, + WINDOW_DESTROYED; + public static GLib.Quark quark (); + } + [CCode (cheader_filename = "flatpak.h", instance_pos = 3.9)] + public delegate void ProgressCallback (string status, uint progress, bool estimating); + [CCode (cheader_filename = "flatpak.h", cname = "FLATPAK_MAJOR_VERSION")] + public const int MAJOR_VERSION; + [CCode (cheader_filename = "flatpak.h", cname = "FLATPAK_MICRO_VERSION")] + public const int MICRO_VERSION; + [CCode (cheader_filename = "flatpak.h", cname = "FLATPAK_MINOR_VERSION")] + public const int MINOR_VERSION; + [CCode (cheader_filename = "flatpak.h")] + public static unowned string get_default_arch (); + [CCode (array_length = false, array_null_terminated = true, cheader_filename = "flatpak.h")] + public static unowned string[] get_supported_arches (); + [CCode (cheader_filename = "flatpak.h")] + [Version (since = "0.8")] + public static GLib.GenericArray get_system_installations (GLib.Cancellable? cancellable = null) throws GLib.Error; +}