On Fri, Nov 29, 2013 at 04:18:43PM +0100, Cédric Bosdonnat wrote:
but kept virDomainEventStateRegisterID as a convenience wrapper
around
this new function.
---
src/conf/domain_event.c | 125 +++++++++++++++++++++++++++++++----------------
src/conf/domain_event.h | 25 ++++++++++
src/libvirt_private.syms | 1 +
3 files changed, 110 insertions(+), 41 deletions(-)
/**
+ * virObjectEventStateRegisterID:
+ * @conn: connection to associate with callback
+ * @state: domain event state
+ * @eventID: ID of the event type to register for
+ * @cb: function to remove from event
+ * @opaque: data blob to pass to callback
+ * @freecb: callback to free @opaque
+ * @callbackID: filled with callback ID
+ *
+ * Register the function @callbackID with connection @conn,
+ * from @state, for events of type @eventID.
+ *
+ * Returns: the number of callbacks now registered, or -1 on error
+ */
+int
+virObjectEventStateRegisterID(virConnectPtr conn,
+ virObjectEventStatePtr state,
+ unsigned char uuid[VIR_UUID_BUFLEN],
I think I'd declare that as 'unsigned char *uuid' instead
+ const char *name,
+ int id,
+ int eventID,
+ virConnectObjectEventGenericCallback cb,
+ void *opaque,
+ virFreeCallback freecb,
+ int *callbackID)
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|