From 626e52010b6151cbae01e91aa0b94dae8490537c Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Thu, 29 Apr 2010 06:46:01 -0400 Subject: nwfilter: python bindings for nwfilter I have primarily followed the pattern of the 'secret' driver to provide support for the missing python bindings for the network filter API. --- typewrappers.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'typewrappers.h') diff --git a/typewrappers.h b/typewrappers.h index c0e69d8..cb5e5db 100644 --- a/typewrappers.h +++ b/typewrappers.h @@ -91,6 +91,14 @@ typedef struct { virSecretPtr obj; } PyvirSecret_Object; +#define PyvirNWFilter_Get(v) (((v) == Py_None) ? NULL : \ + (((PyvirNWFilter_Object *)(v))->obj)) + +typedef struct { + PyObject_HEAD + virNWFilterPtr obj; +} PyvirNWFilter_Object; + #define PyvirStream_Get(v) (((v) == Py_None) ? NULL : \ (((PyvirStream_Object *)(v))->obj)) @@ -163,6 +171,7 @@ PyObject * libvirt_virFreeCallbackWrap(virFreeCallback node); PyObject * libvirt_virVoidPtrWrap(void* node); PyObject * libvirt_virNodeDevicePtrWrap(virNodeDevicePtr node); PyObject * libvirt_virSecretPtrWrap(virSecretPtr node); +PyObject * libvirt_virNWFilterPtrWrap(virNWFilterPtr node); PyObject * libvirt_virStreamPtrWrap(virStreamPtr node); PyObject * libvirt_virDomainSnapshotPtrWrap(virDomainSnapshotPtr node); -- cgit