[libvirt] [RFC] Events API

David Lively dlively at virtualiron.com
Mon Sep 22 15:11:17 UTC 2008


Okay - I'm looking at glib docs.  You guys are suggesting I create
something that's easy to plug into a glib main loop, right?
So ... something that's easy to "wrap" with a GSource via
g_source_new()?  (Stop me now if I'm on the wrong track!)  So ...
something that plugs into GSourceFuncs elements (in particular
prepare/check/dispatch/finalize) easily??

   int virEventsNeedDelivering(virConnectionPtr conn)
   int virEventsDispatch(virConnectionPtr conn)
   int virEventsCleanup(virConnectionPtr conn)

and perhaps:
   int virEventsRunOnce(virConnectionPtr conn)

to wrap them all for non-glib-ish implementations?

Sorry if I'm being dense.  I've looked at the qemud events interface,
but I still feel like I'm missing something here.

Dave

On Mon, 2008-09-22 at 07:23 +0100, Richard W.M. Jones wrote:
> On Fri, Sep 19, 2008 at 11:08:37AM -0400, David Lively wrote:
> > 	int virDeliverEvents(int timeout)
> 
> This isn't really much use because it doesn't integrate with common
> main loops.  I suggest you look at glib to see how it handles main
> loops and how to integrate with it.
> 
> Rich.
> 




More information about the libvir-list mailing list