mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
182eba1bc6
* include/libvirt/libvirt.h.in: Public API contract for virStreamPtr object * src/libvirt_public.syms: Export data stream APIs * src/libvirt_private.syms: Export internal helper APIs * src/libvirt.c: Data stream API driver dispatch * src/datatypes.h, src/datatypes.c: Internal helpers for virStreamPtr object * src/driver.h: Define internal driver API for streams * .x-sc_avoid_write: Ignore src/libvirt.c because it trips up on comments including write() * python/Makefile.am: Add libvirt-override-virStream.py * python/generator.py: Add rules for virStreamPtr class * python/typewrappers.h, python/typewrappers.c: Wrapper for virStreamPtr * docs/libvirt-api.xml, docs/libvirt-refs.xml: Regenerate with new APIs
21 lines
621 B
Python
21 lines
621 B
Python
def __del__(self):
|
|
try:
|
|
if self.cb:
|
|
libvirtmod.virStreamEventRemoveCallback(self._o)
|
|
except AttributeError:
|
|
pass
|
|
|
|
if self._o != None:
|
|
libvirtmod.virStreamFree(self._o)
|
|
self._o = None
|
|
|
|
def eventAddCallback(self, cb, opaque):
|
|
""" """
|
|
try:
|
|
self.cb = cb
|
|
self.opaque = opaque
|
|
ret = libvirtmod.virStreamEventAddCallback(self._o, self)
|
|
if ret == -1: raise libvirtError ('virStreamEventAddCallback() failed', conn=self._conn)
|
|
except AttributeError:
|
|
pass
|