Commit Graph

116 Commits (e87e2b7736727f34c2421fb1f63fea8e66903f12)

Author SHA1 Message Date
Alexander Larsson 41b3db5e01 lib: Add xdg_app_installation_list_installed_refs_for_update 2015-12-17 21:37:30 +01:00
Alexander Larsson e6509ff11c lib: Add xdg_app_ref_format_ref 2015-12-17 21:37:14 +01:00
Alexander Larsson 3087186a36 lib: Make list_remotes return a GPtrArray 2015-12-17 21:07:52 +01:00
Alexander Larsson 6a507970c5 lib: Move all sync operations from XdgAppRemote to XdgAppInstallation
Its much easier to handle locking etc when all the i/o operations
are on XdgAppInstallation, and the other objects are pure data carriers.
2015-12-17 20:51:59 +01:00
Alexander Larsson 874fce2b77 lib: Move app launching to XdgAppInstallation 2015-12-17 20:34:25 +01:00
Alexander Larsson e7903a8033 lib: Move fetch_metadata_sync from RemoteRef to Remote
We want to make the Ref objects pure data storage
2015-12-17 20:19:27 +01:00
Alexander Larsson 7da16de205 lib: get_current => get_is_current 2015-12-17 20:10:10 +01:00
Alexander Larsson dd7f18aaf2 lib: Always use "branch" not "version" in API
"version" is really confusin
2015-12-17 20:00:48 +01:00
Alexander Larsson 4ea61d3830 lib: Return GPtrArray from xdg_app_remote_list_refs_sync 2015-12-17 19:57:01 +01:00
Alexander Larsson b9c582bc75 lib: Change how listing installed refs work
Now we return a GPtrArray, and the main call returns both apps
and runtimes, and a new _by_kind version lets you get only a specific one.
2015-12-17 19:50:40 +01:00
Alexander Larsson 570ba8b55f Add --enable-libxdgapp configure flag and disable lib by default 2015-12-16 15:27:42 +01:00
Alexander Larsson 2175ffa77d Add missing EXTRA_DIST to pass distcheck 2015-12-16 13:22:04 +01:00
Alexander Larsson 9c77b86d3d lib: Fix return value type warnings 2015-12-16 13:03:55 +01:00
Alexander Larsson 8b5208a995 Add lock file for each xdg-app dir.
This protects the stuff outside the repo (such as deploys, exports,
active checkout, current branch, etc). However, we rely on ostree
concurrency handling for handling concurrent pulls and prunes.

