1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-11-09 04:24:18 +03:00

* python/Makefile.am python/generator.py python/libvir.c

python/libvir.py python/libvirt_wrap.h python/types.c:
  adds support for events from the python bindings, also
  improves the generator allowing to embbed per function
  definition files, patch by Ben Guthro
* examples/domain-events/events-python/event-test.py: also
  adds a programming example
Daniel
This commit is contained in:
Daniel Veillard
2008-10-31 10:13:45 +00:00
parent c5ee075dd9
commit 7b716fce8e
8 changed files with 749 additions and 6 deletions

View File

@@ -162,3 +162,50 @@ libvirt_virConnectPtrWrap(virConnectPtr node)
NULL);
return (ret);
}
PyObject *
libvirt_virEventHandleCallbackWrap(virEventHandleCallback node)
{
PyObject *ret;
if (node == NULL) {
Py_INCREF(Py_None);
printf("%s: WARNING - Wrapping None\n", __FUNCTION__);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "virEventHandleCallback",
NULL);
return (ret);
}
PyObject *
libvirt_virEventTimeoutCallbackWrap(virEventTimeoutCallback node)
{
PyObject *ret;
if (node == NULL) {
printf("%s: WARNING - Wrapping None\n", __FUNCTION__);
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "virEventTimeoutCallback",
NULL);
return (ret);
}
PyObject *
libvirt_virVoidPtrWrap(void* node)
{
PyObject *ret;
if (node == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "void*",
NULL);
return (ret);
}