summaryrefslogtreecommitdiff
path: root/common/flatpak-installed-ref.c
Commit message (Collapse)AuthorAgeFilesLines
* flatpak-installed-ref: Add support for storing app content ratingsPhilip Withnall2019-10-031-1/+83
| | | | | | | | | This will be used by upcoming commits to filter app installation by content rating. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://github.com/flatpak/flatpak/pull/2797
* Set a collection ID on FlatpakInstalledRef objectsMatthew Leeds2019-09-191-0/+2
| | | | | | | | | | | | | | | | | Currently FlatpakInstalledRef objects are constructed without the collection-id property set. This is a problem because in the USB app update support in the Endless fork of GNOME Software, when we find a FlatpakRemoteRef on a USB drive which matches the ref of a FlatpakInstalledRef object, the collection IDs of the two objects must also match, and currently the installed one has a NULL collection ID. So get the collection ID on the relevant configured remote when constructing a FlatpakInstalledRef. This should be good enough in most cases but isn't perfect; see https://github.com/flatpak/flatpak/issues/3103 Closes: #3114 Approved by: alexlarsson
* Remove extra newlines in variable definiton blocksMatthew Leeds2019-02-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Uncrustify has an option "nl_func_var_def_blk" which is supposed to ensure there's a newline character between the block of variable definitions and the rest of the function body, but it gets confused and thinks that the first instance of "g_autoptr" or "g_auto" being used on a variable is the start of the function body. So this commit removes those extra newline characters and removes that option in uncrustify.cfg so they don't get re-added the next time uncrustify is run. Here's the command I used: perl -0777 -i -pe 's/\n(\n\s*g_auto\()/\1/g' `git ls-tree --name-only -r HEAD | grep \\\.[ch]$ | grep -v common/valgrind-private.h | grep -v app/flatpak-polkit-agent-text-listener\\\.[ch]` I ran it again with "g_autoptr" in place of "g_auto", and made a few manual edits to add back the newline when the g_auto* was in the middle of a function body rather than at the top. Closes: #2715 Approved by: matthiasclasen
* Run uncrustifyMatthew Leeds2019-02-251-2/+2
| | | | | | | | I had to make a few manual edits but other than those the changes look reasonable. Closes: #2715 Approved by: matthiasclasen
* installed ref: Plug a few memory leaksMatthias Clasen2019-01-091-0/+4
| | | | | | | All the appdata strings were not freed. Oops. Closes: #2521 Approved by: mwleeds
* Add license to the appdata fields we extractMatthias Clasen2019-01-091-1/+39
| | | | | | | | This was requested before, so might as well add it at the same time. Closes: #2521 Approved by: mwleeds
* Improve apdata getter docsMatthias Clasen2018-12-311-2/+2
| | | | There were a few small copy-paste errors.
* lib: Add support for appdata to FlatpakInstalledRefAlexander Larsson2018-12-191-1/+159
| | | | | | | | This adds a function to load the full appdata.xml.gz, as well as fast accessors to the pre-parsed fields. Closes: #2409 Approved by: alexlarsson
* common: Document that get_latest_commit() can return NULLMatthew Leeds2018-11-031-1/+1
| | | | | | | | | | | | | | It's possible for the "latest_commit" field of a FlatpakInstalledRef to be NULL, which I think happens if the ref is no longer in the remote.[1][2][3] So this commit documents the possibility of flatpak_installed_ref_get_latest_commit() returning NULL. [1] https://github.com/flatpak/flatpak/issues/309 [2] https://github.com/flatpak/flatpak/commit/6b4402b60 [3] https://github.com/flatpak/flatpak/commit/230e18db7 Closes: #2289 Approved by: matthiasclasen
* Add more api docs for libflatpakMatthias Clasen2018-09-031-3/+3
| | | | | | | Bring the library docs much closer to completion. Closes: #2053 Approved by: alexlarsson
* Run uncrustifyAlexander Larsson2018-07-081-3/+3
| | | | | Closes: #1870 Approved by: alexlarsson
* Merge lib/* into commonAlexander Larsson2018-05-241-0/+469
This moves all the files from lib into common, and it also adds all the libflatpak sources into libflatpak-common, making libflatpak just a wrapper around the common helper library. This move allows the CLI to use all the code from libflatpak. We were already doing this with a few things like flatpak-error*.[ch], and we want to do it even more when sharing FlatpakTransaction. This also allows use to slowly move the CLI to using the libflatpak apis for some things. Closes: #1706 Approved by: alexlarsson