Commit Graph

32 Commits

Author SHA1 Message Date
Matthias Clasen
87591066c3 doc: Add missing apis to flatpak-sections.txt
Add various public apis that were missing from the docs.
2019-12-01 14:04:41 -05:00
Umang Jain
11631f9514 transaction: Add getter for querying no-pull
As this is a required to deploy autoupdates downloaded in the
background, for clients like gnome-software.
2019-10-08 15:21:09 +05:30
Umang Jain
c7670e87d7 transaction: Add getter for querying no-deploy
FlatpakTransaction inherently doesn't differentiate between a
autoupdate and a regular update; both are
FLATPAK_TRANSACTION_OPERATION_UPDATE.

This getter can help differentiate between a regular update
and autoupdate in clients like gnome-software. Autoupdates
work in two separate transaction passes; first that runs with
"no-deploy" and the second pass that deploys all the downloaded
update (i.e. with "no-pull").
2019-10-08 15:21:03 +05:30
Mazen Asef
a0666034db app: Add new extra-languages key
If xa.languages is set, use these, and no others. Otherwise, take the union
of xa.extra-languages, and the system default locales for system repos;
xa.extra-languages for user repo and the langs based on the user's locale

Fixes https://github.com/flatpak/flatpak/issues/3043
2019-09-13 15:31:14 -03:00
Richard Hughes
7e62d01d9b Add 5 missing symbols to the generated GtkDoc output
Closes: #2982
Approved by: mwleeds
2019-06-25 20:44:16 +00:00
Alexander Larsson
c01fdee171 lib Add flatpak_remote_new_from_file() to add remotes from flatpakrefs
Closes: #2888
Approved by: alexlarsson
2019-05-09 12:39:36 +00:00
Alexander Larsson
8d674234aa lib: Add flatpak_installation_add_remote
This is basically modify_remote, but it fails if the remote is
already configured instead of modifying it. Although it also
has a if_needed option, and if that is set it will silently complete
as a no-op (exept resetting filters).

Closes: #2888
Approved by: alexlarsson
2019-05-09 12:39:36 +00:00
Matthias Clasen
f3ca031d00 Add FlatpakRemote api for flatpakrepo fields
This makes the new flatpakrepo fields available
to users of libflatpak.

Closes: #2812
Approved by: alexlarsson
2019-04-10 11:57:16 +00:00
Umang Jain
94969d5057 Installation: Add flatpak_installation_get_min_free_space_bytes
A convenience wrapper around ostree_repo_get_min_free_space_bytes().
Clients programs like gnome-software can get the value of minimum free
space as defined in the OSTree repo. This can be useful in various
disk-space checks these client program can implement.

At Endless, we have downstream heuristics in gnome-software which
determine the success/failure likelihood of an install/update
operation to some extend. Depending upon the likelihood of the
success/failure we dispatch install/update/auto-update operations.

With client programs gaining features such as auto-updates, it makes
sense to have a min-free-space API so that these programs can check
free-space availablity vs minimum free space defined by user inside
OSTree's repo before auto-updating. Although, OSTree will certainly
fail operations over-stepping min-free-space's value; It's just a
matter of convenience to provide a way to query the value to client
programs as well.

Closes: #2274
Approved by: matthiasclasen
2018-11-07 12:02:14 +00:00
Matthias Clasen
6daf195e42 Instance: mitigate races, add new launch api
Avoid the 3-second 'afterlife' of instances by using
kill (pid, 0) instead of checking the file lock. We
trade pid for lock races, but this seems more reliable.

Also add flatpak_installation_launch_full that returns
a FlatpakInstance for the launched app, and lets us
avoid races around killing the app, by using a child
watch.

Closes: #2221
Approved by: matthiasclasen
2018-10-23 07:15:39 +00:00
Matthias Clasen
dd546ad365 Make FlatpakInstance api public
This can be of use in frontends like GNOME Software.

Closes: #2201
Approved by: alexlarsson
2018-10-08 08:36:23 +00:00
Robert McQueen
8bd22682f7 installation: nitpicks
Make the new _run_triggers function appear correctly in GtkDoc and cross-link.

Closes: #2164
Approved by: alexlarsson
2018-10-02 06:22:27 +00:00
Matthias Clasen
c284777d61 Add more api docs for libflatpak
Bring the library docs much closer to completion.

