]> xenbits.xensource.com Git - libvirt.git/commit
Update event loop example programs to demonstrate best practice
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 23 Mar 2011 14:30:30 +0000 (14:30 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 29 Mar 2011 09:59:46 +0000 (10:59 +0100)
commit0c97e70b74434b4baca9bbfc19c14bf7ff2ef304
tree9137474f4a8500484d589466d113a4b7bdb654df
parent83b77fa58932187fdc30501f538eb7b43c3af2a6
Update event loop example programs to demonstrate best practice

The example C event loop code is a nasty hack and not compliant
with the require API semantics. Delete this, so that developers
don't mistakenly copy it. Instead call the new public event loop
APIs.

Update the python event loop example, so that it can optionally
use the public event APIs, as an alternative to the pure python
code. The pure python event code is a good working example, so
don't delete it.

Also make the python example use a read only connection to avoid
authentication prompts

* examples/domain-events/events-c/event-test.c: Replace event
  loop code with use of public APIs
* examples/domain-events/events-python/event-test.py: Allow
  optional use of new public event APIs
examples/domain-events/events-c/event-test.c
examples/domain-events/events-python/event-test.py