This patch serie is replacing the previous one I sent. The improvements that were made in between are: * splitting the 2 huge commits into smaller reviewable ones. * Get rid of the huge union in virDomainEvent and use virObjects instead. * No domain events-related code in object_event.c. I left the network events related code there as it would be pretty small in a separate set of files. * Rebased on the python split repository I saw something weird in the domain events code when working on this: VIR_DOMAIN_EVENT_LAST is defined if VIR_ENUM_SENTINELS is defined, but is generally used independently of it. I did the same for the VIR_NETWORK_EVENT_LAST thought I'm not sure that's the correct thing to do. These changes are all about bringing events for network object like the ones existing for domains. This feature is needed for virt-manager to refresh its UI when networks are started/destroyed/defined/undefined. The network events are implemented in the test, bridge network and remote drivers ATM. Cédric Bosdonnat (34): Added domain start/stop/define/undefine event unit tests Rename virDomainEventCallback to virObjectEventCallback Renamed virDomainMeta to virObjectMeta Renamed virDomainEventQueue to virObjectEventQueue Renamed virDomainEventState to virObjectEventState Renamed virDomainEventCallbackList* to virObjectEventCallbackList* Created virObjectEventStateRegisterID virObject-ified virDomainEvent Create virDomainEventLifecycle to start removing the huge union Renamed virDomainEventNew* to virDomainEventLifecycleNew* Renamed virDomainEventNewInternal to virDomainEventNew Create virDomainEventRTCChange to get rid of the huge union Created virDomainEventWatchdog to get rid of the huge union Created virDomainEventIOError Created virDomainEventGraphics Created virDomainEventBlockJob Create virDomainEventDiskChange Created virDomainEventTrayChange Created virDomainEventBalloonChange Created virDomainEventDeviceRemoved and removed the huge union Changed the remaining domain event creation methods results to void* Removed virDomainEventPtr in favor of virObjectEventPtr Add object event namespaces for the event IDs Renamed virDomainEventTimer to virObjectEventTimer Split the virObjectEvent and virDomainEvent* to separate them after Extracted common parts of domain_event.[ch] to object_event.[ch] Added virNetworkEventLifecycle object Added API for network events similar to the one from Domain events test driver: renamed testDomainEventQueue into testObjectEventQueue test driver: implemented network events Add network events unit tests daemon/remote.c: renamed remoteDispatchDomainEventSend Add network events to the remote driver Added network events to the bridged network driver .gitignore | 1 + cfg.mk | 6 +- daemon/libvirtd.h | 1 + daemon/remote.c | 175 ++- include/libvirt/libvirt.h.in | 86 ++ src/Makefile.am | 6 + src/conf/domain_event.c | 1954 ++++++++++++++-------------------- src/conf/domain_event.h | 219 ++-- src/conf/object_event.c | 903 ++++++++++++++++ src/conf/object_event.h | 113 ++ src/conf/object_event_private.h | 113 ++ src/driver.h | 14 + src/libvirt.c | 133 +++ src/libvirt_private.syms | 25 +- src/libvirt_public.syms | 7 + src/libxl/libxl_conf.h | 2 +- src/libxl/libxl_driver.c | 46 +- src/lxc/lxc_conf.h | 2 +- src/lxc/lxc_driver.c | 54 +- src/lxc/lxc_process.c | 20 +- src/network/bridge_driver.c | 89 ++ src/network/bridge_driver_platform.h | 3 + src/parallels/parallels_utils.h | 2 +- src/qemu/qemu_conf.h | 2 +- src/qemu/qemu_domain.c | 6 +- src/qemu/qemu_domain.h | 2 +- src/qemu/qemu_driver.c | 116 +- src/qemu/qemu_hotplug.c | 10 +- src/qemu/qemu_migration.c | 38 +- src/qemu/qemu_process.c | 70 +- src/remote/remote_driver.c | 178 +++- src/remote/remote_protocol.x | 46 +- src/test/test_driver.c | 197 ++-- src/uml/uml_conf.h | 2 +- src/uml/uml_driver.c | 44 +- src/vbox/vbox_tmpl.c | 22 +- src/xen/xen_driver.c | 10 +- src/xen/xen_driver.h | 4 +- src/xen/xen_inotify.c | 10 +- src/xen/xs_internal.c | 20 +- tests/Makefile.am | 7 + tests/objecteventtest.c | 407 +++++++ tests/qemuhotplugtest.c | 2 +- 43 files changed, 3525 insertions(+), 1642 deletions(-) create mode 100644 src/conf/object_event.c create mode 100644 src/conf/object_event.h create mode 100644 src/conf/object_event_private.h create mode 100644 tests/objecteventtest.c -- 1.8.4.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list