[gnome-python-desktop] Fix #591572 - Update for braseromedia and braseromedium bindings
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-python-desktop] Fix #591572 - Update for braseromedia and braseromedium bindings
- Date: Sun, 16 Aug 2009 19:20:28 +0000 (UTC)
commit e77780ebc031c56a65c9623e68125a00bb179a2e
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Sun Aug 16 21:15:18 2009 +0200
Fix #591572 - Update for braseromedia and braseromedium bindings
Extends libbrasero-media and libbrasero-burn support
braseroburn/Makefile.am | 15 +-
braseroburn/brasero-types.c | 197 ++++
braseroburn/brasero-types.h | 16 +
braseroburn/brasero_burn.defs | 1763 ++++++++++++++++++++++++++++-
braseroburn/brasero_burn.override | 284 +++++-
braseroburn/brasero_burn_module.c | 30 +-
braseroburn/wscript | 2 +-
braseromedia/Makefile.am | 1 +
braseromedia/brasero_media.override | 89 ++
configure.ac | 5 +
examples/braseroburn/write-audio-video.py | 37 +
examples/braseroburn/write-data.py | 47 +
examples/braseroburn/write-image.py | 34 +
examples/braseromedia/drive_selection.py | 11 +
14 files changed, 2499 insertions(+), 32 deletions(-)
---
diff --git a/braseroburn/Makefile.am b/braseroburn/Makefile.am
index 6023034..09d9443 100644
--- a/braseroburn/Makefile.am
+++ b/braseroburn/Makefile.am
@@ -12,20 +12,29 @@ pkgpyexec_LTLIBRARIES = braseroburn.la
braseroburn_la_CFLAGS = $(BRASEROBURN_CFLAGS)
braseroburn_la_LDFLAGS = -module -avoid-version -export-symbols-regex initbraseroburn
braseroburn_la_LIBADD = $(BRASEROBURN_LIBS)
-braseroburn_la_SOURCES = brasero_burn_module.c
+braseroburn_la_SOURCES = \
+ brasero_burn_module.c \
+ brasero-types.h \
+ brasero-types.c
nodist_braseroburn_la_SOURCES = brasero_burn.c
CLEANFILES = brasero_burn.c
-EXTRA_DIST += brasero_burn.override
-brasero_burn.c: brasero_burn.defs brasero_burn.override
+
+LIBBRASERO_BURN_OVERRIDES= brasero_burn.override
+
+EXTRA_DIST += $(LIBBRASERO_BURN_OVERRIDES)
+brasero_burn.c: brasero_burn.defs $(LIBBRASERO_BURN_OVERRIDES)
+
.defs.c:
(cd $(srcdir) \
&& $(PYGTK_CODEGEN) \
--override $*.override \
--py_ssize_t-clean \
+ --register $(PYGOBJECT_DEFSDIR)/gio-types.defs \
--register $(PYGTK_DEFSDIR)/gtk-types.defs \
--register $(PYGTK_DEFSDIR)/gdk-types.defs \
+ --register $(top_srcdir)/braseromedia/brasero_media.defs \
--prefix $* $*.defs) > gen-$*.c \
&& cp gen-$*.c $*.c \
&& rm -f gen-$*.c
diff --git a/braseroburn/brasero-types.c b/braseroburn/brasero-types.c
new file mode 100644
index 0000000..e0159d2
--- /dev/null
+++ b/braseroburn/brasero-types.c
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2009 Philippe Rouquier <bonfire-app wanadoo fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Authors: Philippe Rouquier <bonfire-app wanadoo fr>
+ */
+#include <Python.h>
+#include <brasero-types.h>
+#include <brasero-track-data.h>
+
+
+static PyObject *
+py_brasero_graft_point_create (PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+ PyBraseroGraftPoint *self;
+
+ self = (PyBraseroGraftPoint *)type->tp_alloc(type, 0);
+ if (self != NULL) {
+ /* make sure it points to an empty string */
+ self->graft = g_new0 (BraseroGraftPt, 1);
+ }
+
+ return (PyObject *)self;
+}
+
+static int
+py_brasero_graft_point_init (PyBraseroGraftPoint *self, PyObject *args, PyObject *kwds)
+{
+ char *uri = NULL;
+ char *path = NULL;
+
+ static char *kwlist[] = {"uri", "path", NULL};
+
+ if (! PyArg_ParseTupleAndKeywords (args, kwds, "|ss", kwlist, &uri, &path))
+ return -1;
+
+ if (!uri)
+ uri = "";
+ if (!path)
+ path = "";
+
+ self->graft->uri = g_strdup (uri);
+ self->graft->path = g_strdup (path);
+ return 0;
+}
+
+static void
+py_brasero_graft_point_dealloc (PyBraseroGraftPoint* self)
+{
+ brasero_graft_point_free (self->graft);
+ self->ob_type->tp_free((PyObject*)self);
+}
+
+static int
+py_brasero_graft_point_set_uri (PyBraseroGraftPoint *self, PyObject *value, void *closure)
+{
+ if (value == NULL) {
+ PyErr_SetString(PyExc_TypeError, "Cannot delete the uri attribute");
+ return -1;
+ }
+
+ if (! PyString_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "The uri attribute value must be a string");
+ return -1;
+ }
+ g_free (self->graft->uri);
+ self->graft->uri = g_strdup (PyString_AsString (value));
+ return 0;
+}
+
+static PyObject *
+py_brasero_graft_point_get_uri (PyBraseroGraftPoint *self, void *closure)
+{
+ return Py_BuildValue ("s", self->graft->uri);
+}
+
+static int
+py_brasero_graft_point_set_path (PyBraseroGraftPoint *self, PyObject *value, void *closure)
+{
+ if (value == NULL) {
+ PyErr_SetString(PyExc_TypeError, "Cannot delete the path attribute");
+ return -1;
+ }
+
+ if (! PyString_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "The path attribute value must be a string");
+ return -1;
+ }
+ g_free (self->graft->path);
+ self->graft->path = g_strdup (PyString_AsString (value));
+ return 0;
+}
+
+static PyObject *
+py_brasero_graft_point_get_path (PyBraseroGraftPoint *self, void *closure)
+{
+ return Py_BuildValue ("s", self->graft->path);
+}
+
+static PyGetSetDef PyBraseroGraftPoint_getseters[] = {
+ {"uri",
+ (getter)py_brasero_graft_point_get_uri, (setter)py_brasero_graft_point_set_uri,
+ "The file uri, it should point to a file on a (GIO) mounted file system.",
+ NULL},
+ {"path",
+ (getter)py_brasero_graft_point_get_path, (setter)py_brasero_graft_point_set_path,
+ "The path of the file, it should point to a path on the disc image to be.",
+ NULL},
+ {NULL} /* Sentinel */
+};
+
+static PyTypeObject PyBraseroGraftPoint_Type = {
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "braseroburn.GraftPoint", /*tp_name*/
+ sizeof(PyBraseroGraftPoint), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ (destructor)py_brasero_graft_point_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ 0, /*tp_compare*/
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash */
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT, /*tp_flags*/
+ "Represents a graft point for a TrackData.", /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ 0, /* tp_members */
+ PyBraseroGraftPoint_getseters, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)py_brasero_graft_point_init, /* tp_init */
+ 0, /* tp_alloc */
+ py_brasero_graft_point_create, /* tp_new */
+};
+
+PyObject *
+PyBraseroGraftPoint_New (const BraseroGraftPt *graft)
+{
+ PyBraseroGraftPoint *self;
+
+ self = PyObject_New (PyBraseroGraftPoint, &PyBraseroGraftPoint_Type);
+ self->graft->uri = g_strdup (graft->uri?graft->uri:"");
+ self->graft->path = g_strdup (graft->path?graft->path:"");
+ return (PyObject *)self;
+}
+
+int
+py_BraseroGraftPoint_Check (PyObject *object)
+{
+ return PyObject_TypeCheck (object, &PyBraseroGraftPoint_Type);
+}
+
+int
+py_brasero_types_init (PyObject *module)
+{
+ if (PyType_Ready (&PyBraseroGraftPoint_Type) < 0)
+ return -1;
+
+ Py_INCREF(&PyBraseroGraftPoint_Type);
+ PyModule_AddObject(module, "GraftPoint", (PyObject *)&PyBraseroGraftPoint_Type);
+
+ return 0;
+}
+
diff --git a/braseroburn/brasero-types.h b/braseroburn/brasero-types.h
new file mode 100644
index 0000000..54b6ae4
--- /dev/null
+++ b/braseroburn/brasero-types.h
@@ -0,0 +1,16 @@
+#include <Python.h>
+
+#include <brasero-track-data.h>
+
+struct _PyBraseroGraftPoint {
+ PyObject_HEAD
+
+ BraseroGraftPt *graft;
+};
+
+typedef struct _PyBraseroGraftPoint PyBraseroGraftPoint;
+
+int py_brasero_types_init (PyObject *module);
+int py_BraseroGraftPoint_Check (PyObject *object);
+
+PyObject *PyBraseroGraftPoint_New (const BraseroGraftPt *graft);
diff --git a/braseroburn/brasero_burn.defs b/braseroburn/brasero_burn.defs
index a1a0204..966c37c 100644
--- a/braseroburn/brasero_burn.defs
+++ b/braseroburn/brasero_burn.defs
@@ -21,19 +21,364 @@
(gtype-id "BRASERO_TYPE_BURN_OPTIONS")
)
+(define-object BurnSession
+ (in-module "Brasero")
+ (parent "GObject")
+ (c-name "BraseroBurnSession")
+ (gtype-id "BRASERO_TYPE_BURN_SESSION")
+)
+
+(define-object SessionSpan
+ (in-module "Brasero")
+ (parent "BraseroBurnSession")
+ (c-name "BraseroSessionSpan")
+ (gtype-id "BRASERO_TYPE_SESSION_SPAN")
+)
+
+(define-object SessionCfg
+ (in-module "Brasero")
+ (parent "BraseroSessionSpan")
+ (c-name "BraseroSessionCfg")
+ (gtype-id "BRASERO_TYPE_SESSION_CFG")
+)
+
+(define-object ToolDialog
+ (in-module "Brasero")
+ (parent "GtkDialog")
+ (c-name "BraseroToolDialog")
+ (gtype-id "BRASERO_TYPE_TOOL_DIALOG")
+)
+
+(define-object SumDialog
+ (in-module "Brasero")
+ (parent "BraseroToolDialog")
+ (c-name "BraseroSumDialog")
+ (gtype-id "BRASERO_TYPE_SUM_DIALOG")
+)
+
+(define-object BlankDialog
+ (in-module "Brasero")
+ (parent "BraseroToolDialog")
+ (c-name "BraseroBlankDialog")
+ (gtype-id "BRASERO_TYPE_BLANK_DIALOG")
+)
+
+(define-object Track
+ (in-module "Brasero")
+ (parent "GObject")
+ (c-name "BraseroTrack")
+ (gtype-id "BRASERO_TYPE_TRACK")
+)
+
+(define-object TrackData
+ (in-module "Brasero")
+ (parent "BraseroTrack")
+ (c-name "BraseroTrackData")
+ (gtype-id "BRASERO_TYPE_TRACK_DATA")
+)
+
+(define-object TrackDataCfg
+ (in-module "Brasero")
+ (parent "BraseroTrackData")
+ (c-name "BraseroTrackDataCfg")
+ (gtype-id "BRASERO_TYPE_TRACK_DATA_CFG")
+)
+
+(define-object TrackDisc
+ (in-module "Brasero")
+ (parent "BraseroTrack")
+ (c-name "BraseroTrackDisc")
+ (gtype-id "BRASERO_TYPE_TRACK_DISC")
+)
+
+(define-object TrackImage
+ (in-module "Brasero")
+ (parent "BraseroTrack")
+ (c-name "BraseroTrackImage")
+ (gtype-id "BRASERO_TYPE_TRACK_IMAGE")
+)
+
+(define-object TrackImageCfg
+ (in-module "Brasero")
+ (parent "BraseroTrackImage")
+ (c-name "BraseroTrackImageCfg")
+ (gtype-id "BRASERO_TYPE_TRACK_IMAGE_CFG")
+)
+
+(define-object TrackStream
+ (in-module "Brasero")
+ (parent "BraseroTrack")
+ (c-name "BraseroTrackStream")
+ (gtype-id "BRASERO_TYPE_TRACK_STREAM")
+)
+
+(define-object TrackStreamCfg
+ (in-module "Brasero")
+ (parent "BraseroTrackStream")
+ (c-name "BraseroTrackStreamCfg")
+ (gtype-id "BRASERO_TYPE_TRACK_STREAM_CFG")
+)
+
;; Enumerations and flags ...
+(define-enum BurnResult
+ (in-module "Brasero")
+ (c-name "BraseroBurnResult")
+ (values
+ '("ok" "BRASERO_BURN_OK")
+ '("err" "BRASERO_BURN_ERR")
+ '("retry" "BRASERO_BURN_RETRY")
+ '("cancel" "BRASERO_BURN_CANCEL")
+ '("running" "BRASERO_BURN_RUNNING")
+ '("dangerous" "BRASERO_BURN_DANGEROUS")
+ '("not-ready" "BRASERO_BURN_NOT_READY")
+ '("not-running" "BRASERO_BURN_NOT_RUNNING")
+ '("need-reload" "BRASERO_BURN_NEED_RELOAD")
+ '("not-supported" "BRASERO_BURN_NOT_SUPPORTED")
+ )
+)
+
+(define-flags BurnFlag
+ (in-module "Brasero")
+ (c-name "BraseroBurnFlag")
+ (values
+ '("none" "BRASERO_BURN_FLAG_NONE")
+ '("check-size" "BRASERO_BURN_FLAG_CHECK_SIZE")
+ '("nograce" "BRASERO_BURN_FLAG_NOGRACE")
+ '("eject" "BRASERO_BURN_FLAG_EJECT")
+ '("merge" "BRASERO_BURN_FLAG_MERGE")
+ '("multi" "BRASERO_BURN_FLAG_MULTI")
+ '("append" "BRASERO_BURN_FLAG_APPEND")
+ '("burnproof" "BRASERO_BURN_FLAG_BURNPROOF")
+ '("no-tmp-files" "BRASERO_BURN_FLAG_NO_TMP_FILES")
+ '("dummy" "BRASERO_BURN_FLAG_DUMMY")
+ '("overburn" "BRASERO_BURN_FLAG_OVERBURN")
+ '("blank-before-write" "BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE")
+ '("fast-blank" "BRASERO_BURN_FLAG_FAST_BLANK")
+ '("dao" "BRASERO_BURN_FLAG_DAO")
+ '("raw" "BRASERO_BURN_FLAG_RAW")
+ '("last" "BRASERO_BURN_FLAG_LAST")
+ )
+)
+
+(define-enum BurnAction
+ (in-module "Brasero")
+ (c-name "BraseroBurnAction")
+ (values
+ '("none" "BRASERO_BURN_ACTION_NONE")
+ '("getting-size" "BRASERO_BURN_ACTION_GETTING_SIZE")
+ '("creating-image" "BRASERO_BURN_ACTION_CREATING_IMAGE")
+ '("recording" "BRASERO_BURN_ACTION_RECORDING")
+ '("blanking" "BRASERO_BURN_ACTION_BLANKING")
+ '("checksum" "BRASERO_BURN_ACTION_CHECKSUM")
+ '("drive-copy" "BRASERO_BURN_ACTION_DRIVE_COPY")
+ '("file-copy" "BRASERO_BURN_ACTION_FILE_COPY")
+ '("analysing" "BRASERO_BURN_ACTION_ANALYSING")
+ '("transcoding" "BRASERO_BURN_ACTION_TRANSCODING")
+ '("preparing" "BRASERO_BURN_ACTION_PREPARING")
+ '("leadin" "BRASERO_BURN_ACTION_LEADIN")
+ '("recording-cd-text" "BRASERO_BURN_ACTION_RECORDING_CD_TEXT")
+ '("fixating" "BRASERO_BURN_ACTION_FIXATING")
+ '("leadout" "BRASERO_BURN_ACTION_LEADOUT")
+ '("start-recording" "BRASERO_BURN_ACTION_START_RECORDING")
+ '("finished" "BRASERO_BURN_ACTION_FINISHED")
+ '("last" "BRASERO_BURN_ACTION_LAST")
+ )
+)
+
+(define-flags ImageFS
+ (in-module "Brasero")
+ (c-name "BraseroImageFS")
+ (values
+ '("fs-none" "BRASERO_IMAGE_FS_NONE")
+ '("fs-iso" "BRASERO_IMAGE_FS_ISO")
+ '("fs-udf" "BRASERO_IMAGE_FS_UDF")
+ '("fs-joliet" "BRASERO_IMAGE_FS_JOLIET")
+ '("fs-video" "BRASERO_IMAGE_FS_VIDEO")
+ '("fs-symlink" "BRASERO_IMAGE_FS_SYMLINK")
+ '("iso-fs-level-3" "BRASERO_IMAGE_ISO_FS_LEVEL_3")
+ '("iso-fs-deep-directory" "BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY")
+ '("fs-any" "BRASERO_IMAGE_FS_ANY")
+ )
+)
+
+(define-flags StreamFormat
+ (in-module "Brasero")
+ (c-name "BraseroStreamFormat")
+ (values
+ '("audio-format-none" "BRASERO_AUDIO_FORMAT_NONE")
+ '("audio-format-undefined" "BRASERO_AUDIO_FORMAT_UNDEFINED")
+ '("audio-format-4-channel" "BRASERO_AUDIO_FORMAT_4_CHANNEL")
+ '("audio-format-raw" "BRASERO_AUDIO_FORMAT_RAW")
+ '("audio-format-ac3" "BRASERO_AUDIO_FORMAT_AC3")
+ '("audio-format-mp2" "BRASERO_AUDIO_FORMAT_MP2")
+ '("audio-format-44100" "BRASERO_AUDIO_FORMAT_44100")
+ '("audio-format-48000" "BRASERO_AUDIO_FORMAT_48000")
+ '("video-format-undefined" "BRASERO_VIDEO_FORMAT_UNDEFINED")
+ '("video-format-vcd" "BRASERO_VIDEO_FORMAT_VCD")
+ '("video-format-video-dvd" "BRASERO_VIDEO_FORMAT_VIDEO_DVD")
+ '("metadata-info" "BRASERO_METADATA_INFO")
+ )
+)
+
+(define-flags ImageFormat
+ (in-module "Brasero")
+ (c-name "BraseroImageFormat")
+ (values
+ '("none" "BRASERO_IMAGE_FORMAT_NONE")
+ '("bin" "BRASERO_IMAGE_FORMAT_BIN")
+ '("cue" "BRASERO_IMAGE_FORMAT_CUE")
+ '("clone" "BRASERO_IMAGE_FORMAT_CLONE")
+ '("cdrdao" "BRASERO_IMAGE_FORMAT_CDRDAO")
+ '("any" "BRASERO_IMAGE_FORMAT_ANY")
+ )
+)
+
+(define-enum BurnError
+ (in-module "Brasero")
+ (c-name "BraseroBurnError")
+ (values
+ '("error-none" "BRASERO_BURN_ERROR_NONE")
+ '("error-general" "BRASERO_BURN_ERROR_GENERAL")
+ '("error-plugin-misbehavior" "BRASERO_BURN_ERROR_PLUGIN_MISBEHAVIOR")
+ '("error-slow-dma" "BRASERO_BURN_ERROR_SLOW_DMA")
+ '("error-permission" "BRASERO_BURN_ERROR_PERMISSION")
+ '("error-drive-busy" "BRASERO_BURN_ERROR_DRIVE_BUSY")
+ '("error-disk-space" "BRASERO_BURN_ERROR_DISK_SPACE")
+ '("error-empty" "BRASERO_BURN_ERROR_EMPTY")
+ '("error-input-invalid" "BRASERO_BURN_ERROR_INPUT_INVALID")
+ '("error-output-none" "BRASERO_BURN_ERROR_OUTPUT_NONE")
+ '("error-file-invalid" "BRASERO_BURN_ERROR_FILE_INVALID")
+ '("error-file-folder" "BRASERO_BURN_ERROR_FILE_FOLDER")
+ '("error-file-playlist" "BRASERO_BURN_ERROR_FILE_PLAYLIST")
+ '("error-file-not-found" "BRASERO_BURN_ERROR_FILE_NOT_FOUND")
+ '("error-file-not-local" "BRASERO_BURN_ERROR_FILE_NOT_LOCAL")
+ '("error-write-medium" "BRASERO_BURN_ERROR_WRITE_MEDIUM")
+ '("error-write-image" "BRASERO_BURN_ERROR_WRITE_IMAGE")
+ '("error-image-invalid" "BRASERO_BURN_ERROR_IMAGE_INVALID")
+ '("error-image-joliet" "BRASERO_BURN_ERROR_IMAGE_JOLIET")
+ '("error-image-last-session" "BRASERO_BURN_ERROR_IMAGE_LAST_SESSION")
+ '("error-medium-none" "BRASERO_BURN_ERROR_MEDIUM_NONE")
+ '("error-medium-invalid" "BRASERO_BURN_ERROR_MEDIUM_INVALID")
+ '("error-medium-space" "BRASERO_BURN_ERROR_MEDIUM_SPACE")
+ '("error-medium-no-data" "BRASERO_BURN_ERROR_MEDIUM_NO_DATA")
+ '("error-medium-not-writable" "BRASERO_BURN_ERROR_MEDIUM_NOT_WRITABLE")
+ '("error-medium-not-rewritable" "BRASERO_BURN_ERROR_MEDIUM_NOT_REWRITABLE")
+ '("error-medium-need-reloading" "BRASERO_BURN_ERROR_MEDIUM_NEED_RELOADING")
+ '("error-bad-checksum" "BRASERO_BURN_ERROR_BAD_CHECKSUM")
+ '("warning-checksum" "BRASERO_BURN_WARNING_CHECKSUM")
+ '("warning-insert-after-copy" "BRASERO_BURN_WARNING_INSERT_AFTER_COPY")
+ )
+)
+
+(define-enum SessionError
+ (in-module "Brasero")
+ (c-name "BraseroSessionError")
+ (values
+ '("valid" "BRASERO_SESSION_VALID")
+ '("no-cd-text" "BRASERO_SESSION_NO_CD_TEXT")
+ '("not-ready" "BRASERO_SESSION_NOT_READY")
+ '("empty" "BRASERO_SESSION_EMPTY")
+ '("no-input-image" "BRASERO_SESSION_NO_INPUT_IMAGE")
+ '("unknown-image" "BRASERO_SESSION_UNKNOWN_IMAGE")
+ '("no-input-medium" "BRASERO_SESSION_NO_INPUT_MEDIUM")
+ '("no-output" "BRASERO_SESSION_NO_OUTPUT")
+ '("insufficient-space" "BRASERO_SESSION_INSUFFICIENT_SPACE")
+ '("overburn-necessary" "BRASERO_SESSION_OVERBURN_NECESSARY")
+ '("not-supported" "BRASERO_SESSION_NOT_SUPPORTED")
+ '("disc-protected" "BRASERO_SESSION_DISC_PROTECTED")
+ )
+)
+
+(define-enum StatusType
+ (in-module "Brasero")
+ (c-name "BraseroStatusType")
+ (values
+ '("ok" "BRASERO_STATUS_OK")
+ '("error" "BRASERO_STATUS_ERROR")
+ '("question" "BRASERO_STATUS_QUESTION")
+ '("information" "BRASERO_STATUS_INFORMATION")
+ )
+)
+
+(define-enum TrackDataCfgColumn
+ (in-module "Brasero")
+ (c-name "BraseroTrackDataCfgColumn")
+ (values
+ '("name" "BRASERO_DATA_TREE_MODEL_NAME")
+ '("uri" "BRASERO_DATA_TREE_MODEL_URI")
+ '("mime-desc" "BRASERO_DATA_TREE_MODEL_MIME_DESC")
+ '("mime-icon" "BRASERO_DATA_TREE_MODEL_MIME_ICON")
+ '("size" "BRASERO_DATA_TREE_MODEL_SIZE")
+ '("show-percent" "BRASERO_DATA_TREE_MODEL_SHOW_PERCENT")
+ '("percent" "BRASERO_DATA_TREE_MODEL_PERCENT")
+ '("style" "BRASERO_DATA_TREE_MODEL_STYLE")
+ '("color" "BRASERO_DATA_TREE_MODEL_COLOR")
+ '("editable" "BRASERO_DATA_TREE_MODEL_EDITABLE")
+ '("is-file" "BRASERO_DATA_TREE_MODEL_IS_FILE")
+ '("is-loading" "BRASERO_DATA_TREE_MODEL_IS_LOADING")
+ '("is-imported" "BRASERO_DATA_TREE_MODEL_IS_IMPORTED")
+ '("col-num" "BRASERO_DATA_TREE_MODEL_COL_NUM")
+ )
+)
+
+(define-flags ChecksumType
+ (in-module "Brasero")
+ (c-name "BraseroChecksumType")
+ (values
+ '("none" "BRASERO_CHECKSUM_NONE")
+ '("detect" "BRASERO_CHECKSUM_DETECT")
+ '("md5" "BRASERO_CHECKSUM_MD5")
+ '("md5-file" "BRASERO_CHECKSUM_MD5_FILE")
+ '("sha1" "BRASERO_CHECKSUM_SHA1")
+ '("sha1-file" "BRASERO_CHECKSUM_SHA1_FILE")
+ '("sha256" "BRASERO_CHECKSUM_SHA256")
+ '("sha256-file" "BRASERO_CHECKSUM_SHA256_FILE")
+ )
+)
+
+(define-enum TrackDataType
+ (in-module "Brasero")
+ (c-name "BraseroTrackDataType")
+ (values
+ '("none" "BRASERO_TRACK_TYPE_NONE")
+ '("stream" "BRASERO_TRACK_TYPE_STREAM")
+ '("data" "BRASERO_TRACK_TYPE_DATA")
+ '("image" "BRASERO_TRACK_TYPE_IMAGE")
+ '("disc" "BRASERO_TRACK_TYPE_DISC")
+ )
+)
+
+
+;; From brasero-blank-dialog.h
+
+(define-function brasero_blank_dialog_get_type
+ (c-name "brasero_blank_dialog_get_type")
+ (return-type "GType")
+ (parameters
+ )
+)
+
+(define-function brasero_blank_dialog_new
+ (c-name "brasero_blank_dialog_new")
+ (is-constructor-of "BraseroBlankDialog")
+ (return-type "BraseroBlankDialog*")
+ (parameters
+ )
+)
+
+
;; From brasero-burn-dialog.h
-(define-function dialog_get_type
+(define-function brasero_burn_dialog_get_type
(c-name "brasero_burn_dialog_get_type")
(return-type "GType")
(parameters
)
)
-(define-function dialog_new
+(define-function brasero_burn_dialog_new
(c-name "brasero_burn_dialog_new")
(is-constructor-of "BraseroBurnDialog")
(return-type "GtkWidget*")
@@ -61,14 +406,14 @@
;; From brasero-burn.h
-(define-function get_type
+(define-function brasero_burn_get_type
(c-name "brasero_burn_get_type")
(return-type "GType")
(parameters
)
)
-(define-function new
+(define-function brasero_burn_new
(c-name "brasero_burn_new")
(is-constructor-of "BraseroBurn")
(return-type "BraseroBurn*")
@@ -120,7 +465,7 @@
(c-name "brasero_burn_status")
(return-type "BraseroBurnResult")
(parameters
- '("BraseroMedia*" "info")
+ '("BraseroMedia*" "media")
'("goffset*" "isosize")
'("goffset*" "written")
'("guint64*" "rate")
@@ -141,36 +486,37 @@
;; From brasero-burn-lib.h
-(define-function library_start
+(define-function start
(c-name "brasero_burn_library_start")
(return-type "gboolean")
(parameters
- '("int" "argc")
- '("char**", "argv")
+ '("int*" "argc")
+ '("char**-argv" "[]")
)
)
-(define-function library_stop
+(define-function stop
(c-name "brasero_burn_library_stop")
(return-type "none")
)
-(define-function library_get_option_group
+(define-function get_option_group
(c-name "brasero_burn_library_get_option_group")
(return-type "GOptionGroup*")
)
-(define-function library_get_plugins_list
- (c-name "brasero_burn_library_get_plugins_list")
- (return-type "GSList*")
-)
+;; This is of no use until brasero-plugin.h gets exported
+;;(define-function brasero_burn_library_get_plugins_list
+;; (c-name "brasero_burn_library_get_plugins_list")
+;; (return-type "GSList*")
+;;)
-(define-function library_can_checksum
+(define-function can_checksum
(c-name "brasero_burn_library_can_checksum")
(return-type "gboolean")
)
-(define-function library_input_supported
+(define-function input_supported
(c-name "brasero_burn_library_input_supported")
(return-type "BraseroBurnResult")
(parameters
@@ -178,7 +524,7 @@
)
)
-(define-function library_get_media_capabilities
+(define-function get_media_capabilities
(c-name "brasero_burn_library_get_media_capabilities")
(return-type "BraseroMedia")
(parameters
@@ -190,12 +536,12 @@
;; From brasero-burn-options.h
-(define-function options_get_type
+(define-function brasero_burn_options_get_type
(c-name "brasero_burn_options_get_type")
(return-type "GType")
)
-(define-function options_new
+(define-function brasero_burn_options_new
(c-name "brasero_burn_options_new")
(is-constructor-of "BraseroBurnOptions")
(return-type "GtkWidget*")
@@ -204,12 +550,6 @@
)
)
-(define-method get_session
- (of-object "BraseroBurnOptions")
- (c-name "brasero_burn_options_get_session")
- (return-type "BraseroBurnSession*")
-)
-
(define-method add_options
(of-object "BraseroBurnOptions")
(c-name "brasero_burn_options_add_options")
@@ -220,3 +560,1376 @@
)
+
+;; From brasero-enums.h
+
+
+
+;; From brasero-error.h
+
+(define-function brasero_burn_quark
+ (c-name "brasero_burn_quark")
+ (return-type "GQuark")
+)
+
+
+
+;; From brasero-session-cfg.h
+
+(define-function brasero_session_cfg_get_type
+ (c-name "brasero_session_cfg_get_type")
+ (return-type "GType")
+)
+
+(define-function brasero_session_cfg_new
+ (c-name "brasero_session_cfg_new")
+ (is-constructor-of "BraseroSessionCfg")
+ (return-type "BraseroSessionCfg*")
+)
+
+(define-method get_error
+ (of-object "BraseroSessionCfg")
+ (c-name "brasero_session_cfg_get_error")
+ (return-type "BraseroSessionError")
+)
+
+(define-method add_flags
+ (of-object "BraseroSessionCfg")
+ (c-name "brasero_session_cfg_add_flags")
+ (return-type "none")
+ (parameters
+ '("BraseroBurnFlag" "flags")
+ )
+)
+
+(define-method remove_flags
+ (of-object "BraseroSessionCfg")
+ (c-name "brasero_session_cfg_remove_flags")
+ (return-type "none")
+ (parameters
+ '("BraseroBurnFlag" "flags")
+ )
+)
+
+(define-method is_supported
+ (of-object "BraseroSessionCfg")
+ (c-name "brasero_session_cfg_is_supported")
+ (return-type "gboolean")
+ (parameters
+ '("BraseroBurnFlag" "flag")
+ )
+)
+
+(define-method is_compulsory
+ (of-object "BraseroSessionCfg")
+ (c-name "brasero_session_cfg_is_compulsory")
+ (return-type "gboolean")
+ (parameters
+ '("BraseroBurnFlag" "flag")
+ )
+)
+
+(define-method has_default_output_path
+ (of-object "BraseroSessionCfg")
+ (c-name "brasero_session_cfg_has_default_output_path")
+ (return-type "gboolean")
+)
+
+(define-method enable
+ (of-object "BraseroSessionCfg")
+ (c-name "brasero_session_cfg_enable")
+ (return-type "none")
+)
+
+(define-method disable
+ (of-object "BraseroSessionCfg")
+ (c-name "brasero_session_cfg_disable")
+ (return-type "none")
+)
+
+
+
+;; From brasero-session.h
+
+(define-function brasero_burn_session_get_type
+ (c-name "brasero_burn_session_get_type")
+ (return-type "GType")
+ (parameters
+ )
+)
+
+(define-function brasero_burn_session_new
+ (c-name "brasero_burn_session_new")
+ (is-constructor-of "BraseroBurnSession")
+ (return-type "BraseroBurnSession*")
+ (parameters
+ )
+)
+
+(define-method add_track
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_add_track")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroTrack*" "new_track" (null-ok) (default "NULL"))
+ '("BraseroTrack*" "sibling" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method move_track
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_move_track")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroTrack*" "track")
+ '("BraseroTrack*" "sibling" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method remove_track
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_remove_track")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroTrack*" "track")
+ )
+)
+
+;;
+;; wrapped in brasero-session.override
+;;
+(define-method get_tracks
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_tracks")
+ (return-type "GSList*")
+)
+
+(define-method get_status
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_status")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroStatus*" "status")
+ )
+)
+
+(define-method get_size
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_size")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("goffset*" "blocks")
+ '("goffset*" "bytes")
+ )
+)
+
+(define-method get_input_type
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_input_type")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroTrackType*" "type")
+ )
+)
+
+(define-method tag_lookup
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_tag_lookup")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "tag")
+ '("GValue**" "value")
+ )
+)
+
+(define-method tag_add
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_tag_add")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "tag")
+ '("GValue*" "value")
+ )
+)
+
+(define-method tag_remove
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_tag_remove")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "tag")
+ )
+)
+
+(define-method get_burner
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_burner")
+ (return-type "BraseroDrive*")
+)
+
+(define-method set_burner
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_set_burner")
+ (return-type "none")
+ (parameters
+ '("BraseroDrive*" "drive")
+ )
+)
+
+(define-method set_image_output_full
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_set_image_output_full")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroImageFormat" "format")
+ '("const-gchar*" "image")
+ '("const-gchar*" "toc")
+ )
+)
+
+(define-method get_output
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_output")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("gchar**" "image")
+ '("gchar**" "toc")
+ )
+)
+
+(define-method get_output_format
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_output_format")
+ (return-type "BraseroImageFormat")
+)
+
+(define-method get_label
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_label")
+ (return-type "const-gchar*")
+)
+
+(define-method set_label
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_set_label")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "label" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method set_rate
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_set_rate")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("guint64" "rate")
+ )
+)
+
+(define-method get_rate
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_rate")
+ (return-type "guint64")
+)
+
+(define-method set_flags
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_set_flags")
+ (return-type "none")
+ (parameters
+ '("BraseroBurnFlag" "flags")
+ )
+)
+
+(define-method add_flag
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_add_flag")
+ (return-type "none")
+ (parameters
+ '("BraseroBurnFlag" "flags")
+ )
+)
+
+(define-method remove_flag
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_remove_flag")
+ (return-type "none")
+ (parameters
+ '("BraseroBurnFlag" "flags")
+ )
+)
+
+(define-method get_flags
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_flags")
+ (return-type "BraseroBurnFlag")
+)
+
+(define-method set_tmpdir
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_set_tmpdir")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "path")
+ )
+)
+
+(define-method get_tmpdir
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_tmpdir")
+ (return-type "const-gchar*")
+)
+
+(define-method get_burn_flags
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_burn_flags")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroBurnFlag*" "supported")
+ '("BraseroBurnFlag*" "compulsory")
+ )
+)
+
+(define-method get_blank_flags
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_blank_flags")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroBurnFlag*" "supported")
+ '("BraseroBurnFlag*" "compulsory")
+ )
+)
+
+(define-method can_blank
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_can_blank")
+ (return-type "BraseroBurnResult")
+)
+
+(define-method can_burn
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_can_burn")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("gboolean" "use_flags")
+ )
+)
+
+(define-method input_supported
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_input_supported")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroTrackType*" "input")
+ '("gboolean" "use_flags")
+ )
+)
+
+(define-method output_supported
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_output_supported")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroTrackType*" "output")
+ )
+)
+
+(define-method get_required_media_type
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_required_media_type")
+ (return-type "BraseroMedia")
+)
+
+(define-method get_possible_output_formats
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_possible_output_formats")
+ (return-type "guint")
+ (parameters
+ '("BraseroImageFormat*" "formats")
+ )
+)
+
+(define-method get_default_output_format
+ (of-object "BraseroBurnSession")
+ (c-name "brasero_burn_session_get_default_output_format")
+ (return-type "BraseroImageFormat")
+)
+
+
+
+;; From brasero-session-span.h
+
+(define-function brasero_session_span_get_type
+ (c-name "brasero_session_span_get_type")
+ (return-type "GType")
+)
+
+(define-function brasero_session_span_new
+ (c-name "brasero_session_span_new")
+ (is-constructor-of "BraseroSessionSpan")
+ (return-type "BraseroSessionSpan*")
+)
+
+(define-method again
+ (of-object "BraseroSessionSpan")
+ (c-name "brasero_session_span_again")
+ (return-type "BraseroBurnResult")
+)
+
+(define-method possible
+ (of-object "BraseroSessionSpan")
+ (c-name "brasero_session_span_possible")
+ (return-type "BraseroBurnResult")
+)
+
+(define-method start
+ (of-object "BraseroSessionSpan")
+ (c-name "brasero_session_span_start")
+ (return-type "BraseroBurnResult")
+)
+
+(define-method next
+ (of-object "BraseroSessionSpan")
+ (c-name "brasero_session_span_next")
+ (return-type "BraseroBurnResult")
+)
+
+(define-method stop
+ (of-object "BraseroSessionSpan")
+ (c-name "brasero_session_span_stop")
+ (return-type "none")
+)
+
+
+
+;; From brasero-status.h
+
+(define-function brasero_status_new
+ (c-name "brasero_status_new")
+ (is-constructor-of "BraseroStatus")
+ (return-type "BraseroStatus*")
+)
+
+(define-method free
+ (of-object "BraseroStatus")
+ (c-name "brasero_status_free")
+ (return-type "none")
+)
+
+(define-method get_result
+ (of-object "BraseroStatus")
+ (c-name "brasero_status_get_result")
+ (return-type "BraseroBurnResult")
+)
+
+(define-method get_progress
+ (of-object "BraseroStatus")
+ (c-name "brasero_status_get_progress")
+ (return-type "gdouble")
+)
+
+(define-method get_error
+ (of-object "BraseroStatus")
+ (c-name "brasero_status_get_error")
+ (return-type "GError*")
+)
+
+(define-method get_current_action
+ (of-object "BraseroStatus")
+ (c-name "brasero_status_get_current_action")
+ (return-type "gchar*")
+)
+
+(define-method set_completed
+ (of-object "BraseroStatus")
+ (c-name "brasero_status_set_completed")
+ (return-type "none")
+)
+
+(define-method set_not_ready
+ (of-object "BraseroStatus")
+ (c-name "brasero_status_set_not_ready")
+ (return-type "none")
+ (parameters
+ '("gdouble" "progress")
+ '("const-gchar*" "current_action")
+ )
+)
+
+(define-method set_error
+ (of-object "BraseroStatus")
+ (c-name "brasero_status_set_error")
+ (return-type "none")
+ (parameters
+ '("GError*" "error")
+ )
+)
+
+
+
+;; From brasero-sum-dialog.h
+
+(define-function brasero_sum_dialog_get_type
+ (c-name "brasero_sum_dialog_get_type")
+ (return-type "GType")
+ (parameters
+ )
+)
+
+(define-function brasero_sum_dialog_new
+ (c-name "brasero_sum_dialog_new")
+ (is-constructor-of "BraseroSumDialog")
+ (return-type "BraseroSumDialog*")
+ (parameters
+ )
+)
+
+
+
+;; From brasero-tags.h
+
+
+
+;; From brasero-tool-dialog.h
+
+(define-function brasero_tool_dialog_get_type
+ (c-name "brasero_tool_dialog_get_type")
+ (return-type "GType")
+ (parameters
+ )
+)
+
+(define-method cancel
+ (of-object "BraseroToolDialog")
+ (c-name "brasero_tool_dialog_cancel")
+ (return-type "gboolean")
+)
+
+(define-method set_medium
+ (of-object "BraseroToolDialog")
+ (c-name "brasero_tool_dialog_set_medium")
+ (return-type "gboolean")
+ (parameters
+ '("BraseroMedium*" "medium")
+ )
+)
+
+
+
+;; From brasero-track-data-cfg.h
+
+(define-function brasero_track_data_cfg_get_type
+ (c-name "brasero_track_data_cfg_get_type")
+ (return-type "GType")
+)
+
+(define-function brasero_track_data_cfg_new
+ (c-name "brasero_track_data_cfg_new")
+ (is-constructor-of "BraseroTrackDataCfg")
+ (return-type "BraseroTrackDataCfg*")
+)
+
+(define-method add
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_add")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "uri")
+ '("GtkTreePath*" "parent")
+ )
+)
+
+(define-method add_empty_directory
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_add_empty_directory")
+ (return-type "GtkTreePath*")
+ (parameters
+ '("const-gchar*" "name")
+ '("GtkTreePath*" "parent")
+ )
+)
+
+(define-method remove
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_remove")
+ (return-type "gboolean")
+ (parameters
+ '("GtkTreePath*" "treepath")
+ )
+)
+
+(define-method rename
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_rename")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "newname")
+ '("GtkTreePath*" "treepath")
+ )
+)
+
+(define-method reset
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_reset")
+ (return-type "gboolean")
+)
+
+(define-method load_medium
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_load_medium")
+ (return-type "gboolean")
+ (parameters
+ '("BraseroMedium*" "medium")
+ '("GError**" "error")
+ )
+)
+
+(define-method unload_current_medium
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_unload_current_medium")
+ (return-type "none")
+)
+
+(define-method get_current_medium
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_get_current_medium")
+ (return-type "BraseroMedium*")
+)
+
+(define-method get_available_media
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_get_available_media")
+ (return-type "GSList*")
+)
+
+(define-method dont_filter_uri
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_dont_filter_uri")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "uri")
+ )
+)
+
+(define-method get_restored_list
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_get_restored_list")
+ (return-type "GSList*")
+)
+
+(define-method restore
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_restore")
+ (return-type "none")
+ (parameters
+ '("GtkTreePath*" "treepath")
+ )
+)
+
+(define-method get_filtered_model
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_get_filtered_model")
+ (return-type "GtkTreeModel*")
+)
+
+(define-method span
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_span")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("goffset" "sectors")
+ '("BraseroTrackData*" "new_track")
+ )
+)
+
+(define-method span_again
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_span_again")
+ (return-type "BraseroBurnResult")
+)
+
+(define-method span_possible
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_span_possible")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("goffset" "sectors")
+ )
+)
+
+(define-method span_stop
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_span_stop")
+ (return-type "none")
+)
+
+(define-method get_icon
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_get_icon")
+ (return-type "GIcon*")
+)
+
+(define-method get_icon_path
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_get_icon_path")
+ (return-type "gchar*")
+)
+
+(define-method set_icon
+ (of-object "BraseroTrackDataCfg")
+ (c-name "brasero_track_data_cfg_set_icon")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "icon_path")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From brasero-track-data.h
+
+;; no need for this function as BraseroGraftPoint
+;; has been wrapped in a class
+;;(define-function brasero_graft_point_free
+;; (c-name "brasero_graft_point_free")
+;; (return-type "none")
+;; (parameters
+;; '("BraseroGraftPt*" "graft")
+;; )
+;;)
+
+;; no need for this function as BraseroGraftPoint
+;; has been wrapped in a class
+;;(define-function brasero_graft_point_copy
+;; (c-name "brasero_graft_point_copy")
+;; (return-type "BraseroGraftPt*")
+;; (parameters
+;; '("BraseroGraftPt*" "graft")
+;; )
+;;)
+
+(define-function brasero_track_data_get_type
+ (c-name "brasero_track_data_get_type")
+ (return-type "GType")
+)
+
+(define-function brasero_track_data_new
+ (c-name "brasero_track_data_new")
+ (is-constructor-of "BraseroTrackData")
+ (return-type "BraseroTrackData*")
+)
+
+(define-method set_source
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_set_source")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("GSList*" "grafts")
+ '("GSList*" "unreadable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method add_fs
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_add_fs")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroImageFS" "fstype")
+ )
+)
+
+(define-method rm_fs
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_rm_fs")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroImageFS" "fstype")
+ )
+)
+
+(define-method set_data_blocks
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_set_data_blocks")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("goffset" "blocks")
+ )
+)
+
+(define-method set_file_num
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_set_file_num")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("guint64" "number")
+ )
+)
+
+(define-method get_grafts
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_get_grafts")
+ (return-type "GSList*")
+)
+
+(define-method get_excluded
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_get_excluded")
+ (return-type "GSList*")
+ (parameters
+ '("gboolean" "copy")
+ )
+)
+
+(define-method get_paths
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_get_paths")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("gboolean" "use_joliet")
+ '("const-gchar*" "grafts_path")
+ '("const-gchar*" "excluded_path")
+ '("const-gchar*" "emptydir")
+ '("const-gchar*" "videodir" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method get_file_num
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_get_file_num")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("guint64*" "file_num")
+ )
+)
+
+(define-method get_fs
+ (of-object "BraseroTrackData")
+ (c-name "brasero_track_data_get_fs")
+ (return-type "BraseroImageFS")
+)
+
+
+
+;; From brasero-track-disc.h
+
+(define-function brasero_track_disc_get_type
+ (c-name "brasero_track_disc_get_type")
+ (return-type "GType")
+)
+
+(define-function brasero_track_disc_new
+ (c-name "brasero_track_disc_new")
+ (is-constructor-of "BraseroTrackDisc")
+ (return-type "BraseroTrackDisc*")
+)
+
+(define-method set_drive
+ (of-object "BraseroTrackDisc")
+ (c-name "brasero_track_disc_set_drive")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroDrive*" "drive")
+ )
+)
+
+(define-method get_drive
+ (of-object "BraseroTrackDisc")
+ (c-name "brasero_track_disc_get_drive")
+ (return-type "BraseroDrive*")
+)
+
+(define-method set_track_num
+ (of-object "BraseroTrackDisc")
+ (c-name "brasero_track_disc_set_track_num")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("guint" "num")
+ )
+)
+
+(define-method get_track_num
+ (of-object "BraseroTrackDisc")
+ (c-name "brasero_track_disc_get_track_num")
+ (return-type "guint")
+)
+
+(define-method get_medium_type
+ (of-object "BraseroTrackDisc")
+ (c-name "brasero_track_disc_get_medium_type")
+ (return-type "BraseroMedia")
+)
+
+
+
+;; From brasero-track.h
+
+(define-function brasero_track_get_type
+ (c-name "brasero_track_get_type")
+ (return-type "GType")
+)
+
+(define-method changed
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_changed")
+ (return-type "none")
+)
+
+(define-method get_size
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_get_size")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("goffset*" "blocks")
+ '("goffset*" "bytes")
+ )
+)
+
+(define-method get_track_type
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_get_track_type")
+ (return-type "BraseroTrackDataType")
+ (parameters
+ '("BraseroTrackType*" "type")
+ )
+)
+
+(define-method get_status
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_get_status")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroStatus*" "status")
+ )
+)
+
+(define-method set_checksum
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_set_checksum")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroChecksumType" "type")
+ '("const-gchar*" "checksum")
+ )
+)
+
+(define-method get_checksum
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_get_checksum")
+ (return-type "const-gchar*")
+)
+
+(define-method get_checksum_type
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_get_checksum_type")
+ (return-type "BraseroChecksumType")
+)
+
+(define-method tag_add
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_tag_add")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "tag")
+ '("GValue*" "value")
+ )
+)
+
+(define-method tag_lookup
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_tag_lookup")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "tag")
+ '("GValue**" "value")
+ )
+)
+
+(define-method tag_copy_missing
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_tag_copy_missing")
+ (return-type "none")
+ (parameters
+ '("BraseroTrack*" "src")
+ )
+)
+
+(define-method tag_add_string
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_tag_add_string")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "tag")
+ '("const-gchar*" "string")
+ )
+)
+
+(define-method tag_lookup_string
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_tag_lookup_string")
+ (return-type "const-gchar*")
+ (parameters
+ '("const-gchar*" "tag")
+ )
+)
+
+(define-method tag_add_int
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_tag_add_int")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "tag")
+ '("int" "value")
+ )
+)
+
+(define-method tag_lookup_int
+ (of-object "BraseroTrack")
+ (c-name "brasero_track_tag_lookup_int")
+ (return-type "int")
+ (parameters
+ '("const-gchar*" "tag")
+ )
+)
+
+
+
+;; From brasero-track-image-cfg.h
+
+(define-function brasero_track_image_cfg_get_type
+ (c-name "brasero_track_image_cfg_get_type")
+ (return-type "GType")
+)
+
+(define-function brasero_track_image_cfg_new
+ (c-name "brasero_track_image_cfg_new")
+ (is-constructor-of "BraseroTrackImageCfg")
+ (return-type "BraseroTrackImageCfg*")
+)
+
+(define-method set_source
+ (of-object "BraseroTrackImageCfg")
+ (c-name "brasero_track_image_cfg_set_source")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "uri")
+ )
+)
+
+(define-method force_format
+ (of-object "BraseroTrackImageCfg")
+ (c-name "brasero_track_image_cfg_force_format")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroImageFormat" "format")
+ )
+)
+
+(define-method get_forced_format
+ (of-object "BraseroTrackImageCfg")
+ (c-name "brasero_track_image_cfg_get_forced_format")
+ (return-type "BraseroImageFormat")
+)
+
+
+
+;; From brasero-track-image.h
+
+(define-function brasero_track_image_get_type
+ (c-name "brasero_track_image_get_type")
+ (return-type "GType")
+)
+
+(define-function brasero_track_image_new
+ (c-name "brasero_track_image_new")
+ (is-constructor-of "BraseroTrackImage")
+ (return-type "BraseroTrackImage*")
+)
+
+(define-method set_source
+ (of-object "BraseroTrackImage")
+ (c-name "brasero_track_image_set_source")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "image" (null-ok) (default "NULL"))
+ '("const-gchar*" "toc" (null-ok) (default "NULL"))
+ '("BraseroImageFormat" "format")
+ )
+)
+
+(define-method set_block_num
+ (of-object "BraseroTrackImage")
+ (c-name "brasero_track_image_set_block_num")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("goffset" "blocks")
+ )
+)
+
+(define-method get_source
+ (of-object "BraseroTrackImage")
+ (c-name "brasero_track_image_get_source")
+ (return-type "gchar*")
+ (parameters
+ '("gboolean" "uri")
+ )
+)
+
+(define-method get_toc_source
+ (of-object "BraseroTrackImage")
+ (c-name "brasero_track_image_get_toc_source")
+ (return-type "gchar*")
+ (parameters
+ '("gboolean" "uri")
+ )
+)
+
+(define-method get_format
+ (of-object "BraseroTrackImage")
+ (c-name "brasero_track_image_get_format")
+ (return-type "BraseroImageFormat")
+)
+
+
+
+;; From brasero-track-stream-cfg.h
+
+(define-function brasero_track_stream_cfg_get_type
+ (c-name "brasero_track_stream_cfg_get_type")
+ (return-type "GType")
+)
+
+(define-function brasero_track_stream_cfg_new
+ (c-name "brasero_track_stream_cfg_new")
+ (is-constructor-of "BraseroTrackStreamCfg")
+ (return-type "BraseroTrackStreamCfg*")
+)
+
+
+
+;; From brasero-track-stream.h
+
+(define-function brasero_track_stream_get_type
+ (c-name "brasero_track_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function brasero_track_stream_new
+ (c-name "brasero_track_stream_new")
+ (is-constructor-of "BraseroTrackStream")
+ (return-type "BraseroTrackStream*")
+)
+
+(define-method set_source
+ (of-object "BraseroTrackStream")
+ (c-name "brasero_track_stream_set_source")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("const-gchar*" "uri")
+ )
+)
+
+(define-method set_format
+ (of-object "BraseroTrackStream")
+ (c-name "brasero_track_stream_set_format")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("BraseroStreamFormat" "format")
+ )
+)
+
+(define-method set_boundaries
+ (of-object "BraseroTrackStream")
+ (c-name "brasero_track_stream_set_boundaries")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("gint64" "start")
+ '("gint64" "end")
+ '("gint64" "gap")
+ )
+)
+
+(define-method get_source
+ (of-object "BraseroTrackStream")
+ (c-name "brasero_track_stream_get_source")
+ (return-type "gchar*")
+ (parameters
+ '("gboolean" "uri")
+ )
+)
+
+(define-method get_length
+ (of-object "BraseroTrackStream")
+ (c-name "brasero_track_stream_get_length")
+ (return-type "BraseroBurnResult")
+ (parameters
+ '("guint64*" "length")
+ )
+)
+
+(define-method get_start
+ (of-object "BraseroTrackStream")
+ (c-name "brasero_track_stream_get_start")
+ (return-type "guint64")
+)
+
+(define-method get_end
+ (of-object "BraseroTrackStream")
+ (c-name "brasero_track_stream_get_end")
+ (return-type "guint64")
+)
+
+(define-method get_gap
+ (of-object "BraseroTrackStream")
+ (c-name "brasero_track_stream_get_gap")
+ (return-type "guint64")
+)
+
+(define-method get_format
+ (of-object "BraseroTrackStream")
+ (c-name "brasero_track_stream_get_format")
+ (return-type "BraseroStreamFormat")
+)
+
+
+
+;; From brasero-track-type.h
+
+(define-function brasero_track_type_new
+ (c-name "brasero_track_type_new")
+ (is-constructor-of "BraseroTrackType")
+ (return-type "BraseroTrackType*")
+)
+
+(define-method free
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_free")
+ (return-type "none")
+)
+
+(define-method is_empty
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_is_empty")
+ (return-type "gboolean")
+)
+
+(define-method get_has_data
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_get_has_data")
+ (return-type "gboolean")
+)
+
+(define-method get_has_image
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_get_has_image")
+ (return-type "gboolean")
+)
+
+(define-method get_has_stream
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_get_has_stream")
+ (return-type "gboolean")
+)
+
+(define-method get_has_medium
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_get_has_medium")
+ (return-type "gboolean")
+)
+
+(define-method set_has_data
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_set_has_data")
+ (return-type "none")
+)
+
+(define-method set_has_image
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_set_has_image")
+ (return-type "none")
+)
+
+(define-method set_has_stream
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_set_has_stream")
+ (return-type "none")
+)
+
+(define-method set_has_medium
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_set_has_medium")
+ (return-type "none")
+)
+
+(define-method get_stream_format
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_get_stream_format")
+ (return-type "BraseroStreamFormat")
+)
+
+(define-method get_image_format
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_get_image_format")
+ (return-type "BraseroImageFormat")
+)
+
+(define-method get_medium_type
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_get_medium_type")
+ (return-type "BraseroMedia")
+)
+
+(define-method get_data_fs
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_get_data_fs")
+ (return-type "BraseroImageFS")
+)
+
+(define-method set_stream_format
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_set_stream_format")
+ (return-type "none")
+ (parameters
+ '("BraseroStreamFormat" "format")
+ )
+)
+
+(define-method set_image_format
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_set_image_format")
+ (return-type "none")
+ (parameters
+ '("BraseroImageFormat" "format")
+ )
+)
+
+(define-method set_medium_type
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_set_medium_type")
+ (return-type "none")
+ (parameters
+ '("BraseroMedia" "media")
+ )
+)
+
+(define-method set_data_fs
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_set_data_fs")
+ (return-type "none")
+ (parameters
+ '("BraseroImageFS" "fs_type")
+ )
+)
+
+(define-method equal
+ (of-object "BraseroTrackType")
+ (c-name "brasero_track_type_equal")
+ (return-type "gboolean")
+ (parameters
+ '("const-BraseroTrackType*" "type_B")
+ )
+)
+
+
diff --git a/braseroburn/brasero_burn.override b/braseroburn/brasero_burn.override
index 7a98995..9515512 100644
--- a/braseroburn/brasero_burn.override
+++ b/braseroburn/brasero_burn.override
@@ -3,20 +3,300 @@
headers
#define NO_IMPORT_PYGOBJECT
#include "pygobject.h"
-#include <brasero-burn.h>
+#include <pygtk/pygtk.h>
+#include <brasero-media.h>
+#include <brasero-drive.h>
+#include <brasero-medium.h>
+#include <brasero-tags.h>
+#include <brasero-enums.h>
+#include <brasero-error.h>
+#include <brasero-status.h>
#include <brasero-burn-lib.h>
-#include <brasero-burn-dialog.h>
+#include <brasero-track-type.h>
+#include <brasero-track.h>
+#include <brasero-track-data.h>
+#include <brasero-track-data-cfg.h>
+#include <brasero-track-disc.h>
+#include <brasero-track-stream.h>
+#include <brasero-track-stream-cfg.h>
+#include <brasero-track-image.h>
+#include <brasero-track-image-cfg.h>
+#include <brasero-session.h>
+#include <brasero-session-span.h>
+#include <brasero-session-cfg.h>
+#include <brasero-burn.h>
#include <brasero-burn-options.h>
+#include <brasero-burn-dialog.h>
+#include <brasero-tool-dialog.h>
+#include <brasero-sum-dialog.h>
+#include <brasero-blank-dialog.h>
#include "config.h"
+#include "brasero-types.h"
%%
modulename braseroburn
%%
import gobject.GObject as PyGObject_Type
+import gio.Icon as PyGIcon_Type
import gtk.Widget as PyGtkWidget_Type
import gtk.Dialog as PyGtkDialog_Type
+import braseromedia.Medium as PyBraseroMedium_Type
+import braseromedia.Drive as PyBraseroDrive_Type
%%
ignore-glob
*_get_type
+%%
+ignore
+ brasero_burn_quark
+%%
+override brasero_burn_session_get_tracks noargs
+static PyObject *
+_wrap_brasero_burn_session_get_tracks (PyGObject *self)
+{
+ GSList *list, *l;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ list = brasero_burn_session_get_tracks (BRASERO_BURN_SESSION (self->obj));
+
+ pyg_end_allow_threads;
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ BraseroTrack *track = l->data;
+ PyObject *item = pygobject_new((GObject *)track);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ /* Don't unref object track */
+ }
+ /* Don't free list */
+ return ret;
+}
+%%
+override brasero_track_data_cfg_get_available_media noargs
+static PyObject *
+_wrap_brasero_track_data_cfg_get_available_media (PyGObject *self)
+{
+ GSList *list, *l;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ list = brasero_track_data_cfg_get_available_media (BRASERO_TRACK_DATA_CFG (self->obj));
+
+ pyg_end_allow_threads;
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ BraseroMedium *medium = l->data;
+ PyObject *item = pygobject_new ((GObject *)medium);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(medium);
+ }
+ g_slist_free(list);
+
+ return ret;
+}
+%%
+override brasero_track_data_cfg_get_restored_list noargs
+static PyObject *
+_wrap_brasero_track_data_cfg_get_restored_list (PyGObject *self)
+{
+ GSList *list, *l;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ list = brasero_track_data_cfg_get_restored_list (BRASERO_TRACK_DATA_CFG (self->obj));
+
+ pyg_end_allow_threads;
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ gchar *uri = l->data;
+ PyObject *item = PyString_FromString(uri);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_free (uri);
+ }
+ g_slist_free(list);
+
+ return ret;
+}
+%%
+override brasero_track_data_get_grafts noargs
+static PyObject *
+_wrap_brasero_track_data_get_grafts (PyGObject *self)
+{
+ GSList *list, *l;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ list = brasero_track_data_get_grafts (BRASERO_TRACK_DATA (self->obj));
+
+ pyg_end_allow_threads;
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ BraseroGraftPt *graft = l->data;
+ PyObject *item = PyBraseroGraftPoint_New (graft);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ /* Don't free graft */
+ }
+ /* Dont free list */
+
+ return ret;
+}
+%%
+override brasero_track_data_get_excluded noargs
+static PyObject *
+_wrap_brasero_track_data_get_excluded (PyGObject *self)
+{
+ GSList *list, *l;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ list = brasero_track_data_get_excluded (BRASERO_TRACK_DATA (self->obj), FALSE);
+
+ pyg_end_allow_threads;
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ gchar *uri = l->data;
+ PyObject *item = PyString_FromString(uri);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ /* Don't free uri */
+ }
+ /* Don't free list */
+
+ return ret;
+}
+%%
+override brasero_track_data_set_source kwargs
+static PyObject *
+_wrap_brasero_track_data_set_source (PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ Py_ssize_t len, i;
+ BraseroBurnResult result;
+ GSList *grafts = NULL;
+ GSList *excluded = NULL;
+ PyObject *grafts_list = NULL;
+ PyObject *excluded_list = NULL;
+ static char *kwlist[] = { "grafts", "excluded", NULL };
+
+ if (!PyArg_ParseTupleAndKeywords (args, kwargs, "O!O:BraseroTrackData.set_source", kwlist, &PyList_Type, &grafts_list, &excluded_list))
+ return NULL;
+
+ if (!PyList_Check (grafts_list)) {
+ PyErr_SetString (PyExc_TypeError, "first parameter (grafts) must be a list");
+ return NULL;
+ }
+
+ if (excluded_list != Py_None && !PyList_Check (excluded_list)) {
+ PyErr_SetString (PyExc_TypeError, "second parameter (excluded) must be a list");
+ return NULL;
+ }
+
+ len = PyList_GET_SIZE (grafts_list);
+ for (i = 0; i < len; i++) {
+ PyBraseroGraftPoint *graft;
+ graft = (PyBraseroGraftPoint *) PyList_GET_ITEM (grafts_list, i);
+ if (!py_BraseroGraftPoint_Check ((PyObject*) graft)) {
+ PyErr_SetString (PyExc_TypeError, "Elements must be braseroburn.GraftPoint");
+ g_slist_foreach (grafts, (GFunc) brasero_graft_point_free, NULL);
+ g_slist_free (grafts);
+ return NULL;
+ }
+ grafts = g_slist_append (grafts, brasero_graft_point_copy (graft->graft));
+ }
+
+ if (PyList_Check (excluded_list)) {
+ len = PyList_GET_SIZE (excluded_list);
+ for (i = 0; i < len; i++) {
+ PyObject *excluded_item;
+ excluded_item = PyList_GET_ITEM (excluded_list, i);
+ if (!PyString_Check (excluded_item)) {
+ PyErr_SetString (PyExc_TypeError, "Elements must be strings");
+ g_slist_foreach (excluded, (GFunc) g_free, NULL);
+ g_slist_free (excluded);
+ g_slist_foreach (grafts, (GFunc) brasero_graft_point_free, NULL);
+ g_slist_free (grafts);
+ return NULL;
+ }
+ excluded = g_slist_append (excluded, g_strdup (PyString_AsString (excluded_item)));
+ }
+ }
+
+ pyg_begin_allow_threads;
+
+ /* NOTE: this function takes ownership of the lists and their contents */
+ result = brasero_track_data_set_source (BRASERO_TRACK_DATA (self->obj),
+ grafts,
+ excluded);
+
+ pyg_end_allow_threads;
+ return PyInt_FromLong (result);
+}
+%%
+override brasero_burn_library_start noargs
+static PyObject *
+_wrap_brasero_burn_library_start (PyGObject *self, PyObject *args)
+{
+ PyObject *av;
+ int argc, i;
+ char **argv;
+
+ /* The code from pygtk */
+ /* initialise libbraseroburn */
+ av = PySys_GetObject("argv");
+ if (av != NULL) {
+ if (!PyList_Check(av)) {
+ PyErr_Warn(PyExc_Warning, "ignoring sys.argv: it must be a list of strings");
+ av = NULL;
+ } else {
+ argc = PyList_Size(av);
+ for (i = 0; i < argc; i++)
+ if (!PyString_Check(PyList_GetItem(av, i))) {
+ PyErr_Warn(PyExc_Warning, "ignoring sys.argv: it must be a list of strings");
+ av = NULL;
+ break;
+ }
+ }
+ }
+ if (av != NULL) {
+ argv = g_new(char *, argc);
+ for (i = 0; i < argc; i++)
+ argv[i] = g_strdup(PyString_AsString(PyList_GetItem(av, i)));
+ } else {
+ argc = 0;
+ argv = NULL;
+ }
+
+ if (!brasero_burn_library_start (&argc, &argv)) {
+ if (argv != NULL) {
+ for (i = 0; i < argc; i++)
+ g_free(argv[i]);
+ g_free(argv);
+ }
+ PyErr_SetString(PyExc_RuntimeError, "could not start libbrasero-burn");
+ return NULL;
+ }
+
+ if (argv != NULL) {
+ PySys_SetArgv(argc, argv);
+ for (i = 0; i < argc; i++)
+ g_free(argv[i]);
+ g_free(argv);
+ }
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
diff --git a/braseroburn/brasero_burn_module.c b/braseroburn/brasero_burn_module.c
index d303e64..556d782 100644
--- a/braseroburn/brasero_burn_module.c
+++ b/braseroburn/brasero_burn_module.c
@@ -20,7 +20,31 @@
#include <Python.h>
#include <pygobject.h>
+#include <brasero-tags.h>
+#include <brasero-enums.h>
+#include <brasero-error.h>
+#include <brasero-status.h>
+#include <brasero-burn-lib.h>
+#include <brasero-track-type.h>
+#include <brasero-track.h>
+#include <brasero-track-data.h>
+#include <brasero-track-data-cfg.h>
+#include <brasero-track-disc.h>
+#include <brasero-track-stream.h>
+#include <brasero-track-stream-cfg.h>
+#include <brasero-track-image.h>
+#include <brasero-track-image-cfg.h>
+#include <brasero-session.h>
+#include <brasero-session-span.h>
+#include <brasero-session-cfg.h>
#include <brasero-burn.h>
+#include <brasero-burn-options.h>
+#include <brasero-burn-dialog.h>
+#include <brasero-tool-dialog.h>
+#include <brasero-sum-dialog.h>
+#include <brasero-blank-dialog.h>
+
+#include "brasero-types.h"
void brasero_burn_register_classes (PyObject *d);
void brasero_burn_add_constants(PyObject *module, const gchar *strip_prefix);
@@ -38,7 +62,11 @@ initbraseroburn(void)
d = PyModule_GetDict (m);
if (PyErr_Occurred())
return;
-
+
+ /* init (mainly GraftPoint) brasero specific classes */
+ if (py_brasero_types_init (m))
+ return;
+
/* init auto-gened classes */
brasero_burn_register_classes (d);
/* brasero_burn_add_constants (m, "BRASERO_BURN_"); */
diff --git a/braseroburn/wscript b/braseroburn/wscript
index f620460..1130f62 100644
--- a/braseroburn/wscript
+++ b/braseroburn/wscript
@@ -14,7 +14,7 @@ def build(bld):
if 'braseroburn' in bld.env['MODULES_TO_BUILD']:
bld.codegen('brasero_burn', prefix='brasero_burn')
pyext = bld.create_pyext()
- pyext.source = 'brasero_burn_module.c brasero_burn.c'
+ pyext.source = 'brasero_burn_module.c brasero_burn.c brasero-types.c'
pyext.includes = '.'
pyext.target = 'braseroburn'
pyext.uselib = 'BRASEROBURN'
diff --git a/braseromedia/Makefile.am b/braseromedia/Makefile.am
index 3b25649..8ef37a7 100644
--- a/braseromedia/Makefile.am
+++ b/braseromedia/Makefile.am
@@ -24,6 +24,7 @@ brasero_media.c: brasero_media.defs brasero_media.override
&& $(PYGTK_CODEGEN) \
--override $*.override \
--py_ssize_t-clean \
+ --register $(PYGOBJECT_DEFSDIR)/gio-types.defs \
--register $(PYGTK_DEFSDIR)/gtk-types.defs \
--register $(PYGTK_DEFSDIR)/gdk-types.defs \
--prefix $* $*.defs) > gen-$*.c \
diff --git a/braseromedia/brasero_media.override b/braseromedia/brasero_media.override
index a3f13c0..ed11d84 100644
--- a/braseromedia/brasero_media.override
+++ b/braseromedia/brasero_media.override
@@ -15,10 +15,99 @@ headers
%%
modulename braseromedia
%%
+import gio.Icon as PyGIcon_Type
+import gio.Drive as PyGDrive_Type
+import gio.Volume as PyGVolume_Type
import gtk.ComboBox as PyGtkComboBox_Type
import gobject.GObject as PyGObject_Type
import gtk.Window as PyGtkWindow_Type
%%
ignore-glob
*_get_type
+%%
+ignore
+ brasero_media_quark
+%%
+override brasero_medium_monitor_get_media kwargs
+static PyObject *
+_wrap_brasero_medium_monitor_get_media (PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "MediaType", NULL };
+ BraseroMediaType media_type;
+ GSList *list, *l;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords (args, kwargs, "i:BraseroMediumMonitor.get_media", kwlist, &media_type))
+ return NULL;
+
+ pyg_begin_allow_threads;
+
+ list = brasero_medium_monitor_get_media (BRASERO_MEDIUM_MONITOR (self->obj), media_type);
+
+ pyg_end_allow_threads;
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ BraseroMedium *medium = l->data;
+ PyObject *item = pygobject_new ((GObject *) medium);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(medium);
+ }
+ g_slist_free(list);
+
+ return ret;
+}
+%%
+override brasero_medium_monitor_get_drives kwargs
+static PyObject *
+_wrap_brasero_medium_monitor_get_drives (PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "DriveType", NULL };
+ BraseroDriveType drive_type;
+ GSList *list, *l;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords (args, kwargs, "i:BraseroMediumMonitor.get_drives", kwlist, &drive_type))
+ return NULL;
+
+ pyg_begin_allow_threads;
+
+ list = brasero_medium_monitor_get_drives (BRASERO_MEDIUM_MONITOR (self->obj), drive_type);
+
+ pyg_end_allow_threads;
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ BraseroDrive *drive = l->data;
+ PyObject *item = pygobject_new ((GObject *) drive);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref (drive);
+ }
+ g_slist_free(list);
+
+ return ret;
+}
+%%
+override brasero_drive_lock kwargs
+static PyObject *
+_wrap_brasero_drive_lock(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "reason", NULL };
+ char *reason, *failure = NULL;
+ int ret;
+
+ /* This was ported from former nautilusburn module */
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:BraseroDrive.lock", kwlist, &reason))
+ return NULL;
+
+ ret = brasero_drive_lock (BRASERO_DRIVE(self->obj), reason, &failure);
+ if (failure) {
+ PyErr_SetString(PyExc_RuntimeError, failure);
+ return NULL;
+ }
+ return PyInt_FromLong (ret);
+}
+
diff --git a/configure.ac b/configure.ac
index 681ecfc..9365ae2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,6 +91,11 @@ case $pygtk_version in
;;
esac
+AC_MSG_CHECKING(for pygobject defs)
+PYGOBJECT_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygobject-2.0`
+AC_SUBST(PYGOBJECT_DEFSDIR)
+AC_MSG_RESULT($PYGOBJECT_DEFSDIR)
+
AC_MSG_CHECKING(for pygtk defs)
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
AC_SUBST(PYGTK_DEFSDIR)
diff --git a/examples/braseroburn/write-audio-video.py b/examples/braseroburn/write-audio-video.py
new file mode 100644
index 0000000..62e0a6f
--- /dev/null
+++ b/examples/braseroburn/write-audio-video.py
@@ -0,0 +1,37 @@
+#! /usr/bin/python
+import sys
+import pygtk
+pygtk.require("2.0")
+import gtk
+import braseromedia
+import braseroburn
+
+if len(sys.argv) < 2:
+ print "Usage: write-audio song1/video1 song2/video2 ..."
+ print "Writes songs to a CD."
+ sys.exit (1)
+
+# This is absolutely necessary
+braseroburn.start ()
+
+session = braseroburn.SessionCfg ()
+
+for arg_num in range (1, len (sys.argv)):
+ track = braseroburn.TrackStreamCfg ()
+ track.set_source (sys.argv [arg_num])
+ print "Adding '" + sys.argv [arg_num] + "'"
+ session.add_track (track, None)
+
+# Run configure dialog
+option_dialog = braseroburn.BurnOptions (session)
+res = option_dialog.run ()
+option_dialog.destroy ()
+
+if res != gtk.RESPONSE_OK:
+ exit ()
+
+# Run BurnDialog and that's it
+burn_dialog = braseroburn.BurnDialog ()
+burn_dialog.show ()
+burn_dialog.run (session)
+option_dialog.destroy ()
diff --git a/examples/braseroburn/write-data.py b/examples/braseroburn/write-data.py
new file mode 100644
index 0000000..9f0438b
--- /dev/null
+++ b/examples/braseroburn/write-data.py
@@ -0,0 +1,47 @@
+#! /usr/bin/python
+import sys
+import pygtk
+pygtk.require("2.0")
+import gtk
+import braseromedia
+import braseroburn
+
+if len(sys.argv) < 2:
+ print "Usage: write-data file1 file2 ..."
+ print "Writes files to a disc or an image."
+ sys.exit (1)
+
+# This is absolutely necessary
+braseroburn.start ()
+
+# First create a graft point uri (uri/path of an existing file)
+# and path (where it should be located on the disc image)
+# then add it to a TrackData (here a TrackDataCfg but this is
+# done the same way) and finally add the track to a BraseroSession
+# (here a BraseroSessionCfg which autoconfigures itself and is
+# necessary to work with BurnOptions dialog).
+track = braseroburn.TrackDataCfg ()
+grafts = []
+
+for arg_num in range (1, len (sys.argv)):
+ grafts = grafts + [braseroburn.GraftPoint (sys.argv [arg_num])]
+ print "Adding file '" + sys.argv [arg_num] + "'"
+
+track.set_source (grafts, None)
+session = braseroburn.SessionCfg ()
+session.add_track (track, None)
+
+# Run configure dialog
+option_dialog = braseroburn.BurnOptions (session)
+res = option_dialog.run ()
+option_dialog.destroy ()
+
+if res != gtk.RESPONSE_OK:
+ exit ()
+
+# Run BurnDialog and that's it
+burn_dialog = braseroburn.BurnDialog ()
+burn_dialog.show ()
+burn_dialog.run (session)
+option_dialog.destroy ()
+
diff --git a/examples/braseroburn/write-image.py b/examples/braseroburn/write-image.py
new file mode 100644
index 0000000..ebc0126
--- /dev/null
+++ b/examples/braseroburn/write-image.py
@@ -0,0 +1,34 @@
+#! /usr/bin/python
+import sys
+import pygtk
+pygtk.require("2.0")
+import gtk
+import braseromedia
+import braseroburn
+
+if len(sys.argv) != 2:
+ print "Usage: write-image image"
+ print "Writes an image to a disc."
+ sys.exit (1)
+
+# This is absolutely necessary
+braseroburn.start ()
+
+track = braseroburn.TrackImageCfg ()
+track.set_source (sys.argv [1])
+session = braseroburn.SessionCfg ()
+session.add_track (track, None)
+
+# Run configure dialog
+option_dialog = braseroburn.BurnOptions (session)
+res = option_dialog.run ()
+option_dialog.destroy ()
+
+if res != gtk.RESPONSE_OK:
+ exit ()
+
+# Run BurnDialog and that's it
+burn_dialog = braseroburn.BurnDialog ()
+burn_dialog.show ()
+burn_dialog.run (session)
+option_dialog.destroy ()
diff --git a/examples/braseromedia/drive_selection.py b/examples/braseromedia/drive_selection.py
index 6ed4ea6..8c52ee7 100644
--- a/examples/braseromedia/drive_selection.py
+++ b/examples/braseromedia/drive_selection.py
@@ -5,6 +5,17 @@ sys.path.append ('..')
import gtk, gobject
import braseromedia
+# Test listing of drives as they are overriden */
+monitor = braseromedia.MediumMonitor ()
+
+media = monitor.get_media (braseromedia.TYPE_ALL)
+for medium in media:
+ print "Medium " + medium.get_name ()
+
+drives = monitor.get_drives (braseromedia.TYPE_ALL)
+for drive in drives:
+ print "Drive " + drive.get_display_name ()
+
s = braseromedia.DriveSelection()
def foo ():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]