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
21 /* The RAIT device encapsulates some number of other devices into a single
22 * redundant device. */
28 #include <glib-object.h>
32 * Type checking and casting macros
34 #define TYPE_RAIT_DEVICE (rait_device_get_type())
35 #define RAIT_DEVICE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), rait_device_get_type(), RaitDevice)
36 #define RAIT_DEVICE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), rait_device_get_type(), RaitDevice const)
37 #define RAIT_DEVICE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), rait_device_get_type(), RaitDeviceClass)
38 #define IS_RAIT_DEVICE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), rait_device_get_type ())
40 #define RAIT_DEVICE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), rait_device_get_type(), RaitDeviceClass)
43 * Main object structure
45 typedef struct RaitDevicePrivate_s RaitDevicePrivate;
46 typedef struct RaitDevice_s {
49 RaitDevicePrivate * private;
55 typedef struct _RaitDeviceClass RaitDeviceClass;
56 struct _RaitDeviceClass {
57 DeviceClass __parent__;
64 GType rait_device_get_type (void);
65 Device * rait_device_factory (char * type,
67 /* Pass this factory a NULL-terminated array of Devices, and it will make a
68 RAIT out of them. The returned device refss the passed devices, so unref
70 Device * rait_device_new_from_devices(Device ** devices);
71 void rait_device_register (void);
75 #endif /* __cplusplus */