brasero r1064 - trunk/src



Author: philippr
Date: Sat Aug  9 14:08:41 2008
New Revision: 1064
URL: http://svn.gnome.org/viewvc/brasero?rev=1064&view=rev

Log:
Forgotten files ARrrghh

Added:
   trunk/src/scsi-mode-select.c
   trunk/src/scsi-write-page.h
Modified:
   trunk/src/Makefile.am

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Sat Aug  9 14:08:41 2008
@@ -268,7 +268,6 @@
 	brasero-video-tree-model.c         \
 	brasero-video-tree-model.h         \
 	scsi-write-page.h         \
-	scsi-mode-select.h         \
 	scsi-mode-select.c
 
 if BUILD_INOTIFY

Added: trunk/src/scsi-mode-select.c
==============================================================================
--- (empty file)
+++ trunk/src/scsi-mode-select.c	Sat Aug  9 14:08:41 2008
@@ -0,0 +1,102 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * brasero
+ * Copyright (C) Philippe Rouquier 2007-2008 <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 Library 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., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <glib.h>
+
+#include "scsi-error.h"
+#include "scsi-utils.h"
+#include "scsi-base.h"
+#include "scsi-command.h"
+#include "scsi-opcodes.h"
+#include "scsi-mode-pages.h"
+
+/**
+ * MODE SELECT command description (defined in SPC, Scsi Primary Commands) 
+ */
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+
+struct _BraseroModeSelectCDB {
+	uchar opcode		:8;
+
+	uchar SP		:1;
+	uchar reserved0		:3;
+	uchar PF		:1;
+	uchar reserved1		:3;
+
+	uchar reserved2		[5];
+
+	uchar alloc_len		[2];
+	uchar ctl;
+};
+
+#else
+
+struct _BraseroModeSelectCDB {
+	uchar opcode		:8;
+
+	uchar reserved0		:3;
+	uchar PF		:1;
+	uchar reserved1		:3;
+	uchar SP		:1;
+
+	uchar reserved2		[5];
+
+	uchar alloc_len		[2];
+	uchar ctl;
+};
+
+#endif
+
+typedef struct _BraseroModeSelectCDB BraseroModeSelectCDB;
+
+BRASERO_SCSI_COMMAND_DEFINE (BraseroModeSelectCDB,
+			     MODE_SELECT,
+			     BRASERO_SCSI_WRITE);
+
+#define BRASERO_MODE_DATA(data)			((BraseroScsiModeData *) (data))
+
+BraseroScsiResult
+brasero_spc1_mode_select (BraseroDeviceHandle *handle,
+			  BraseroScsiModeData *data,
+			  int size,
+			  BraseroScsiErrCode *error)
+{
+	BraseroModeSelectCDB *cdb;
+	BraseroScsiResult res;
+
+	cdb = brasero_scsi_command_new (&info, handle);
+	cdb->PF = 1;
+	cdb->SP = 0;
+
+	/* Header pages lengths should be 0 */
+	BRASERO_SET_16 (data->hdr.len, 0);
+	BRASERO_SET_16 (data->hdr.bdlen, 0);
+
+	BRASERO_SET_16 (cdb->alloc_len, size);
+	res = brasero_scsi_command_issue_sync (cdb, data, size, error);
+	brasero_scsi_command_free (cdb);
+
+	return res;
+}

Added: trunk/src/scsi-write-page.h
==============================================================================
--- (empty file)
+++ trunk/src/scsi-write-page.h	Sat Aug  9 14:08:41 2008
@@ -0,0 +1,149 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * brasero
+ * Copyright (C) Philippe Rouquier 2007-2008 <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 Library 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., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ */
+ 
+#ifndef _SCSI_WRITE_PAGE_H
+#define _SCSI_WRITE_PAGE_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+/**
+ * Write Parameters Page
+ */
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+
+struct _BraseroScsiWritePage {
+	uchar code		:6;
+	uchar reserved		:1;
+	uchar ps		:1;
+
+	uchar len;
+
+	uchar write_type	:4;
+	uchar testwrite		:1;
+	uchar LS_V		:1;
+	uchar BUFE		:1;
+	uchar reserved1		:1;
+
+	uchar track_mode	:4;
+	uchar copy		:1;
+	uchar FP		:1;
+	uchar multisession	:2;
+
+	uchar book_type		:4;
+	uchar reserved2		:4;
+
+	uchar link_size;
+
+	uchar reserved3;
+
+	uchar app_code		:6;
+	uchar reserved4		:2;
+
+	uchar session_format;
+
+	uchar reserved5;
+
+	uchar packet_size	[4];
+
+	uchar pause_len		[2];
+
+	uchar MCN		[16];
+
+	uchar ISRC_COL		[16];
+
+	uchar sub_hdr0;
+	uchar sub_hdr1;
+	uchar sub_hdr2;
+	uchar sub_hdr3;
+
+	uchar vendor		[4];
+};
+
+#else
+
+struct _BraseroScsiWritePage {
+	uchar ps		:1;
+	uchar reserved		:1;
+	uchar code		:6;
+
+	uchar len;
+
+	uchar reserved1		:1;
+	uchar BUFE		:1;
+	uchar LS_V		:1;
+	uchar testwrite		:1;
+	uchar write_type	:4;
+
+	uchar multisession	:2;
+	uchar FP		:1;
+	uchar copy		:1;
+	uchar track_mode	:4;
+
+	uchar reserved2		:4;
+	uchar book_type		:4;
+
+	uchar link_size;
+
+	uchar reserved3;
+
+	uchar reserved4		:2;
+	uchar app_code		:6;
+
+	uchar session_format;
+
+	uchar reserved5;
+
+	uchar packet_size	[4];
+
+	uchar pause_len		[2];
+
+	uchar MCN		[16];
+
+	uchar ISRC_COL		[16];
+
+	uchar sub_hdr0;
+	uchar sub_hdr1;
+	uchar sub_hdr2;
+	uchar sub_hdr3;
+
+	uchar vendor		[4];
+};
+
+#endif
+
+typedef struct _BraseroScsiWritePage BraseroScsiWritePage;
+
+typedef enum {
+	BRASERO_SCSI_WRITE_PACKET	= 0x00,
+	BRASERO_SCSI_WRITE_TAO		= 0x01,
+	BRASERO_SCSI_WRITE_SAO		= 0x02,
+	BRASERO_SCSI_WRITE_RAW		= 0x03
+
+	/* Reserved */
+} BraseroScsiWriteMode;
+
+G_END_DECLS
+
+#endif /* _SCSI_WRITE_PAGE_H */
+
+ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]