On Fri, Aug 15, 2014 at 12:05:47PM +0200, Timm Bäder wrote: > --- > libvirt-gobject/libvirt-gobject-domain-snapshot.c | 56 +++++++++++++++++++++++ > libvirt-gobject/libvirt-gobject-domain-snapshot.h | 9 ++++ > libvirt-gobject/libvirt-gobject.sym | 2 + > 3 files changed, 67 insertions(+) > > diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c > index 61ca53e..46aa70f 100644 > --- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c > +++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c > @@ -237,6 +237,62 @@ gboolean gvir_domain_snapshot_delete (GVirDomainSnapshot *snapshot, > } > > > + > +static void _delete_async_thread(GTask *task, > + gpointer source_object, > + gpointer task_data, > + GCancellable *cancellable) { > + GError *error = NULL; > + gboolean status; > + > + status = gvir_domain_snapshot_delete(source_object, > + GPOINTER_TO_UINT(task_data), > + &error); > + > + if (status) > + g_task_return_boolean(task, TRUE); > + else > + g_task_return_error(task, error); > +} > + > + > +/** > + * gvir_domain_snapshot_delete_async: > + * @snapshot: A #GVirDomainSnapshot > + * @flags: Bitwise-OR of #GVirDomainSnapshotDeleteFlags > + * @callback: (scope async): completion callback > + * @user_data: (closure): opaque data for callback > + */ > +void gvir_domain_snapshot_delete_async(GVirDomainSnapshot *snapshot, > + guint flags, > + GAsyncReadyCallback callback, > + gpointer user_data) { Usual question about the lack of cancellable, ACK otherwise. Christophe
Attachment:
pgpAoYN_9wzz1.pgp
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list