From 4406d01e7c03522ff2e05e156980dad14814bbfa Mon Sep 17 00:00:00 2001 From: Anant Narayanan Date: Fri, 29 Sep 2006 18:55:15 +0000 Subject: [PATCH] Now _THIS_ is called a Python Binding :) --- libburn/burnmodule.c | 1708 -------------------------------------- libburn/setup.py | 34 +- libburn/src/burnmodule.c | 218 +++++ libburn/src/disc.c | 70 ++ libburn/src/disc.h | 24 + libburn/src/drive.c | 127 +++ libburn/src/drive.h | 35 + libburn/src/drive_info.c | 43 + libburn/src/drive_info.h | 21 + libburn/src/message.c | 31 + libburn/src/message.h | 18 + libburn/src/progress.c | 31 + libburn/src/progress.h | 18 + libburn/src/read_opts.c | 97 +++ libburn/src/read_opts.h | 27 + libburn/src/session.c | 84 ++ libburn/src/session.h | 26 + libburn/src/source.c | 31 + libburn/src/source.h | 18 + libburn/src/toc_entry.c | 31 + libburn/src/toc_entry.h | 18 + libburn/src/track.c | 84 ++ libburn/src/track.h | 26 + libburn/src/write_opts.c | 94 +++ libburn/src/write_opts.h | 27 + 25 files changed, 1223 insertions(+), 1718 deletions(-) delete mode 100644 libburn/burnmodule.c create mode 100644 libburn/src/burnmodule.c create mode 100644 libburn/src/disc.c create mode 100644 libburn/src/disc.h create mode 100644 libburn/src/drive.c create mode 100644 libburn/src/drive.h create mode 100644 libburn/src/drive_info.c create mode 100644 libburn/src/drive_info.h create mode 100644 libburn/src/message.c create mode 100644 libburn/src/message.h create mode 100644 libburn/src/progress.c create mode 100644 libburn/src/progress.h create mode 100644 libburn/src/read_opts.c create mode 100644 libburn/src/read_opts.h create mode 100644 libburn/src/session.c create mode 100644 libburn/src/session.h create mode 100644 libburn/src/source.c create mode 100644 libburn/src/source.h create mode 100644 libburn/src/toc_entry.c create mode 100644 libburn/src/toc_entry.h create mode 100644 libburn/src/track.c create mode 100644 libburn/src/track.h create mode 100644 libburn/src/write_opts.c create mode 100644 libburn/src/write_opts.h diff --git a/libburn/burnmodule.c b/libburn/burnmodule.c deleted file mode 100644 index b468bea..0000000 --- a/libburn/burnmodule.c +++ /dev/null @@ -1,1708 +0,0 @@ -#include "Python.h" -#include "libburn/libburn.h" - -static PyObject *ErrorObject; - - -/* Declarations for objects of type toc_entry */ -typedef struct { - PyObject_HEAD - struct burn_toc_entry *toc; -} b_toc_entryobject; - -static PyTypeObject B_toc_entrytype; - - -/* Declarations for objects of type source */ -typedef struct { - PyObject_HEAD - struct burn_source *source; -} b_sourceobject; - -static PyTypeObject B_sourcetype; - - -/* Declarations for objects of type drive_info */ -typedef struct { - PyObject_HEAD - struct burn_drive_info *info; -} b_drive_infoobject; - -static PyTypeObject B_drive_infotype; - - -/* Declarations for objects of type message */ -typedef struct { - PyObject_HEAD - struct burn_message *message; -} b_messageobject; - -static PyTypeObject B_messagetype; - - -/* Declarations for objects of type progress */ -typedef struct { - PyObject_HEAD - struct burn_progress *progress; -} b_progressobject; - -static PyTypeObject B_progresstype; - -/* These are virtual types */ - -/* Declarations for objects of type drive */ -typedef struct { - PyObject_HEAD - struct burn_drive *drive; -} b_driveobject; - -static PyTypeObject B_drivetype; - - -/* Declarations for objects of type disc */ -typedef struct { - PyObject_HEAD - struct burn_disc *disc; -} b_discobject; - -static PyTypeObject B_disctype; - - -/* Declarations for objects of type session */ -typedef struct { - PyObject_HEAD - struct burn_session *session; -} b_sessionobject; - -static PyTypeObject B_sessiontype; - - -/* Declarations for objects of type track */ -typedef struct { - PyObject_HEAD - struct burn_track *track; -} b_trackobject; - -static PyTypeObject B_tracktype; - - -/* Declarations for objects of type write_options */ -typedef struct { - PyObject_HEAD - struct burn_write_opts *options; -} b_write_optsobject; - -static PyTypeObject B_write_optstype; - - -/* Declarations for objects of type read_options */ -typedef struct { - PyObject_HEAD - struct burn_read_opts *options; -} b_read_optsobject; - -static PyTypeObject B_read_optstype; - - -/* BEGIN burn_toc_entry */ -static struct PyMethodDef b_toc_entry_methods[] = { - {NULL, NULL} -}; - -static b_toc_entryobject * -newb_toc_entryobject() -{ - b_toc_entryobject *self; - - self = PyObject_NEW(b_toc_entryobject, &B_toc_entrytype); - if (self == NULL) - return NULL; - - return self; -} - -static void -b_toc_entry_dealloc(b_toc_entryobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_toc_entrytype__doc__[] = -"" -; -static PyTypeObject B_toc_entrytype = { - PyObject_HEAD_INIT(&PyType_Type) - .tp_name = "burn.toc_entry", - .tp_basicsize = sizeof(b_toc_entryobject), - .tp_dealloc = (destructor)b_toc_entry_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_doc = B_toc_entrytype__doc__, -}; -/* END burn_toc_entry */ - - -/* BEGIN burn_source */ -static char b_source_free__doc__[] = -"" -; -static PyObject * -b_source_free(b_sourceobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_source_file_new__doc__[] = -"" -; -static PyObject * -b_source_file_new(b_sourceobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_source_fd_new__doc__[] = -"" -; -static PyObject * -b_source_fd_new(b_sourceobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static struct PyMethodDef b_source_methods[] = { - {"free", (PyCFunction)b_source_free, METH_VARARGS, b_source_free__doc__}, - {"file_new", (PyCFunction)b_source_file_new, METH_VARARGS, b_source_file_new__doc__}, - {"fd_new", (PyCFunction)b_source_fd_new, METH_VARARGS, b_source_fd_new__doc__}, - {NULL, NULL} -}; - -static PyObject * -b_source_getattr(b_sourceobject *self, char *name) -{ - /* XXXX Add your own getattr code here */ - return Py_FindMethod(b_source_methods, (PyObject *)self, name); -} - -static b_sourceobject * -newb_sourceobject() -{ - b_sourceobject *self; - - self = PyObject_NEW(b_sourceobject, &B_sourcetype); - if (self == NULL) - return NULL; - /* XXXX Add your own initializers here */ - return self; -} - -static void -b_source_dealloc(b_sourceobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_sourcetype__doc__[] = -"" -; -static PyTypeObject B_sourcetype = { - PyObject_HEAD_INIT(&PyType_Type) - 0, /*ob_size*/ - "burn.source", /*tp_name*/ - sizeof(b_sourceobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - - /* methods */ - (destructor)b_source_dealloc, /*tp_dealloc*/ - (printfunc)0, /*tp_print*/ - (getattrfunc)b_source_getattr, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)0, /*tp_compare*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - - /* Space for future expansion */ - 0L,0L,0L,0L, - B_sourcetype__doc__ /* Documentation string */ -}; -/* END burn_source */ - - -/* BEGIN burn_drive_info */ -static char b_drive_info_forget__doc__[] = -"" -; -static PyObject * -b_drive_info_forget(b_drive_infoobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_drive_info_free__doc__[] = -"" -; -static PyObject * -b_drive_info_free(b_drive_infoobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static struct PyMethodDef b_drive_info_methods[] = { - {"forget", (PyCFunction)b_drive_info_forget, METH_VARARGS, b_drive_info_forget__doc__}, - {"free", (PyCFunction)b_drive_info_free, METH_VARARGS, b_drive_info_free__doc__}, - {NULL, NULL} -}; - -static PyObject * -b_drive_info_getattr(b_drive_infoobject *self, char *name) -{ - if (!strcmp (name, "vendor")) - return PyString_FromString(self->info->vendor); - else if (!strcmp (name, "product")) - return PyString_FromString(self->info->product); - else if (!strcmp (name, "revision")) - return PyString_FromString(self->info->revision); - else if (!strcmp (name, "location")) - return PyString_FromString(self->info->location); - else if (!strcmp (name, "buffer_size")) - return PyInt_FromLong(self->info->buffer_size); -} - -static b_drive_infoobject * -newb_drive_infoobject(struct burn_drive_info *obj) -{ - b_drive_infoobject *self; - - self = PyObject_NEW(b_drive_infoobject, &B_drive_infotype); - self->info = obj; - - return self; -} - -static void -b_drive_info_dealloc(b_drive_infoobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_drive_infotype__doc__[] = -"" -; -static PyTypeObject B_drive_infotype = { - PyObject_HEAD_INIT(&PyType_Type) - .tp_name = "burn.drive_info", - .tp_basicsize = sizeof(b_drive_infoobject), - .tp_dealloc = (destructor)b_drive_info_dealloc, - .tp_getattr = (getattrfunc)b_drive_info_getattr, - .tp_methods = b_drive_info_methods, - .tp_new = PyType_GenericNew, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | Py_TPFLAGS_BASETYPE, - .tp_doc = B_drive_infotype__doc__, -}; - -/* END burn_drive_info */ - - -/* BEGIN burn_drive */ -static char b_drive_grab__doc__[] = -"" -; -static PyObject * -b_drive_grab(b_driveobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_drive_release__doc__[] = -"" -; -static PyObject * -b_drive_release(b_driveobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_drive_disc_get_status__doc__[] = -"" -; -static PyObject * -b_drive_get_status(b_driveobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_drive_cancel__doc__[] = -"" -; -static PyObject * -b_drive_cancel(b_driveobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_drive_get_disc__doc__[] = -"" -; -static PyObject * -b_drive_get_disc(b_driveobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_drive_set_speed__doc__[] = -"" -; -static PyObject * -b_drive_set_speed(b_driveobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_drive_get_write_speed__doc__[] = -"" -; -static PyObject * -b_drive_get_write_speed(b_driveobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_drive_get_read_speed__doc__[] = -"" -; -static PyObject * -b_drive_get_read_speed(b_driveobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static struct PyMethodDef b_drive_methods[] = { - {"grab", (PyCFunction)b_drive_grab, METH_VARARGS, b_drive_grab__doc__}, - {"release", (PyCFunction)b_drive_release, METH_VARARGS, b_drive_release__doc__}, - {"get_status", (PyCFunction)b_drive_get_status, METH_VARARGS, b_drive_disc_get_status__doc__}, - {"cancel", (PyCFunction)b_drive_cancel, METH_VARARGS, b_drive_cancel__doc__}, - {"get_disc", (PyCFunction)b_drive_get_disc, METH_VARARGS, b_drive_get_disc__doc__}, - {"set_speed", (PyCFunction)b_drive_set_speed, METH_VARARGS, b_drive_set_speed__doc__}, - {"get_write_speed", (PyCFunction)b_drive_get_write_speed, METH_VARARGS, b_drive_get_write_speed__doc__}, - {"get_read_speed", (PyCFunction)b_drive_get_read_speed, METH_VARARGS, b_drive_get_read_speed__doc__}, - {NULL, NULL} -}; - -static PyObject * -b_drive_getattr(b_driveobject *self, char *name) -{ - /* XXXX Add your own getattr code here */ - return Py_FindMethod(b_drive_methods, (PyObject *)self, name); -} - -static b_driveobject * -newb_driveobject() -{ - b_driveobject *self; - - self = PyObject_NEW(b_driveobject, &B_drivetype); - if (self == NULL) - return NULL; - /* XXXX Add your own initializers here */ - return self; -} - -static void -b_drive_dealloc(b_driveobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_drivetype__doc__[] = -"" -; -static PyTypeObject B_drivetype = { - PyObject_HEAD_INIT(&PyType_Type) - 0, /*ob_size*/ - "burn.drive", /*tp_name*/ - sizeof(b_driveobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - - /* methods */ - (destructor)b_drive_dealloc, /*tp_dealloc*/ - (printfunc)0, /*tp_print*/ - (getattrfunc)b_drive_getattr, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)0, /*tp_compare*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - - /* Space for future expansion */ - 0L,0L,0L,0L, - B_drivetype__doc__ /* Documentation string */ -}; -/* END burn_drive */ - - -/* BEGIN burn_message */ -static char b_message_free__doc__[] = -"" -; -static PyObject * -b_message_free(b_messageobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static struct PyMethodDef b_message_methods[] = { - {"free", (PyCFunction)b_message_free, METH_VARARGS, b_message_free__doc__}, - {NULL, NULL} -}; - -static PyObject * -b_message_getattr(b_messageobject *self, char *name) -{ - /* XXXX Add your own getattr code here */ - return Py_FindMethod(b_message_methods, (PyObject *)self, name); -} - -static b_messageobject * -newb_messageobject() -{ - b_messageobject *self; - - self = PyObject_NEW(b_messageobject, &B_messagetype); - if (self == NULL) - return NULL; - /* XXXX Add your own initializers here */ - return self; -} - -static void -b_message_dealloc(b_messageobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_messagetype__doc__[] = -"" -; -static PyTypeObject B_messagetype = { - PyObject_HEAD_INIT(&PyType_Type) - 0, /*ob_size*/ - "burn.message", /*tp_name*/ - sizeof(b_messageobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - - /* methods */ - (destructor)b_message_dealloc, /*tp_dealloc*/ - (printfunc)0, /*tp_print*/ - (getattrfunc)b_message_getattr, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)0, /*tp_compare*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - - /* Space for future expansion */ - 0L,0L,0L,0L, - B_messagetype__doc__ /* Documentation string */ -}; -/* END burn_message */ - - -/* BEGIN burn_progress */ -static struct PyMethodDef b_progress_methods[] = { - {NULL, NULL} -}; - -static b_progressobject * -newb_progressobject() -{ - b_progressobject *self; - - self = PyObject_NEW(b_progressobject, &B_progresstype); - if (self == NULL) - return NULL; - /* XXXX Add your own initializers here */ - return self; -} - -static void -b_progress_dealloc(b_progressobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_progresstype__doc__[] = -"" -; -static PyTypeObject B_progresstype = { - PyObject_HEAD_INIT(&PyType_Type) - 0, /*ob_size*/ - "burn.progress", /*tp_name*/ - sizeof(b_progressobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - - /* methods */ - (destructor)b_progress_dealloc, /*tp_dealloc*/ - (printfunc)0, /*tp_print*/ - (getattrfunc)0, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)0, /*tp_compare*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - - /* Space for future expansion */ - 0L,0L,0L,0L, - B_progresstype__doc__ /* Documentation string */ -}; -/* END burn_progress */ - - -/* BEGIN burn_write_opts */ -static char b_write_opts_free__doc__[] = -"" -; -static PyObject * -b_write_opts_free(b_write_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - - -static char b_write_opts_set_write_type__doc__[] = -"" -; -static PyObject * -b_write_opts_set_write_type(b_write_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_write_opts_set_toc_entries__doc__[] = -"" -; -static PyObject * -b_write_opts_set_toc_entries(b_write_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_write_opts_set_format__doc__[] = -"" -; -static PyObject * -b_write_opts_set_format(b_write_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_write_opts_set_simulate__doc__[] = -"" -; -static PyObject * -b_write_opts_set_simulate(b_write_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - - -static char b_write_opts_set_underrun_proof__doc__[] = -"" -; -static PyObject * -b_write_opts_set_underrun_proof(b_write_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_write_opts_set_perform_opc__doc__[] = -"" -; -static PyObject * -b_write_opts_set_perform_opc(b_write_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_write_opts_set_has_mediacatalog__doc__[] = -"" -; -static PyObject * -b_write_opts_set_has_mediacatalog(b_write_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_write_opts_set_mediacatalog__doc__[] = -"" -; -static PyObject * -b_write_opts_set_mediacatalog(b_write_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static struct PyMethodDef b_write_opts_methods[] = { - {"free", (PyCFunction)b_write_opts_free, METH_VARARGS, b_write_opts_free__doc__}, - {"set_write_type", (PyCFunction)b_write_opts_set_write_type, METH_VARARGS, b_write_opts_set_write_type__doc__}, - {"set_toc_entries", (PyCFunction)b_write_opts_set_toc_entries, METH_VARARGS, b_write_opts_set_toc_entries__doc__}, - {"set_format", (PyCFunction)b_write_opts_set_format, METH_VARARGS, b_write_opts_set_format__doc__}, - {"set_simulate", (PyCFunction)b_write_opts_set_simulate, METH_VARARGS, b_write_opts_set_simulate__doc__}, - {"set_underrun_proof", (PyCFunction)b_write_opts_set_underrun_proof, METH_VARARGS, b_write_opts_set_underrun_proof__doc__}, - {"set_perform_opc", (PyCFunction)b_write_opts_set_perform_opc, METH_VARARGS, b_write_opts_set_perform_opc__doc__}, - {"set_has_mediacatalog", (PyCFunction)b_write_opts_set_has_mediacatalog, METH_VARARGS, b_write_opts_set_has_mediacatalog__doc__}, - {"set_has_mediacatalog", (PyCFunction)b_write_opts_set_has_mediacatalog, METH_VARARGS, b_write_opts_set_has_mediacatalog__doc__}, - {NULL, NULL} -}; - -static PyObject * -b_write_opts_getattr(b_write_optsobject *self, char *name) -{ - /* XXXX Add your own getattr code here */ - return Py_FindMethod(b_write_opts_methods, (PyObject *)self, name); -} - -static b_write_optsobject * -newb_write_optsobject() -{ - b_write_optsobject *self; - - self = PyObject_NEW(b_write_optsobject, &B_write_optstype); - if (self == NULL) - return NULL; - /* XXXX Add your own initializers here */ - return self; -} - -static void -b_write_opts_dealloc(b_write_optsobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_write_optstype__doc__[] = -"" -; -static PyTypeObject B_write_optstype = { - PyObject_HEAD_INIT(&PyType_Type) - 0, /*ob_size*/ - "burn.write_opts", /*tp_name*/ - sizeof(b_write_optsobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - - /* methods */ - (destructor)b_write_opts_dealloc, /*tp_dealloc*/ - (printfunc)0, /*tp_print*/ - (getattrfunc)b_write_opts_getattr, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)0, /*tp_compare*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - - /* Space for future expansion */ - 0L,0L,0L,0L, - B_write_optstype__doc__ /* Documentation string */ -}; -/* END burn_write_opts */ - - -/* BEGIN burn_read_opts */ -static char b_read_opts_free__doc__[] = -"" -; -static PyObject * -b_read_opts_free(b_read_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_read_opts_set_raw__doc__[] = -"" -; -static PyObject * -b_read_opts_set_raw(b_read_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_read_opts_set_c2errors__doc__[] = -"" -; -static PyObject * -b_read_opts_set_c2errors(b_read_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_read_opts_read_subcodes_audio__doc__[] = -"" -; -static PyObject * -b_read_opts_read_subcodes_audio(b_read_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_read_opts_read_subcodes_data__doc__[] = -"" -; -static PyObject * -b_read_opts_read_subcodes_data(b_read_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_read_opts_set_hardware_error_recovery__doc__[] = -"" -; -static PyObject * -b_read_opts_set_hardware_error_recovery(b_read_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_read_opts_report_recovered_errors__doc__[] = -"" -; -static PyObject * -b_read_opts_report_recovered_errors(b_read_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_read_opts_transfer_damaged_blocks__doc__[] = -"" -; -static PyObject * -b_read_opts_transfer_damaged_blocks(b_read_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_read_opts_set_hardware_error_retries__doc__[] = -"" -; -static PyObject * -b_read_opts_set_hardware_error_retries(b_read_optsobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static struct PyMethodDef b_read_opts_methods[] = { - {"free", (PyCFunction)b_read_opts_free, METH_VARARGS, b_read_opts_free__doc__}, - {"set_raw", (PyCFunction)b_read_opts_set_raw, METH_VARARGS, b_read_opts_set_raw__doc__}, - {"set_c2errors", (PyCFunction)b_read_opts_set_c2errors, METH_VARARGS, b_read_opts_set_c2errors__doc__}, - {"read_subcodes_audio", (PyCFunction)b_read_opts_read_subcodes_audio, METH_VARARGS, b_read_opts_read_subcodes_audio__doc__}, - {"read_subcodes_data", (PyCFunction)b_read_opts_read_subcodes_data, METH_VARARGS, b_read_opts_read_subcodes_data__doc__}, - {"set_hardware_error_recovery", (PyCFunction)b_read_opts_set_hardware_error_recovery, METH_VARARGS, b_read_opts_set_hardware_error_recovery__doc__}, - {"report_recovered_errors", (PyCFunction)b_read_opts_report_recovered_errors, METH_VARARGS, b_read_opts_report_recovered_errors__doc__}, - {"transfer_damaged_blocks", (PyCFunction)b_read_opts_transfer_damaged_blocks, METH_VARARGS, b_read_opts_transfer_damaged_blocks__doc__}, - {"set_hardware_error_retries", (PyCFunction)b_read_opts_set_hardware_error_retries, METH_VARARGS, b_read_opts_set_hardware_error_retries__doc__}, - {NULL, NULL} -}; - -static PyObject * -b_read_opts_getattr(b_read_optsobject *self, char *name) -{ - /* XXXX Add your own getattr code here */ - return Py_FindMethod(b_read_opts_methods, (PyObject *)self, name); -} - -static b_read_optsobject * -newb_read_optsobject() -{ - b_read_optsobject *self; - - self = PyObject_NEW(b_read_optsobject, &B_read_optstype); - if (self == NULL) - return NULL; - /* XXXX Add your own initializers here */ - return self; -} - -static void -b_read_opts_dealloc(b_read_optsobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_read_optstype__doc__[] = -"" -; -static PyTypeObject B_read_optstype = { - PyObject_HEAD_INIT(&PyType_Type) - 0, /*ob_size*/ - "burn.read_opts", /*tp_name*/ - sizeof(b_read_optsobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - - /* methods */ - (destructor)b_read_opts_dealloc, /*tp_dealloc*/ - (printfunc)0, /*tp_print*/ - (getattrfunc)b_read_opts_getattr, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)0, /*tp_compare*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - - /* Space for future expansion */ - 0L,0L,0L,0L, - B_read_optstype__doc__ /* Documentation string */ -}; -/* END burn_read_opts */ - - -/* BEGIN burn_disc */ -static char b_disc_free__doc__[] = -"" -; -static PyObject * -b_disc_free(b_discobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_disc_write__doc__[] = -"" -; -static PyObject * -b_disc_write(b_discobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_disc_add_session__doc__[] = -"" -; -static PyObject * -b_disc_add_session(b_discobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_disc_remove_session__doc__[] = -"" -; -static PyObject * -b_disc_remove_session(b_discobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_disc_get_sessions__doc__[] = -"" -; -static PyObject * -b_disc_get_sessions(b_discobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_disc_get_sectors__doc__[] = -"" -; -static PyObject * -b_disc_get_sectors(b_discobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static struct PyMethodDef b_disc_methods[] = { - {"free", (PyCFunction)b_disc_free, METH_VARARGS, b_disc_free__doc__}, - {"write", (PyCFunction)b_disc_write, METH_VARARGS, b_disc_write__doc__}, - {"add_session", (PyCFunction)b_disc_add_session, METH_VARARGS, b_disc_add_session__doc__}, - {"remove_session", (PyCFunction)b_disc_remove_session, METH_VARARGS, b_disc_remove_session__doc__}, - {"get_sessions", (PyCFunction)b_disc_get_sessions, METH_VARARGS, b_disc_get_sessions__doc__}, - {"get_sectors", (PyCFunction)b_disc_get_sectors, METH_VARARGS, b_disc_get_sectors__doc__}, - {NULL, NULL} -}; - -static PyObject * -b_disc_getattr(b_discobject *self, char *name) -{ - /* XXXX Add your own getattr code here */ - return Py_FindMethod(b_disc_methods, (PyObject *)self, name); -} - -static b_discobject * -newb_discobject() -{ - b_discobject *self; - - self = PyObject_NEW(b_discobject, &B_disctype); - if (self == NULL) - return NULL; - /* XXXX Add your own initializers here */ - return self; -} - -static void -b_disc_dealloc(b_discobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_disctype__doc__[] = -"" -; -static PyTypeObject B_disctype = { - PyObject_HEAD_INIT(&PyType_Type) - 0, /*ob_size*/ - "burn.disc", /*tp_name*/ - sizeof(b_discobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - - /* methods */ - (destructor)b_disc_dealloc, /*tp_dealloc*/ - (printfunc)0, /*tp_print*/ - (getattrfunc)b_disc_getattr, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)0, /*tp_compare*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - - /* Space for future expansion */ - 0L,0L,0L,0L, - B_disctype__doc__ /* Documentation string */ -}; -/* END burn_disc */ - - -/* BEGIN burn_session */ -static char b_session_free__doc__[] = -"" -; -static PyObject * -b_session_free(b_sessionobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_session_add_track__doc__[] = -"" -; -static PyObject * -b_session_add_track(b_sessionobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_session_remove_track__doc__[] = -"" -; -static PyObject * -b_session_remove_track(b_sessionobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_session_hide_first_track__doc__[] = -"" -; -static PyObject * -b_session_hide_first_track(b_sessionobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_session_get_leadout_entry__doc__[] = -"" -; -static PyObject * -b_session_get_leadout_entry(b_sessionobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_session_get_tracks__doc__[] = -"" -; -static PyObject * -b_session_get_tracks(b_sessionobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_session_get_sectors__doc__[] = -"" -; -static PyObject * -b_session_get_sectors(b_sessionobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_session_get_hidefirst__doc__[] = -"" -; -static PyObject * -b_session_get_hidefirst(b_sessionobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static struct PyMethodDef b_session_methods[] = { - {"free", (PyCFunction)b_session_free, METH_VARARGS, b_session_free__doc__}, - {"add_track", (PyCFunction)b_session_add_track, METH_VARARGS, b_session_add_track__doc__}, - {"remove_track", (PyCFunction)b_session_remove_track, METH_VARARGS, b_session_remove_track__doc__}, - {"hide_first_track", (PyCFunction)b_session_hide_first_track, METH_VARARGS, b_session_hide_first_track__doc__}, - {"get_leadout_entry", (PyCFunction)b_session_get_leadout_entry, METH_VARARGS, b_session_get_leadout_entry__doc__}, - {"get_tracks", (PyCFunction)b_session_get_tracks, METH_VARARGS, b_session_get_tracks__doc__}, - {"get_sectors", (PyCFunction)b_session_get_sectors, METH_VARARGS, b_session_get_sectors__doc__}, - {"get_hidefirst", (PyCFunction)b_session_get_hidefirst, METH_VARARGS, b_session_get_hidefirst__doc__}, - {NULL, NULL} -}; - -static PyObject * -b_session_getattr(b_sessionobject *self, char *name) -{ - /* XXXX Add your own getattr code here */ - return Py_FindMethod(b_session_methods, (PyObject *)self, name); -} - -static b_sessionobject * -newb_sessionobject() -{ - b_sessionobject *self; - - self = PyObject_NEW(b_sessionobject, &B_sessiontype); - if (self == NULL) - return NULL; - /* XXXX Add your own initializers here */ - return self; -} - -static void -b_session_dealloc(b_sessionobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_sessiontype__doc__[] = -"" -; -static PyTypeObject B_sessiontype = { - PyObject_HEAD_INIT(&PyType_Type) - 0, /*ob_size*/ - "burn.session", /*tp_name*/ - sizeof(b_sessionobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - - /* methods */ - (destructor)b_session_dealloc, /*tp_dealloc*/ - (printfunc)0, /*tp_print*/ - (getattrfunc)b_session_getattr, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)0, /*tp_compare*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - - /* Space for future expansion */ - 0L,0L,0L,0L, - B_sessiontype__doc__ /* Documentation string */ -}; -/* END burn_session */ - - -/* BEGIN burn_track */ -static char b_track_free__doc__[] = -"" -; -static PyObject * -b_track_free(b_trackobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - - -static char b_track_define_data__doc__[] = -"" -; -static PyObject * -b_track_define_data(b_trackobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_track_set_isrc__doc__[] = -"" -; -static PyObject * -b_track_set_isrc(b_trackobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_track_clear_isrc__doc__[] = -"" -; -static PyObject * -b_track_clear_isrc(b_trackobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - - -static char b_track_set_source__doc__[] = -"" -; -static PyObject * -b_track_set_source(b_trackobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - - -static char b_track_get_sectors__doc__[] = -"" -; -static PyObject * -b_track_get_sectors(b_trackobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_track_get_entry__doc__[] = -"" -; -static PyObject * -b_track_get_entry(b_trackobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_track_get_mode__doc__[] = -"" -; -static PyObject * -b_track_get_mode(b_trackobject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static struct PyMethodDef b_track_methods[] = { - {"free", (PyCFunction)b_track_free, METH_VARARGS, b_track_free__doc__}, - {"define_data", (PyCFunction)b_track_define_data, METH_VARARGS, b_track_define_data__doc__}, - {"set_isrc", (PyCFunction)b_track_set_isrc, METH_VARARGS, b_track_set_isrc__doc__}, - {"clear_isrc", (PyCFunction)b_track_clear_isrc, METH_VARARGS, b_track_clear_isrc__doc__}, - {"set_source", (PyCFunction)b_track_set_source, METH_VARARGS, b_track_set_source__doc__}, - {"get_sectors", (PyCFunction)b_track_get_sectors, METH_VARARGS, b_track_get_sectors__doc__}, - {"get_entry", (PyCFunction)b_track_get_entry, METH_VARARGS, b_track_get_entry__doc__}, - {"get_mode", (PyCFunction)b_track_get_mode, METH_VARARGS, b_track_get_mode__doc__}, - {NULL, NULL} -}; - -static PyObject * -b_track_getattr(b_trackobject *self, char *name) -{ - /* XXXX Add your own getattr code here */ - return Py_FindMethod(b_track_methods, (PyObject *)self, name); -} - -static b_trackobject * -newb_trackobject() -{ - b_trackobject *self; - - self = PyObject_NEW(b_trackobject, &B_tracktype); - if (self == NULL) - return NULL; - /* XXXX Add your own initializers here */ - return self; -} - -static void -b_track_dealloc(b_trackobject *self) -{ - /* XXXX Add your own cleanup code here */ - PyMem_DEL(self); -} - -static char B_tracktype__doc__[] = -"" -; -static PyTypeObject B_tracktype = { - PyObject_HEAD_INIT(&PyType_Type) - 0, /*ob_size*/ - "burn.track", /*tp_name*/ - sizeof(b_trackobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - - /* methods */ - (destructor)b_track_dealloc, /*tp_dealloc*/ - (printfunc)0, /*tp_print*/ - (getattrfunc)b_track_getattr, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)0, /*tp_compare*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - - /* Space for future expansion */ - 0L,0L,0L,0L, - B_tracktype__doc__ /* Documentation string */ -}; -/* END burn_track */ - - -/* Main burn Module */ -static char b_main_init__doc__[] = -"Initializes the burn module. You _MUST_ call this before you start!" -; -static PyObject * -b_main_init(PyObject *self /* Not used */, PyObject *args) -{ - if (burn_initialize()) { - Py_INCREF(Py_None); - return Py_None; - } - - return NULL; -} - -static char b_main_finish__doc__[] = -"Closes the burn module. You _MUST_ call this when you are done!" -; -static PyObject * -b_main_finish(PyObject *self /* Not used */, PyObject *args) -{ - burn_finish(); - - Py_INCREF(Py_None); - return Py_None; -} - -static char b_main_set_verbosity__doc__[] = -"" -; -static PyObject * -b_main_set_verbosity(PyObject *self /* Not used */, PyObject *args) -{ - - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_main_preset_device_open__doc__[] = -"" -; -static PyObject * -b_main_preset_device_open(PyObject *self /* Not used */, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_main_get_message__doc__[] = -"" -; -static PyObject * -b_main_get_message(PyObject *self /* Not used */, PyObject *args) -{ - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_main_drive_add_whitelist__doc__[] = -"" -; -static PyObject * -b_main_drive_add_whitelist(PyObject *self /* Not used */, PyObject *args) -{ - - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_main_drive_clear_whitelist__doc__[] = -"" -; -static PyObject * -b_main_drive_clear_whitelist(PyObject *self /* Not used */, PyObject *args) -{ - - if (!PyArg_ParseTuple(args, "")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static char b_main_drive_scan__doc__[] = -"" -; -static PyObject * -b_main_drive_scan(PyObject *self /* Not used */, PyObject *args) -{ - struct burn_drive_info *drives; - unsigned int n_drives; - int i; - - if (!PyArg_ParseTuple(args, "")) - return NULL; - - while (!burn_drive_scan(&drives, &n_drives)); - - if (!drives) - return NULL; - - /* - PyObject *infos = PyList_New(n_drives); - for (i=0; i < n_drives; i++) { - struct burn_drive_info *current = &drives[i]; - PyObject *obj = newb_drive_infoobject(current); - PyList_SetItem(infos, i, obj); - } - - return infos; - */ - - struct burn_drive_info curr = drives[0]; - PyObject *obj = (PyObject *)newb_drive_infoobject(&curr); - Py_INCREF(obj); - return obj; -} - -static char b_main_msf_to_sectors__doc__[] = -"Convert a Minute-Second-Frame (MSF) tuple value to its sector count" -; -static PyObject * -b_main_msf_to_sectors(PyObject *self /* Not used */, PyObject *args) -{ - int sectors, min, sec, frame; - - if (!PyArg_ParseTuple(args, "(iii)", &min, &sec, &frame)) - return NULL; - - sectors = burn_msf_to_sectors(min, sec, frame); - - return PyInt_FromLong(sectors); -} - -static char b_main_sectors_to_msf__doc__[] = -"Convert a sector count to its Minute-Second-Frame (MSF) tuple value" -; -static PyObject * -b_main_sectors_to_msf(PyObject *self /* Not used */, PyObject *args) -{ - int sectors, min, sec, frame; - - if (!PyArg_ParseTuple(args, "i", §ors)) - return NULL; - - burn_sectors_to_msf(sectors, &min, &sec, &frame); - - return PyTuple_Pack(3, PyInt_FromLong(min), - PyInt_FromLong(sec), - PyInt_FromLong(frame)); -} - -static char b_main_msf_to_lba__doc__[] = -"Convert a Minute-Second-Frame (MSF) tuple value to its corresponding LBA" -; -static PyObject * -b_main_msf_to_lba(PyObject *self /* Not used */, PyObject *args) -{ - int lba, min, sec, frame; - if (!PyArg_ParseTuple(args, "(iii)", &min, &sec, &frame)) - return NULL; - - lba = burn_msf_to_lba(min, sec, frame); - - return PyInt_FromLong(lba); -} - -static char b_main_version__doc__[] = -"Return a tuple containing the major, minor and micro versions of libburn" -; -static PyObject * -b_main_version(PyObject *self /* Not used */, PyObject *args) -{ - int maj, min, mic; - burn_version(&maj, &min, &mic); - - return PyTuple_Pack(3, PyInt_FromLong(maj), - PyInt_FromLong(min), - PyInt_FromLong(mic)); -} - -/* List of methods defined in the module */ -static struct PyMethodDef b_main_methods[] = { - {"init", (PyCFunction)b_main_init, METH_VARARGS, b_main_init__doc__}, - {"finish", (PyCFunction)b_main_finish, METH_VARARGS, b_main_finish__doc__}, - {"set_verbosity", (PyCFunction)b_main_set_verbosity, METH_VARARGS, b_main_set_verbosity__doc__}, - {"preset_device_open", (PyCFunction)b_main_preset_device_open, METH_VARARGS, b_main_preset_device_open__doc__}, - {"get_message", (PyCFunction)b_main_get_message, METH_VARARGS, b_main_get_message__doc__}, - {"drive_add_whitelist", (PyCFunction)b_main_drive_add_whitelist, METH_VARARGS, b_main_drive_add_whitelist__doc__}, - {"drive_clear_whitelist", (PyCFunction)b_main_drive_clear_whitelist, METH_VARARGS, b_main_drive_clear_whitelist__doc__}, - {"drive_scan", (PyCFunction)b_main_drive_scan, METH_VARARGS, b_main_drive_scan__doc__}, - {"msf_to_sectors", (PyCFunction)b_main_msf_to_sectors, METH_VARARGS, b_main_msf_to_sectors__doc__}, - {"sectors_to_msf", (PyCFunction)b_main_sectors_to_msf, METH_VARARGS, b_main_sectors_to_msf__doc__}, - {"msf_to_lba", (PyCFunction)b_main_msf_to_lba, METH_VARARGS, b_main_msf_to_lba__doc__}, - {"version", (PyCFunction)b_main_version, METH_VARARGS, b_main_version__doc__}, - {NULL, (PyCFunction)NULL, 0, NULL} -}; - - -/* Initialization function for the module (*must* be called initburn) */ -static char burn_module_documentation[] = -"" -; -void -initburn() -{ - PyObject *m, *d; - - /* Create the module and add the functions */ - m = Py_InitModule4("burn", b_main_methods, - burn_module_documentation, - (PyObject*)NULL,PYTHON_API_VERSION); - - /* Add objects */ - PyModule_AddObject(m, "toc_entry", (PyObject *)&B_toc_entrytype); - PyModule_AddObject(m, "source", (PyObject *)&B_sourcetype); - - if (PyType_Ready(&B_drive_infotype) < 0) - return; - Py_INCREF(&B_drive_infotype); - PyModule_AddObject(m, "drive_info", (PyObject *)&B_drive_infotype); - - PyModule_AddObject(m, "drive", (PyObject *)&B_drivetype); - PyModule_AddObject(m, "message", (PyObject *)&B_messagetype); - PyModule_AddObject(m, "progress", (PyObject *)&B_progresstype); - PyModule_AddObject(m, "write_opts", (PyObject *)&B_write_optstype); - PyModule_AddObject(m, "read_opts", (PyObject *)&B_read_optstype); - PyModule_AddObject(m, "disc", (PyObject *)&B_disctype); - PyModule_AddObject(m, "session", (PyObject *)&B_sessiontype); - PyModule_AddObject(m, "track", (PyObject *)&B_tracktype); - - /* Add some symbolic constants to the module */ - d = PyModule_GetDict(m); - ErrorObject = PyString_FromString("burn.error"); - PyDict_SetItemString(d, "error", ErrorObject); - - /* XXXX Add constants here */ - - /* Check for errors */ - if (PyErr_Occurred()) - Py_FatalError("can't initialize module burn"); -} - diff --git a/libburn/setup.py b/libburn/setup.py index cd55130..c6949ca 100644 --- a/libburn/setup.py +++ b/libburn/setup.py @@ -1,19 +1,33 @@ from distutils.core import setup, Extension +sources = ["src/burnmodule.c", "src/disc.c", "src/drive.c", + "src/drive_info.c", "src/message.c", "src/progress.c", + "src/read_opts.c", "src/session.c", "src/source.c", + "src/toc_entry.c", "src/track.c", "src/write_opts.c"] + +include_dirs = ["/usr/include", "/usr/local/include"] +library_dirs = ["/usr/lib", "/usr/local/lib"] +libraries = ["burn", "pthread"] + +long_description = \ +"""Python Interface to libBurn 0.2.2 + +pyburn is a stupid binding to libBurn, the awesome burning library""" + module = Extension('burn', define_macros = [('MAJOR_VERSION', '0'), ('MINOR_VERSION', '1')], - include_dirs = ['/usr/local/include'], - libraries = ['burn', 'pthread'], - sources = ['burnmodule.c']) + include_dirs = include_dirs, + libraries = libraries, + sources = sources) setup (name = 'burn', version = '0.1', - description = 'Python Bindings for libburn', - author = 'Anant Narayanan', - author_email = 'anant@kix.in', - url = 'http://libburn.pykix.org/', - long_description = ''' - Really stupid bindings for libburn-SVN - ''', + description = "Stupid bindings to libBurn 0.2.2", + long_description=long_description, + author = "Anant Narayanan", + author_email = "anant@kix.in", + license = "GPLv2", + platforms = "POSIX", + url = "http://libburn.pykix.org/", ext_modules = [module]) diff --git a/libburn/src/burnmodule.c b/libburn/src/burnmodule.c new file mode 100644 index 0000000..92f6355 --- /dev/null +++ b/libburn/src/burnmodule.c @@ -0,0 +1,218 @@ +#include "disc.h" +#include "drive.h" +#include "drive_info.h" +#include "message.h" +#include "progress.h" +#include "read_opts.h" +#include "session.h" +#include "source.h" +#include "toc_entry.h" +#include "track.h" +#include "write_opts.h" + +static PyObject* ErrorObject; + +static PyObject* Burn_Initialize(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Finish(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Set_Verbosity(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Preset_Device_Open(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Scan_And_Grab(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Add_Whitelist(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Clear_Whitelist(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Scan(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Info_Forget(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Info_Free(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Is_Enumerable(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Convert_FS_Address(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Convert_SCSI_Address(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Drive_Obtain_SCSI_Address(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_MSF_To_Sectors(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Sectors_To_MSF(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_MSF_To_LBA(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_LBA_To_MSF(PyObject* self, PyObject* args) +{ + +} + +static PyObject* Burn_Version(PyObject* self, PyObject* args) +{ + +} + + +static PyMethodDef Burn_Methods[] = { + {"init", (PyCFunction)Burn_Initialize, METH_VARARGS, + PyDoc_STR("Initializes the libBurn library for use.")}, + {"finish", (PyCFunction)Burn_Finish, METH_VARARGS, + PyDoc_STR("Shuts down the library.")}, + {"set_verbosity", (PyCFunction)Burn_Set_Verbosity, METH_VARARGS, + PyDoc_STR("Sets the verbosity level of the library.")}, + {"preset_device_open", (PyCFunction)Burn_Preset_Device_Open, METH_VARARGS, + PyDoc_STR("Sets parameters for behaviour on opening devices.")}, + {"drive_scan_and_grab", (PyCFunction)Burn_Drive_Scan_And_Grab, METH_VARARGS, + PyDoc_STR("Acquires a drive with a known persistent address.")}, + {"drive_add_whitelist", (PyCFunction)Burn_Drive_Add_Whitelist, METH_VARARGS, + PyDoc_STR("Adds a device to the list of permissible drives.")}, + {"drive_clear_whitelist", (PyCFunction)Burn_Drive_Clear_Whitelist, + METH_VARARGS, + PyDoc_STR("Removes all drives from the whitelist.")}, + {"drive_scan", (PyCFunction)Burn_Drive_Scan, METH_VARARGS, + PyDoc_STR("Scans for and returns drive_info objects.")}, + {"drive_info_forget", (PyCFunction)Burn_Drive_Info_Forget, METH_VARARGS, + PyDoc_STR("Releases memory and frees a drive_info object.")}, + {"drive_info_free", (PyCFunction)Burn_Drive_Info_Free, METH_VARARGS, + PyDoc_STR("Frees a set of drive_info objects as returned by drive_scan.")}, + {"drive_is_enumerable", (PyCFunction)Burn_Drive_Is_Enumerable, + METH_VARARGS, + PyDoc_STR("Evaluates whether the given address is a possible persistent drive address.")}, + {"drive_convert_fs_address", (PyCFunction)Burn_Drive_Convert_FS_Address, + METH_VARARGS, + PyDoc_STR("Converts a given filesystem address to a persistent drive address.")}, + {"drive_convert_scsi_address", (PyCFunction)Burn_Drive_Convert_SCSI_Address, + METH_VARARGS, + PyDoc_STR("Converts the given SCSI address (bus, channel, target, lun) into a persistent drive address.")}, + {"drive_obtain_scsi_address", (PyCFunction)Burn_Drive_Obtain_SCSI_Address, + METH_VARARGS, + PyDoc_STR("Obtains (host, channel, target, lun) from the path.")}, + {"msf_to_sectors", (PyCFunction)Burn_MSF_To_Sectors, METH_VARARGS, + PyDoc_STR("Converts a (minute, second, frame) value to sector count.")}, + {"sectors_to_msf", (PyCFunction)Burn_Sectors_To_MSF, METH_VARARGS, + PyDoc_STR("Converts sector count to a (minute, second, frame) value.")}, + {"msf_to_lba", (PyCFunction)Burn_MSF_To_LBA, METH_VARARGS, + PyDoc_STR("Converts a (minute, second, frame) value to an LBA.")}, + {"lba_to_msf", (PyCFunction)Burn_LBA_To_MSF, METH_VARARGS, + PyDoc_STR("Converts an LBA to a (minute, second, frame) value.")}, + {"version", (PyCFunction)Burn_Version, METH_VARARGS, + PyDoc_STR("Returns the library's (major, minor, micro) versions.")}, + {NULL, NULL} +}; + +static char Burn_Doc[] = +PyDoc_STR("Really stupid bindings to the awesome libBurn library."); + +void initburn() +{ + PyObject *module, *dict; + + module = Py_InitModule3("burn", Burn_Methods, Burn_Doc); + + Py_INCREF(&DiscType); + PyModule_AddObject(module, "disc", (PyObject*) &DiscType); + + Py_INCREF(&DriveType); + PyModule_AddObject(module, "drive", (PyObject*) &DriveType); + + Py_INCREF(&DriveInfoType); + PyModule_AddObject(module, "drive_info", (PyObject*) &DriveInfoType); + + Py_INCREF(&MessageType); + PyModule_AddObject(module, "message", (PyObject*) &MessageType); + + Py_INCREF(&ProgressType); + PyModule_AddObject(module, "progress", (PyObject*) &ProgressType); + + Py_INCREF(&ReadOptsType); + PyModule_AddObject(module, "read_opts", (PyObject*) &ReadOptsType); + + Py_INCREF(&SessionType); + PyModule_AddObject(module, "session", (PyObject*) &SessionType); + + Py_INCREF(&SourceType); + PyModule_AddObject(module, "source", (PyObject*) &SourceType); + + Py_INCREF(&TOCEntryType); + PyModule_AddObject(module, "toc_entry", (PyObject*) &TOCEntryType); + + Py_INCREF(&TrackType); + PyModule_AddObject(module, "track", (PyObject*) &TrackType); + + Py_INCREF(&WriteOptsType); + PyModule_AddObject(module, "write_opts", (PyObject*) &WriteOptsType); + + dict = PyModule_GetDict(module); + ErrorObject = PyString_FromString("burn.error"); + PyDict_SetItemString(dict, "error", ErrorObject); + + if (PyErr_Occurred()) + Py_FatalError("can't initialize module burn"); + /* + if (!(dict = PyModule_GetDict(module)) + || !(tmp = PyString_FromString("0.1"))) { + if (PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "pyburn: init failed"); + } + } + PyDict_SetItemString(dict, "Error", Error); + PyDict_SetItemString(dict, "version", tmp); + TODO: Set Constants and enums in disc and DEBUG this! + */ +} + diff --git a/libburn/src/disc.c b/libburn/src/disc.c new file mode 100644 index 0000000..d62a149 --- /dev/null +++ b/libburn/src/disc.c @@ -0,0 +1,70 @@ +#include "disc.h" + +void Disc_Free(Disc* self) +{ + +} + +int Disc_Create(Disc* self, PyObject* args) +{ + +} + +PyObject* Disc_Write(Disc* self, PyObject* args) +{ + +} + +PyObject* Disc_Add_Session(Disc* self, PyObject* args) +{ + +} + +PyObject* Disc_Remove_Session(Disc* self, PyObject* args) +{ + +} + +PyObject* Disc_Get_Sessions(Disc* self, PyObject* args) +{ + +} + +PyObject* Disc_Get_Sectors(Disc* self, PyObject* args) +{ + +} + +static char Disc_Doc[] = +PyDoc_STR("libBurn disc object."); + +static PyMethodDef Disc_Methods[] = { + {"write", (PyCFunction)Disc_Write, METH_VARARGS, + PyDoc_STR("Writes the disc with the given write options.")}, + {"add_session", (PyCFunction)Disc_Add_Session, METH_VARARGS, + PyDoc_STR("Adds a session to the disc.")}, + {"remove_session", (PyCFunction)Disc_Remove_Session, METH_VARARGS, + PyDoc_STR("Removes a session from the disc.")}, + {"get_sessions", (PyCFunction)Disc_Get_Sessions, METH_VARARGS, + PyDoc_STR("Returns the set of sessions associated with the disc.")}, + {"get_sectors", (PyCFunction)Disc_Get_Sectors, METH_VARARGS, + PyDoc_STR("Returns the number of sectors currently on the disc.")}, + {NULL, NULL} +}; + +PyTypeObject DiscType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.disc", + .tp_basicsize = sizeof(Disc), + .tp_dealloc = (destructor)Disc_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = Disc_Doc, + .tp_methods = Disc_Methods, + .tp_init = (initproc)Disc_Create, +}; + +extern int Disc_Setup_Types(void) +{ + DiscType.tp_new = PyType_GenericNew; + return PyType_Ready(&DiscType); +} diff --git a/libburn/src/disc.h b/libburn/src/disc.h new file mode 100644 index 0000000..ecc78d9 --- /dev/null +++ b/libburn/src/disc.h @@ -0,0 +1,24 @@ +#ifndef PYBURN_DISC_H +#define PYBURN_DISC_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_disc *disc; +} Disc; + +extern PyTypeObject DiscType; + +void Disc_Free(Disc* self); +int Disc_Create(Disc* self, PyObject* args); + +PyObject* Disc_Write(Disc* self, PyObject* args); +PyObject* Disc_Add_Session(Disc* self, PyObject* args); +PyObject* Disc_Remove_Session(Disc* self, PyObject* args); +PyObject* Disc_Get_Sessions(Disc* self, PyObject* args); +PyObject* Disc_Get_Sectors(Disc* self, PyObject* args); + +int Disc_Setup_Types(void); + +#endif diff --git a/libburn/src/drive.c b/libburn/src/drive.c new file mode 100644 index 0000000..08f0a3e --- /dev/null +++ b/libburn/src/drive.c @@ -0,0 +1,127 @@ +#include "drive.h" + +void Drive_Free(Drive* self) +{ + +} + +int Drive_Create(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Grab(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Release(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Get_Write_Speed(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Get_Read_Speed(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Set_Speed(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Cancel(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Get_Disc(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Disc_Get_Status(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Disc_Erasable(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Disc_Erase(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Disc_Read(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_Get_Status(Drive* self, PyObject* args) +{ + +} + +PyObject* Drive_New_ReadOpts(Drive* self, PyObject* args) +{ + +} + +static char Drive_Doc[] = +PyDoc_STR("libBurn drive object."); + +static PyMethodDef Drive_Methods[] = { + {"grab", (PyCFunction)Drive_Grab, METH_VARARGS, + PyDoc_STR("Grabs the drive.")}, + {"release", (PyCFunction)Drive_Release, METH_VARARGS, + PyDoc_STR("Releases the drive.")}, + {"get_status", (PyCFunction)Drive_Get_Status, METH_VARARGS, + PyDoc_STR("Returns the status of the drive.")}, + {"get_write_speed", (PyCFunction)Drive_Get_Write_Speed, METH_VARARGS, + PyDoc_STR("Returns the write speed of the drive.")}, + {"get_read_speed", (PyCFunction)Drive_Get_Read_Speed, METH_VARARGS, + PyDoc_STR("Returns the read speed of the drive.")}, + {"set_speed", (PyCFunction)Drive_Set_Speed, METH_VARARGS, + PyDoc_STR("Sets the speed of the drive.")}, + {"cancel", (PyCFunction)Drive_Cancel, METH_VARARGS, + PyDoc_STR("Cancels the current operation on the drive.")}, + {"get_disc", (PyCFunction)Drive_Disc_Erase, METH_VARARGS, + PyDoc_STR("Returns the disc object associated with the drive.")}, + {"disc_get_status", (PyCFunction)Drive_Disc_Get_Status, METH_VARARGS, + PyDoc_STR("Returns the status of the disc in the drive.")}, + {"disc_erasable", (PyCFunction)Drive_Disc_Erasable, METH_VARARGS, + PyDoc_STR("Checks if the disc in the drive is erasable.")}, + {"disc_erase", (PyCFunction)Drive_Disc_Erase, METH_VARARGS, + PyDoc_STR("Erases the disc in the drive.")}, + {"disc_read", (PyCFunction)Drive_Disc_Read, METH_VARARGS, + PyDoc_STR("Reads the disc in the drive with the given options.")}, + {"new_readopts", (PyCFunction)Drive_New_ReadOpts, METH_VARARGS, + PyDoc_STR("Returns a new ReadOpts object associated with the drive.")}, + {NULL, NULL} +}; + +PyTypeObject DriveType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.drive", + .tp_basicsize = sizeof(Drive), + .tp_dealloc = (destructor)Drive_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = Drive_Doc, + .tp_methods = Drive_Methods, + .tp_init = (initproc)Drive_Create, + // ^^?^^ +}; + +extern int Drive_Setup_Types(void) +{ + DriveType.tp_new = PyType_GenericNew; + return PyType_Ready(&DriveType); +} diff --git a/libburn/src/drive.h b/libburn/src/drive.h new file mode 100644 index 0000000..e25a332 --- /dev/null +++ b/libburn/src/drive.h @@ -0,0 +1,35 @@ +#ifndef PYBURN_DRIVE_H +#define PYBURN_DRIVE_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_drive *drive; +} Drive; + +extern PyTypeObject DriveType; + +void Drive_Free(Drive* self); +/* For Private Use Only?! */ +int Drive_Create(Drive* self, PyObject* args); + +PyObject* Drive_Grab(Drive* self, PyObject* args); +PyObject* Drive_Release(Drive* self, PyObject* args); +PyObject* Drive_Get_Status(Drive* self, PyObject* args); +PyObject* Drive_Get_Write_Speed(Drive* self, PyObject* args); +PyObject* Drive_Get_Read_Speed(Drive* self, PyObject* args); +PyObject* Drive_Set_Speed(Drive* self, PyObject* args); +PyObject* Drive_Cancel(Drive* self, PyObject* args); + +PyObject* Drive_Get_Disc(Drive* self, PyObject* args); +PyObject* Drive_Disc_Get_Status(Drive* self, PyObject* args); +PyObject* Drive_Disc_Erasable(Drive* self, PyObject* args); +PyObject* Drive_Disc_Erase(Drive* self, PyObject* args); +PyObject* Drive_Disc_Read(Drive* self, PyObject* args); + +PyObject* Drive_New_ReadOpts(Drive* self, PyObject* args); + +int Drive_Setup_Types(void); + +#endif diff --git a/libburn/src/drive_info.c b/libburn/src/drive_info.c new file mode 100644 index 0000000..d9be275 --- /dev/null +++ b/libburn/src/drive_info.c @@ -0,0 +1,43 @@ +#include "drive_info.h" + +void DriveInfo_Free(DriveInfo* self) +{ + +} + +int DriveInfo_Create(DriveInfo* self, PyObject* args) +{ + +} + +PyObject* DriveInfo_Get_Address(DriveInfo* self, PyObject* args) +{ + +} + +static char DriveInfo_Doc[] = +PyDoc_STR("libBurn drive info object."); + +static PyMethodDef DriveInfo_Methods[] = { + {"get_address", (PyCFunction)DriveInfo_Get_Address, METH_VARARGS, + PyDoc_STR("Returns the peristent address of the drive associated.")}, + {NULL, NULL} +}; + +PyTypeObject DriveInfoType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.drive_info", + .tp_basicsize = sizeof(DriveInfo), + .tp_dealloc = (destructor)DriveInfo_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = DriveInfo_Doc, + .tp_methods = DriveInfo_Methods, + .tp_init = (initproc)DriveInfo_Create, +}; + + +extern int DriveInfo_Setup_Types(void) +{ + DriveInfoType.tp_new = PyType_GenericNew; + return PyType_Ready(&DriveInfoType); +} diff --git a/libburn/src/drive_info.h b/libburn/src/drive_info.h new file mode 100644 index 0000000..13b8789 --- /dev/null +++ b/libburn/src/drive_info.h @@ -0,0 +1,21 @@ +#ifndef PYBURN_DRIVE_INFO_H +#define PYBURN_DRIVE_INFO_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_drive_info *info; +} DriveInfo; + +extern PyTypeObject DriveInfoType; + +void DriveInfo_Free(DriveInfo* self); +/* For private use only?! */ +int DriveInfo_Create(DriveInfo* self, PyObject* args); + +PyObject* DriveInfo_Get_Address(DriveInfo* self, PyObject* args); + +int DriveInfo_Setup_Types(void); + +#endif diff --git a/libburn/src/message.c b/libburn/src/message.c new file mode 100644 index 0000000..aba194c --- /dev/null +++ b/libburn/src/message.c @@ -0,0 +1,31 @@ +#include "message.h" + +void Message_Free(Message* self) +{ + +} + +int Message_Create(Message* self, PyObject* args) +{ + +} + +static char Message_Doc[] = +PyDoc_STR("libBurn message object."); + +PyTypeObject MessageType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.message", + .tp_basicsize = sizeof(Message), + .tp_dealloc = (destructor)Message_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = Message_Doc, + .tp_init = (initproc)Message_Create, +}; + + +extern int Message_Setup_Types(void) +{ + MessageType.tp_new = PyType_GenericNew; + return PyType_Ready(&MessageType); +} diff --git a/libburn/src/message.h b/libburn/src/message.h new file mode 100644 index 0000000..9b4d00e --- /dev/null +++ b/libburn/src/message.h @@ -0,0 +1,18 @@ +#ifndef PYBURN_MESSAGE_H +#define PYBURN_MESSAGE_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_message *message; +} Message; + +extern PyTypeObject MessageType; + +void Message_Free(Message* self); +int Message_Create(Message* self, PyObject* args); + +int Message_Setup_Types(void); + +#endif diff --git a/libburn/src/progress.c b/libburn/src/progress.c new file mode 100644 index 0000000..1ae6fbc --- /dev/null +++ b/libburn/src/progress.c @@ -0,0 +1,31 @@ +#include "progress.h" + +void Progress_Free(Progress* self) +{ + +} + +int Progress_Create(Progress* self, PyObject* args) +{ + +} + +static char Progress_Doc[] = +PyDoc_STR("libBurn progress object."); + +PyTypeObject ProgressType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.progress", + .tp_basicsize = sizeof(Progress), + .tp_dealloc = (destructor)Progress_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = Progress_Doc, + .tp_init = (initproc)Progress_Create, +}; + + +extern int Progress_Setup_Types(void) +{ + ProgressType.tp_new = PyType_GenericNew; + return PyType_Ready(&ProgressType); +} diff --git a/libburn/src/progress.h b/libburn/src/progress.h new file mode 100644 index 0000000..1ae4c61 --- /dev/null +++ b/libburn/src/progress.h @@ -0,0 +1,18 @@ +#ifndef PYBURN_PROGRESS_H +#define PYBURN_PROGRESS_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_progress *progress; +} Progress; + +extern PyTypeObject ProgressType; + +void Progress_Free(Progress* self); +int Progress_Create(Progress* self, PyObject* args); + +int Progress_Setup_Types(void); + +#endif diff --git a/libburn/src/read_opts.c b/libburn/src/read_opts.c new file mode 100644 index 0000000..0e3faf5 --- /dev/null +++ b/libburn/src/read_opts.c @@ -0,0 +1,97 @@ +#include "read_opts.h" + +void ReadOpts_Free(ReadOpts* self) +{ + +} + +int ReadOpts_Create(ReadOpts* self, PyObject* args) +{ + +} + +PyObject* ReadOpts_Set_Raw(ReadOpts* self, PyObject* args) +{ + +} + +PyObject* ReadOpts_Set_C2Errors(ReadOpts* self, PyObject* args) +{ + +} + +PyObject* ReadOpts_Read_Subcodes_Audio(ReadOpts* self, PyObject* args) +{ + +} + +PyObject* ReadOpts_Read_Subcodes_Data(ReadOpts* self, PyObject* args) +{ + +} + +PyObject* ReadOpts_Set_Hardware_Error_Recovery(ReadOpts* self, PyObject* args) +{ + +} + +PyObject* ReadOpts_Report_Recovered_Errors(ReadOpts* self, PyObject* args) +{ + +} + +PyObject* ReadOpts_Transfer_Damaged_Blocks(ReadOpts* self, PyObject* args) +{ + +} + +PyObject* ReadOpts_Set_Hardware_Error_Retries(ReadOpts* self, PyObject* args) +{ + +} + +static char ReadOpts_Doc[] = +PyDoc_STR("libBurn read_opts object."); + +static PyMethodDef ReadOpts_Methods[] = { + {"set_raw", (PyCFunction)ReadOpts_Set_Raw, METH_VARARGS, + PyDoc_STR("Sets whether reading is in raw mode.")}, + {"set_c2errors", (PyCFunction)ReadOpts_Set_C2Errors, METH_VARARGS, + PyDoc_STR("Sets whether c2 errors are reported.")}, + {"read_subcodes_audio", (PyCFunction)ReadOpts_Read_Subcodes_Audio, + METH_VARARGS, + PyDoc_STR("Sets whether subcodes from audio tracks are read.")}, + {"read_subcodes_data", (PyCFunction)ReadOpts_Read_Subcodes_Data, + METH_VARARGS, + PyDoc_STR("Sets whether subcodes from data tracks are read.")}, + {"set_hardware_error_recovery", + (PyCFunction)ReadOpts_Set_Hardware_Error_Recovery, METH_VARARGS, + PyDoc_STR("Sets whether error recovery should be performed.")}, + {"report_recovered_errors", (PyCFunction)ReadOpts_Report_Recovered_Errors, + METH_VARARGS, + PyDoc_STR("Sets whether recovered errors are reported.")}, + {"transfer_damaged_blocks", (PyCFunction)ReadOpts_Transfer_Damaged_Blocks, + METH_VARARGS, + PyDoc_STR("Sets whether blocks with unrecoverable errors are read.")}, + {"set_hardware_error_retries", + (PyCFunction)ReadOpts_Set_Hardware_Error_Retries, METH_VARARGS, + PyDoc_STR("Sets the number of attempts when correcting an error.")}, + {NULL, NULL} +}; + +PyTypeObject ReadOptsType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.read_opts", + .tp_basicsize = sizeof(ReadOpts), + .tp_dealloc = (destructor)ReadOpts_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = ReadOpts_Doc, + .tp_methods = ReadOpts_Methods, + .tp_init = (initproc)ReadOpts_Create, +}; + +extern int ReadOpts_Setup_Types(void) +{ + ReadOptsType.tp_new = PyType_GenericNew; + return PyType_Ready(&ReadOptsType); +} diff --git a/libburn/src/read_opts.h b/libburn/src/read_opts.h new file mode 100644 index 0000000..fd8d4cf --- /dev/null +++ b/libburn/src/read_opts.h @@ -0,0 +1,27 @@ +#ifndef PYBURN_READ_OPTS_H +#define PYBURN_READ_OPTS_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_read_opts *opts; +} ReadOpts; + +extern PyTypeObject ReadOptsType; + +void ReadOpts_Free(ReadOpts* self); +int ReadOpts_Create(ReadOpts* self, PyObject* args); + +PyObject* ReadOpts_Set_Raw(ReadOpts* self, PyObject* args); +PyObject* ReadOpts_Set_C2Errors(ReadOpts* self, PyObject* args); +PyObject* ReadOpts_Read_Subcodes_Audio(ReadOpts* self, PyObject* args); +PyObject* ReadOpts_Read_Subcodes_Data(ReadOpts* self, PyObject* args); +PyObject* ReadOpts_Set_Hardware_Recovery(ReadOpts* self, PyObject* args); +PyObject* ReadOpts_Report_Recovered_Errors(ReadOpts* self, PyObject* args); +PyObject* ReadOpts_Transfer_Damaged_Blocks(ReadOpts* self, PyObject* args); +PyObject* ReadOpts_Set_Hardware_Retries(ReadOpts* self, PyObject* args); + +int ReadOpts_Setup_Types(void); + +#endif diff --git a/libburn/src/session.c b/libburn/src/session.c new file mode 100644 index 0000000..dd5aa54 --- /dev/null +++ b/libburn/src/session.c @@ -0,0 +1,84 @@ +#include "session.h" + +void Session_Free(Session* self) +{ + +} + +int Session_Create(Session* self, PyObject* args) +{ + +} + +PyObject* Session_Add_Track(Session* self, PyObject* args) +{ + +} + +PyObject* Session_Remove_Track(Session* self, PyObject* args) +{ + +} + +PyObject* Session_Set_Hidefirst(Session* self, PyObject* args) +{ + +} + +PyObject* Session_Get_Hidefirst(Session* self, PyObject* args) +{ + +} + +PyObject* Session_Get_Leadout_Entry(Session* self, PyObject* args) +{ + +} + +PyObject* Session_Get_Tracks(Session* self, PyObject* args) +{ + +} + +PyObject* Session_Get_Sectors(Session* self, PyObject* args) +{ + +} + +static char Session_Doc[] = +PyDoc_STR("libBurn session object."); + +static PyMethodDef Session_Methods[] = { + {"add_track", (PyCFunction)Session_Add_Track, METH_VARARGS, + PyDoc_STR("Adds a track at the specified position in the session.")}, + {"remove_track", (PyCFunction)Session_Remove_Track, METH_VARARGS, + PyDoc_STR("Removes the track from the session.")}, + {"set_hidefirst", (PyCFunction)Session_Set_Hidefirst, METH_VARARGS, + PyDoc_STR("Sets whether the first track is to be hidden in pregrap.")}, + {"get_hidefirst", (PyCFunction)Session_Get_Hidefirst, METH_VARARGS, + PyDoc_STR("Returns whether the first track is hidden in pregap.")}, + {"get_leadout_entry", (PyCFunction)Session_Get_Leadout_Entry, METH_VARARGS, + PyDoc_STR("Returns the TOC entry object of the session's leadout")}, + {"get_tracks", (PyCFunction)Session_Get_Tracks, METH_VARARGS, + PyDoc_STR("Returns the set of tracks associated with the session.")}, + {"get_sectors", (PyCFunction)Session_Get_Sectors, METH_VARARGS, + PyDoc_STR("Returns the number of sectors of the session.")}, + {NULL, NULL} +}; + +PyTypeObject SessionType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.session", + .tp_basicsize = sizeof(Session), + .tp_dealloc = (destructor)Session_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = Session_Doc, + .tp_methods = Session_Methods, + .tp_init = (initproc)Session_Create, +}; + +extern int Session_Setup_Types(void) +{ + SessionType.tp_new = PyType_GenericNew; + return PyType_Ready(&SessionType); +} diff --git a/libburn/src/session.h b/libburn/src/session.h new file mode 100644 index 0000000..04685c7 --- /dev/null +++ b/libburn/src/session.h @@ -0,0 +1,26 @@ +#ifndef PYBURN_SESSION_H +#define PYBURN_SESSION_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_session *session; +} Session; + +extern PyTypeObject SessionType; + +void Session_Free(Session* self); +int Session_Create(Session* self, PyObject* args); + +PyObject* Session_Add_Track(Session* self, PyObject* args); +PyObject* Session_Remove_Track(Session* self, PyObject* args); +PyObject* Session_Set_Hidefirst(Session* self, PyObject* args); +PyObject* Session_Get_Hidefirst(Session* self, PyObject* args); +PyObject* Session_Get_Leadout_Entry(Session* self, PyObject* args); +PyObject* Session_Get_Tracks(Session* self, PyObject* args); +PyObject* Session_Get_Sectors(Session* self, PyObject* args); + +int Session_Setup_Types(void); + +#endif diff --git a/libburn/src/source.c b/libburn/src/source.c new file mode 100644 index 0000000..c936029 --- /dev/null +++ b/libburn/src/source.c @@ -0,0 +1,31 @@ +#include "source.h" + +void Source_Free(Source* self) +{ + +} + +int Source_Create(Source* self, PyObject* args, PyObject* kwargs) +{ + +} + +static char Source_Doc[] = +PyDoc_STR("libBurn source object."); + +PyTypeObject SourceType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.source", + .tp_basicsize = sizeof(Source), + .tp_dealloc = (destructor)Source_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = Source_Doc, + .tp_init = (initproc)Source_Create, +}; + + +extern int Source_Setup_Types(void) +{ + SourceType.tp_new = PyType_GenericNew; + return PyType_Ready(&SourceType); +} diff --git a/libburn/src/source.h b/libburn/src/source.h new file mode 100644 index 0000000..db09c38 --- /dev/null +++ b/libburn/src/source.h @@ -0,0 +1,18 @@ +#ifndef PYBURN_SOURCE_H +#define PYBURN_SOURCE_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_source *source; +} Source; + +extern PyTypeObject SourceType; + +void Source_Free(Source* self); +int Source_Create(Source* self, PyObject* args, PyObject* kwargs); + +int Source_Setup_Types(void); + +#endif diff --git a/libburn/src/toc_entry.c b/libburn/src/toc_entry.c new file mode 100644 index 0000000..22674be --- /dev/null +++ b/libburn/src/toc_entry.c @@ -0,0 +1,31 @@ +#include "toc_entry.h" + +void TOCEntry_Free(TOCEntry* self) +{ + +} + +int TOCEntry_Create(TOCEntry* self, PyObject* args) +{ + +} + +static char TOCEntry_Doc[] = +PyDoc_STR("libBurn toc_entry object."); + +PyTypeObject TOCEntryType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.toc_entry", + .tp_basicsize = sizeof(TOCEntry), + .tp_dealloc = (destructor)TOCEntry_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = TOCEntry_Doc, + .tp_init = (initproc)TOCEntry_Create, +}; + + +extern int TOCEntry_Setup_Types(void) +{ + TOCEntryType.tp_new = PyType_GenericNew; + return PyType_Ready(&TOCEntryType); +} diff --git a/libburn/src/toc_entry.h b/libburn/src/toc_entry.h new file mode 100644 index 0000000..902a9a7 --- /dev/null +++ b/libburn/src/toc_entry.h @@ -0,0 +1,18 @@ +#ifndef PYBURN_TOC_ENTRY_H +#define PYBURN_TOC_ENTRY_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_toc_entry *entry; +} TOCEntry; + +extern PyTypeObject TOCEntryType; + +void TOCEntry_Free(TOCEntry* self); +int TOCEntry_Create(TOCEntry* self, PyObject* args); + +int TOCEntry_Setup_Types(void); + +#endif diff --git a/libburn/src/track.c b/libburn/src/track.c new file mode 100644 index 0000000..fc3070b --- /dev/null +++ b/libburn/src/track.c @@ -0,0 +1,84 @@ +#include "track.h" + +void Track_Free(Track* self) +{ + +} + +int Track_Create(Track* self, PyObject* args) +{ + +} + +PyObject* Track_Define_Data(Track* self, PyObject* args) +{ + +} + +PyObject* Track_Set_Isrc(Track* self, PyObject* args) +{ + +} + +PyObject* Track_Clear_Isrc(Track* self, PyObject* args) +{ + +} + +PyObject* Track_Set_Source(Track* self, PyObject* args) +{ + +} + +PyObject* Track_Get_Sectors(Track* self, PyObject* args) +{ + +} + +PyObject* Track_Get_Entry(Track* self, PyObject* args) +{ + +} + +PyObject* Track_Get_Mode(Track* self, PyObject* args) +{ + +} + +static char Track_Doc[] = +PyDoc_STR("libBurn track object."); + +static PyMethodDef Track_Methods[] = { + {"define_data", (PyCFunction)Track_Define_Data, METH_VARARGS, + PyDoc_STR("Defines the data in the track.")}, + {"set_isrc", (PyCFunction)Track_Set_Isrc, METH_VARARGS, + PyDoc_STR("Sets the ISRC details for the track.")}, + {"clear_isrc", (PyCFunction)Track_Clear_Isrc, METH_VARARGS, + PyDoc_STR("Clears all ISRC details for the track.")}, + {"set_source", (PyCFunction)Track_Set_Source, METH_VARARGS, + PyDoc_STR("Sets the track's data source.")}, + {"get_sectors", (PyCFunction)Track_Get_Sectors, METH_VARARGS, + PyDoc_STR("Returns the number of sectors currently on the track.")}, + {"get_entry", (PyCFunction)Track_Get_Entry, METH_VARARGS, + PyDoc_STR("Returns the TOC entry associated with the track.")}, + {"get_mode", (PyCFunction)Track_Get_Mode, METH_VARARGS, + PyDoc_STR("Returns the current mode of the track.")}, + {NULL, NULL} +}; + +PyTypeObject TrackType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.track", + .tp_basicsize = sizeof(Track), + .tp_dealloc = (destructor)Track_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = Track_Doc, + .tp_methods = Track_Methods, + .tp_init = (initproc)Track_Create, +}; + +extern int Track_Setup_Types(void) +{ + TrackType.tp_new = PyType_GenericNew; + return PyType_Ready(&TrackType); +} diff --git a/libburn/src/track.h b/libburn/src/track.h new file mode 100644 index 0000000..874ea41 --- /dev/null +++ b/libburn/src/track.h @@ -0,0 +1,26 @@ +#ifndef PYBURN_TRACK_H +#define PYBURN_TRACK_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_track *track; +} Track; + +extern PyTypeObject TrackType; + +void Track_Free(Track* self); +int Track_Create(Track* self, PyObject* args); + +PyObject* Track_Define_Data(Track* self, PyObject* args); +PyObject* Track_Set_Isrc(Track* self, PyObject* args); +PyObject* Track_Clear_Isrc(Track* self, PyObject* args); +PyObject* Track_Set_Source(Track* self, PyObject* args); +PyObject* Track_Get_Sectors(Track* self, PyObject* args); +PyObject* Track_Get_Entry(Track* self, PyObject* args); +PyObject* Track_Get_Mode(Track* self, PyObject* args); + +int Track_Setup_Types(void); + +#endif diff --git a/libburn/src/write_opts.c b/libburn/src/write_opts.c new file mode 100644 index 0000000..37896f7 --- /dev/null +++ b/libburn/src/write_opts.c @@ -0,0 +1,94 @@ +#include "write_opts.h" + +void WriteOpts_Free(WriteOpts* self) +{ + +} + +int WriteOpts_Create(WriteOpts* self, PyObject* args) +{ + +} + +PyObject* WriteOpts_Set_Write_Type(WriteOpts* self, PyObject* args) +{ + +} + +PyObject* WriteOpts_Set_TOC_Entries(WriteOpts* self, PyObject* args) +{ + +} + +PyObject* WriteOpts_Set_Format(WriteOpts* self, PyObject* args) +{ + +} + +PyObject* WriteOpts_Set_Simulate(WriteOpts* self, PyObject* args) +{ + +} + +PyObject* WriteOpts_Set_Underrun_Proof(WriteOpts* self, PyObject* args) +{ + +} + +PyObject* WriteOpts_Set_Perform_OPC(WriteOpts* self, PyObject* args) +{ + +} + +PyObject* WriteOpts_Set_Has_Mediacatalog(WriteOpts* self, PyObject* args) +{ + +} + +PyObject* WriteOpts_Set_Mediacatalog(WriteOpts* self, PyObject* args) +{ + +} + +static char WriteOpts_Doc[] = +PyDoc_STR("libBurn write_opts object."); + +static PyMethodDef WriteOpts_Methods[] = { + {"set_write_type", (PyCFunction)WriteOpts_Set_Write_Type, METH_VARARGS, + PyDoc_STR("Sets the write type.")}, + {"set_toc_entries", (PyCFunction)WriteOpts_Set_TOC_Entries, METH_VARARGS, + PyDoc_STR("Supplies TOC entries for writing.")}, + {"set_format", (PyCFunction)WriteOpts_Set_Format, METH_VARARGS, + PyDoc_STR("Sets the session format for a disc.")}, + {"set_simulate", (PyCFunction)WriteOpts_Set_Simulate, METH_VARARGS, + PyDoc_STR("Sets whether a simulation is performed.")}, + {"set_underrun_proof", (PyCFunction)WriteOpts_Set_Underrun_Proof, + METH_VARARGS, + PyDoc_STR("Contols buffer underrun prevention.")}, + {"set_perform_opc", (PyCFunction)WriteOpts_Set_Perform_OPC, METH_VARARGS, + PyDoc_STR("Sets whether OPC is used.")}, + {"set_has_mediacatalog", (PyCFunction)WriteOpts_Set_Has_Mediacatalog, + METH_VARARGS, + PyDoc_STR("Controls whether the session will have a Mediacatalog.")}, + {"set_mediacatalog", + (PyCFunction)WriteOpts_Set_Mediacatalog, METH_VARARGS, + PyDoc_STR("Sets the Mediacatalog for the session.")}, + {NULL, NULL} +}; + +PyTypeObject WriteOptsType = { + PyObject_HEAD_INIT(NULL) + .tp_name = "burn.read_opts", + .tp_basicsize = sizeof(WriteOpts), + .tp_dealloc = (destructor)WriteOpts_Free, + .tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + .tp_doc = WriteOpts_Doc, + .tp_methods = WriteOpts_Methods, + .tp_init = (initproc)WriteOpts_Create, +}; + +extern int WriteOpts_Setup_Types(void) +{ + WriteOptsType.tp_new = PyType_GenericNew; + return PyType_Ready(&WriteOptsType); +} diff --git a/libburn/src/write_opts.h b/libburn/src/write_opts.h new file mode 100644 index 0000000..0ff5396 --- /dev/null +++ b/libburn/src/write_opts.h @@ -0,0 +1,27 @@ +#ifndef PYBURN_WRITE_OPTS_H +#define PYBURN_WRITE_OPTS_H +#include "Python.h" +#include "libburn/libburn.h" + +typedef struct { + PyObject_HEAD + struct burn_read_opts *opts; +} WriteOpts; + +extern PyTypeObject WriteOptsType; + +void WriteOpts_Free(WriteOpts* self); +int WriteOpts_Create(WriteOpts* self, PyObject* args); + +PyObject* WriteOpts_Set_Write_Type(WriteOpts* self, PyObject* args); +PyObject* WriteOpts_Set_TOC_Entries(WriteOpts* self, PyObject* args); +PyObject* WriteOpts_Set_Format(WriteOpts* self, PyObject* args); +PyObject* WriteOpts_Set_Simulate(WriteOpts* self, PyObject* args); +PyObject* WriteOpts_Set_Underrun_Proof(WriteOpts* self, PyObject* args); +PyObject* WriteOpts_Set_Perform_OPC(WriteOpts* self, PyObject* args); +PyObject* WriteOpts_Set_Has_Mediacatalog(WriteOpts* self, PyObject* args); +PyObject* WriteOpts_Set_Mediacatalog(WriteOpts* self, PyObject* args); + +int WriteOpts_Setup_Types(void); + +#endif