On Wed, Jan 29, 2014 at 10:49:23AM -0700, Eric Blake wrote: > We want to convert over to server-side events, even for older > APIs. To do that, the client side of the remote driver wants > to distinguish between legacy virConnectDomainEventRegister and > normal virConnectDomainEventRegisterAny, while knowing the > client callbackID and the server's serverID for both types of > registration. The client also needs to probe whether the > server supports server-side filtering. However, for ease of > review, we don't actually use the new RPCs until a later patch. > > * src/conf/object_event_private.h (virObjectEventStateCallbackID): > Add parameter. > * src/conf/object_event.c (virObjectEventCallbackListAddID) > (virObjectEventStateRegisterID): Separate legacy from callbackID. > (virObjectEventStateCallbackID): Pass through parameter. > (virObjectEventCallbackLookup): Let legacy and global domain > lifecycle events share a common remoteID. > * src/conf/network_event.c (virNetworkEventStateRegisterID): > Update caller. > * src/conf/domain_event.c (virDomainEventStateRegister) > (virDomainEventStateRegisterID, virDomainEventStateDeregister): > Likewise. > (virDomainEventStateRegisterClient) > (virDomainEventStateCallbackID): Implement new functions. > * src/conf/domain_event.h (virDomainEventStateRegisterClient) > (virDomainEventStateCallbackID): New prototypes. > * src/remote/remote_driver.c (private_data): Add field. > (doRemoteOpen): Probe server feature. > (remoteConnectDomainEventRegister) > (remoteConnectDomainEventRegisterAny): Use new function. > > Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> > --- > src/conf/domain_event.c | 78 +++++++++++++++++++++++++++++++++++++++-- > src/conf/domain_event.h | 22 ++++++++++++ > src/conf/network_event.c | 6 ++-- > src/conf/object_event.c | 35 +++++++++--------- > src/conf/object_event_private.h | 6 ++-- > src/remote/remote_driver.c | 36 +++++++++++++++---- > 6 files changed, 154 insertions(+), 29 deletions(-) ACK 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 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list