2 * Copyright (c) 2005 Zmanda, Inc. All Rights Reserved.
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 2.1 as
6 * published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11 * License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17 * Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
18 * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
27 * Type checking and casting macros
29 #define TYPE_TAPE_DEVICE (tape_device_get_type())
30 #define TAPE_DEVICE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), tape_device_get_type(), TapeDevice)
31 #define TAPE_DEVICE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), tape_device_get_type(), TapeDevice const)
32 #define TAPE_DEVICE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), tape_device_get_type(), TapeDeviceClass)
33 #define IS_TAPE_DEVICE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), tape_device_get_type ())
35 #define TAPE_DEVICE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), tape_device_get_type(), TapeDeviceClass)
38 * Main object structure
40 typedef struct TapeDevicePrivate_s TapeDevicePrivate;
41 typedef struct _TapeDevice {
44 /* It should go without saying that all this stuff is
45 * look-but-don't-touch. */
46 guint min_block_size, max_block_size, fixed_block_size, read_block_size;
47 FeatureSupportFlags fsf, bsf, fsr, bsr, eom, bsf_after_eom;
50 /* 0 if we opened with O_RDWR; error otherwise. */
51 gboolean write_open_errno;
52 gboolean first_file; /* Is this the first file in append mode? */
55 TapeDevicePrivate * private;
61 typedef struct _TapeDeviceClass TapeDeviceClass;
62 struct _TapeDeviceClass {
63 DeviceClass __parent__;
70 GType tape_device_get_type (void);
71 Device* tape_device_factory (char * type,
73 void tape_device_register (void);