diff options
author | Colin Walters <walters@verbum.org> | 2013-10-24 09:10:34 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-10-24 14:27:13 -0400 |
commit | c65923e64241ddeffbbfe48555150fd4d0ec1a8c (patch) | |
tree | a0cd27dc6a577be18030dc222b9d17f9ab25e97b /src/libostree/ostree.h | |
parent | 9aaa29598eb7d54575d5012418fd3f604866d460 (diff) | |
download | ostree-c65923e64241ddeffbbfe48555150fd4d0ec1a8c.tar.gz |
Add OstreeAsyncProgress, use it for ostree_repo_pull
Several APIs in libostree were moved there from the commandline code,
and have hardcoded g_print() for progress and notifications. This
isn't useful for people who want to write PackageKit backends, custom
GUIs and the like.
From what I can tell, there isn't really a winning precedent in GLib
for progress notifications.
PackageKit has the model where the source has GObject properties that
change as async ops execute, which isn't bad...but I'd like something
a bit more general where say you can have multiple outstanding async
ops and sensibly track their state.
So, OstreeAsyncProgress is basically a threadsafe property bag with a
change notification signal.
Use this new API to move the GSConsole usage (i.e. g_print()) out from
libostree/ and into ostree/.
Diffstat (limited to 'src/libostree/ostree.h')
-rw-r--r-- | src/libostree/ostree.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libostree/ostree.h b/src/libostree/ostree.h index 730b6160..f1e74507 100644 --- a/src/libostree/ostree.h +++ b/src/libostree/ostree.h @@ -1,6 +1,6 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * - * Copyright (C) 2011 Colin Walters <walters@verbum.org>. + * Copyright (C) 2011,2013 Colin Walters <walters@verbum.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,12 +16,11 @@ * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. - * - * Author: Colin Walters <walters@verbum.org> */ #pragma once +#include <ostree-async-progress.h> #include <ostree-core.h> #include <ostree-repo.h> #include <ostree-mutable-tree.h> |