2005-12-19 16:34:11 +00:00
|
|
|
/*
|
2006-02-09 17:45:11 +00:00
|
|
|
* libvirt_wrap.h: type wrappers for libvir python bindings
|
2005-12-19 16:34:11 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2005 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* Daniel Veillard <veillard@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <Python.h>
|
2006-02-09 17:45:11 +00:00
|
|
|
#include <libvirt.h>
|
2006-03-28 09:50:17 +00:00
|
|
|
#include <virterror.h>
|
2005-12-19 16:34:11 +00:00
|
|
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
#ifdef ATTRIBUTE_UNUSED
|
|
|
|
#undef ATTRIBUTE_UNUSED
|
|
|
|
#endif
|
|
|
|
#ifndef ATTRIBUTE_UNUSED
|
|
|
|
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
|
|
|
#endif /* ATTRIBUTE_UNUSED */
|
|
|
|
#else
|
|
|
|
#define ATTRIBUTE_UNUSED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define PyvirConnect_Get(v) (((v) == Py_None) ? NULL : \
|
|
|
|
(((PyvirConnect_Object *)(v))->obj))
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
PyObject_HEAD
|
|
|
|
virConnectPtr obj;
|
|
|
|
} PyvirConnect_Object;
|
|
|
|
|
|
|
|
|
|
|
|
#define PyvirDomain_Get(v) (((v) == Py_None) ? NULL : \
|
|
|
|
(((PyvirDomain_Object *)(v))->obj))
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
PyObject_HEAD
|
|
|
|
virDomainPtr obj;
|
|
|
|
} PyvirDomain_Object;
|
|
|
|
|
|
|
|
|
2006-02-09 17:45:11 +00:00
|
|
|
PyObject * libvirt_intWrap(int val);
|
|
|
|
PyObject * libvirt_longWrap(long val);
|
|
|
|
PyObject * libvirt_longlongWrap(long long val);
|
|
|
|
PyObject * libvirt_charPtrWrap(char *str);
|
|
|
|
PyObject * libvirt_constcharPtrWrap(const char *str);
|
|
|
|
PyObject * libvirt_charPtrConstWrap(const char *str);
|
|
|
|
PyObject * libvirt_virConnectPtrWrap(virConnectPtr node);
|
|
|
|
PyObject * libvirt_virDomainPtrWrap(virDomainPtr node);
|
2005-12-19 16:34:11 +00:00
|
|
|
|