For reading (e.g. list-apps, etc), we don't do any locking, as these
all writes are essentially updated atomically (last change is atomic) and
any once you return such information it could be out of date anyway.
2015-12-15 16:20:28 +01:00
Alexander Larsson 8f700b9aca lib: Use the new installed/not-installed custom GErrors 2015-12-15 15:33:23 +01:00
Alexander Larsson 856c8210a9 lib: Add custom GError codes 2015-12-15 15:27:37 +01:00
Alexander Larsson be4f0d86d8 common: Add and use xdg_app_dir_deploy_update() 2015-12-15 15:21:00 +01:00
Alexander Larsson 423a5af15b lib: Add xdg_app_installation_uninstall 2015-12-15 15:07:41 +01:00
Alexander Larsson 604f71937a Use xdg_app_compose_ref helper 2015-12-15 14:58:12 +01:00
Alexander Larsson 43a09b3646 Fix unused variable warnings 2015-12-15 14:34:52 +01:00
Alexander Larsson 4342959f6d lib: Add xdg_app_installation_update 2015-12-15 12:43:56 +01:00
Alexander Larsson 9285d055ab lib: Add xdg_app_installation_install 2015-12-15 12:26:59 +01:00
Alexander Larsson c382cfc212 lib: Fix compiler warning in test app 2015-12-15 08:44:50 +01:00
Alexander Larsson e9d713cb96 lib: Better fix for old glib 2015-12-15 08:37:24 +01:00
Alexander Larsson ca06b3e66f lib: Fix build with older glib 2015-12-14 22:01:21 +01:00
Alexander Larsson 4177f358cb common: Make it explicit that XdgAppError are portal errors 2015-12-08 12:16:38 +01:00
Alexander Larsson a28ced36c7 lib: Add xdg_app_installation_load_app_overrides() 2015-12-08 11:48:22 +01:00
Alexander Larsson 8d576298ca lib: Minor indentation cleanups 2015-12-08 11:02:32 +01:00
Alexander Larsson a62f64d265 lib: Add xdg_app_remote_ref_fetch_metadata_sync helper
This does direct soup access on the repo. Not ideal, but good for now.
2015-12-08 11:01:13 +01:00
Alexander Larsson ef93bd8d15 lib: Fix declaration of xdg_app_installed_ref_load_metadata
We changed this to not be const
2015-12-07 16:36:08 +01:00
Alexander Larsson 0fe5f6552a lib: Add XdgAppDir to RemoteRef private 2015-12-07 16:35:53 +01:00
Alexander Larsson d987501e02 lib: Always load installed ref metadata each time
This is needed in case it changes over time.
2015-12-07 16:31:01 +01:00
Alexander Larsson 188bb00b1b lib: xdg_app_remote_fetch_ref_sync
For now this downloads the summary file each time.
2015-12-07 16:17:06 +01:00
Alexander Larsson 6558c812af lib: Add some more debug spew to test-lib 2015-12-07 16:16:43 +01:00
Alexander Larsson eca699ca5a lib: Rename xdg_app_remote_list_refs to xdg_app_remote_list_refs_sync 2015-12-07 16:16:02 +01:00
Alexander Larsson a8a7b28ce9 lib: Add remote_name to XdgAppRemoteRef 2015-12-07 16:14:52 +01:00
Alexander Larsson 5b1931dc8d lib: Add xdg_app_installed_ref_launch() 2015-12-07 13:36:39 +01:00
Alexander Larsson a4df4ff811 lib: Add XdgAppRemoteRef subclass
This doesn't do anything yet, but its a place to hang remote-specific
ops off.
2015-12-04 15:35:13 +01:00
Alexander Larsson 5fd830d3b0 lib: Make getters for XdgAppRemote return copies of strings for options
This makes it possible to handle the case when these options change
over time.
2015-12-04 11:46:32 +01:00
Alexander Larsson 1ba476bcbe Merge pull request #90 from ebassi/introspection
Introspection
2015-12-04 11:42:47 +01:00
Alexander Larsson ad7b379398 Add no-enumerate flag to remote and set if for bundle origin remotes 2015-12-04 11:40:51 +01:00
Emmanuele Bassi c09375c855 Annotate transfer rules for ambiguous return values
This silences all the warnings from the introspection scanner.
2015-12-04 10:17:39 +00:00
Emmanuele Bassi 52ba736518 Add introspection support to libxdg-app
We may want to use it from non-C languages.
2015-12-04 09:55:40 +00:00
Alexander Larsson 2f6fc54897 lib: Use the new remote helpers 2015-12-04 10:49:16 +01:00
Emmanuele Bassi 82fa0659f9 build: Fix include path for builddir != srcdir
We need to add $(top_builddir)/lib to the inclusion path, otherwise the
build will fail.

This has broken gnome-continuous builds of xdg-app.
2015-12-04 01:13:45 +00:00
Alexander Larsson 132d1186d9 Initial version of libxdg-app
This is a highlevel library for working with xdg-app without using
the commandline interface. The primary usecase for this is for
creating a graphical frontend for app installation/update.
2015-12-03 22:41:16 +01:00
Alexander Larsson 106a5b06ec Rename lib/ to common/ in preparation for public xdg-app library 2015-11-26 22:05:38 +01:00
Alexander Larsson 49af288937 Add standard errors needed for portal 2015-11-26 19:18:58 +01:00
Alexander Larsson 47c705db03 portals: Only give blanket access to session-*.scope systemd cgroup
This way we won't give false positives if the user systemd session is
not running.
2015-11-26 17:37:46 +01:00
Alexander Larsson f5cadc018b Support defining read-only filesystem access
If you do something like "--filesystem=host:ro" you get a read-only mount
of the specified filesystem location.
2015-11-26 17:22:37 +01:00