
On Fri, Nov 29, 2013 at 04:18:59PM +0100, Cédric Bosdonnat wrote:
Each unique event ID will thus be composed by 1 byte for the namespace and 1 byte for a namespace-specific ID. The namespace for domain event needs to be 0 for compatibility reasons. --- include/libvirt/libvirt.h.in | 8 ++++++++ src/conf/domain_event.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 5aad75c..25ab777 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -4961,6 +4961,14 @@ typedef enum { } virDomainEventID;
+/** Event IDs are computed in the following way: + virEventNamespaceID << 8 + vir*EventId + */ +typedef enum { + VIR_EVENT_NAMESPACE_DOMAIN = 0, /* 0 to keep value of virDomainEventId unchanged */ +} virEventNamespaceID;
I'm not sure I see why we need to expose this in the libvirt.h.in public header. Is it not sufficient to hide this in object_event.h instead ? 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 :|