Deleted python-bindings from libisofs branches

This commit is contained in:
Mario Danic 2006-12-09 12:36:12 +00:00
parent 7aca0c40a4
commit 8e64fc0e23
24 changed files with 0 additions and 1281 deletions

View File

@ -1,33 +0,0 @@
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 = include_dirs,
libraries = libraries,
sources = sources)
setup (name = 'burn',
version = '0.1',
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])

View File

@ -1,267 +0,0 @@
#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)
{
if (burn_initialize()) {
Py_INCREF(Py_None);
return Py_None;
}
return NULL;
}
static PyObject* Burn_Finish(PyObject* self, PyObject* args)
{
burn_finish();
Py_INCREF(Py_None);
return Py_None;
}
static PyObject* Burn_Set_Verbosity(PyObject* self, PyObject* args)
{
int level;
if (!PyArg_ParseTuple(args, "i", &level))
return NULL;
burn_set_verbosity(level);
Py_INCREF(Py_None);
return Py_None;
}
static PyObject* Burn_Preset_Device_Open(PyObject* self, PyObject* args)
{
int ex, bl, abort;
if (!PyArg_ParseTuples(args, "iii", &ex, &bl, &abort))
return NULL;
burn_preset_device_open(ex, bl, abort);
Py_INCREF(Py_None);
return Py_None;
}
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)
{
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 PyObject* Burn_Sectors_To_MSF(PyObject* self, PyObject* args)
{
int sectors, min, sec, frame;
if (!PyArg_ParseTuple(args, "i", &sectors))
return NULL;
burn_sectors_to_msf(sectors, &min, &sec, &frame);
return PyTuple_Pack(3, PyInt_FromLong(min),
PyInt_FromLong(sec),
PyInt_FromLong(frame));
}
static PyObject* Burn_MSF_To_LBA(PyObject* self, 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 PyObject* Burn_LBA_To_MSF(PyObject* self, PyObject* args)
{
int lba, min, sec, frame;
if (!PyArg_ParseTuple(args, "i", &lba))
return NULL;
burn_lba_to_msf(lba, &min, &sec, &frame);
return PyTuple_Pack(3, PyInt_FromLong(min),
PyInt_FromLong(sec),
PyInt_FromLong(frame));
}
static PyObject* Burn_Version(PyObject* self, PyObject* args)
{
int maj, min, mic;
burn_version(&maj, &min, &mic);
return PyTuple_Pack(3, PyInt_FromLong(maj),
PyInt_FromLong(min),
PyInt_FromLong(mic));
}
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!
*/
}

View File

@ -1,70 +0,0 @@
#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);
}

View File

@ -1,24 +0,0 @@
#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

View File

@ -1,127 +0,0 @@
#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);
}

View File

@ -1,35 +0,0 @@
#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

View File

@ -1,43 +0,0 @@
#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);
}

View File

@ -1,21 +0,0 @@
#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

View File

@ -1,31 +0,0 @@
#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);
}

View File

@ -1,18 +0,0 @@
#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

View File

@ -1,31 +0,0 @@
#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);
}

View File

@ -1,18 +0,0 @@
#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

View File

@ -1,97 +0,0 @@
#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);
}

View File

@ -1,27 +0,0 @@
#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

View File

@ -1,84 +0,0 @@
#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);
}

View File

@ -1,26 +0,0 @@
#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

View File

@ -1,31 +0,0 @@
#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);
}

View File

@ -1,18 +0,0 @@
#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

View File

@ -1,31 +0,0 @@
#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);
}

View File

@ -1,18 +0,0 @@
#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

View File

@ -1,84 +0,0 @@
#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);
}

View File

@ -1,26 +0,0 @@
#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

View File

@ -1,94 +0,0 @@
#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);
}

View File

@ -1,27 +0,0 @@
#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