Closes: #2053
Approved by: alexlarsson
2018-09-03 10:31:51 +00:00
Will Thompson
9e02d51737 docs: fix title of FlatpakBundleRef section
Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:16 +00:00
Will Thompson
9cc72ed08f transaction: improve cross-refs for signal parameter docs
Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:16 +00:00
Will Thompson
98ee688b84 docs: make FlatpakTransactionOperation appear
There were two reasons why no docs for this class appeared in the HTML
documentation:

* flatpak-transaction-operation.xml was not included by
  flatpak-docs.xml.
* all its symbols were listed in <SUBSECTION Standard>, which is hidden
  from the HTML output. It appears that if a section has no visible
  symbols, it's omitted.

Many symbols which belong to FlatpakTransaction were erroneously grouped
with FlatpakTransactionOperation and so also hidden; fix this too.

Closes: #1995
Approved by: alexlarsson
2018-08-27 10:57:15 +00:00
Alexander Larsson
adffe7d15f fixup! Add flatpak_transaction_operation_type_to_string() 2018-07-10 19:25:44 +02:00
Alexander Larsson
c0ebd3a121 transaction: Move flatpakref installation to transaction code
This adds the flatpak_transaction_add_install_flatpakref method
to easily install from flatpakref files. It additionally
adds a new signal called add-new-remote which is called in two
cases:

 To ask if the user wants to add a "normal" remote for the url
 specified by a flatpakref file.

 When a new remote is required for the runtimes the application
 depends on.

Closes: #1868
Approved by: alexlarsson
2018-07-07 15:38:46 +00:00
Alexander Larsson
1ecca029a8 transaction: Add flatpak_transaction_set_default_arch
This will be used as the default when installing something that
doesn't specify a ref, such as a flatpakref file.

Closes: #1868
Approved by: alexlarsson
2018-07-07 15:38:46 +00:00
Alexander Larsson
93ca5cdf45 transaction: Add get_installation()
Closes: #1841
Approved by: alexlarsson
2018-06-29 12:56:15 +00:00
Alexander Larsson
23f1df8a5b Transaction: Add operation getters for metadata and old_metadata
Closes: #1799
Approved by: alexlarsson
2018-06-19 14:54:22 +00:00
Alexander Larsson
1e7e6376ff gtk-doc: Add all missing symbols to flatpak.sections
Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
8df5a6af11 Fix up gtk-doc warnings 2018-05-29 16:49:44 +02:00
Alexander Larsson
9672782694 libflatpak: Update docs for library 2018-05-29 16:37:21 +02:00
Mario Sanchez Prada
3ee19d609d lib/installation: Adding missing documentation for the newly added API
Add FLATPAK_UPDATE_FLAGS_NO_PRUNE and flatpak_installation_uninstall_full()
to the documentation, along with a couple of small fixes.

https://github.com/flatpak/flatpak/issues/1703

Closes: #1705
Approved by: pwithnall
2018-05-23 16:55:13 +00:00
Nicholas Bishop
ab117ee250 Add all missing declarations to flatpak-sections.txt
Closes: #1505
Approved by: mwleeds
2018-03-23 22:55:11 +00:00
Nicholas Bishop
69fa452bed Add FlatpakRelatedRef to API documentation
Closes: #1497
Approved by: alexlarsson
2018-03-19 09:41:09 +00:00
Mario Sanchez Prada
38a1eeea0e Add new API to the docs
Some of this API has been added a while ago, but never
made it to the sections file, so add it now.
2017-03-27 14:11:43 +02:00
Mario Sanchez Prada
8decac7d7f Added new public API: flatpak_installation_update_remote_sync()
Provides access to the functionality offered by the new internal API
flatpak_dir_update_remote_configuration(), in a similar way to what
can be done via the command 'flatpak remote-modify --update-metadata'.
2016-10-14 16:42:17 +01:00
Matthias Clasen
0cfd001d9b Add some new api to the docs 2016-05-16 19:49:48 -04:00
Matthias Clasen
e7d53ca7cb Add new FlatpakRemote apis to the docs 2016-05-16 19:37:08 -04:00
Alexander Larsson
ba37b22d78 Rename library to libflatpak 2016-05-09 09:46:26 +02:00