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 NULL device accepts data and sends it to the bit bucket. Like
22 /dev/null, you cannot read from the NULL device -- only
23 write. While useful for testing, the NULL device is incredibly
24 dangerous in practice (because it eats your data). So it will
25 generate warnings whenever you use it. */
28 #include <glib-object.h>
29 #ifndef __NULL_DEVICE_H__
30 #define __NULL_DEVICE_H__
32 /* This header file is very boring, because the class just overrides
36 * Type checking and casting macros
38 #define TYPE_NULL_DEVICE (null_device_get_type())
39 #define NULL_DEVICE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), null_device_get_type(), NullDevice)
40 #define NULL_DEVICE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), null_device_get_type(), NullDevice const)
41 #define NULL_DEVICE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), null_device_get_type(), NullDeviceClass)
42 #define IS_NULL_DEVICE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), null_device_get_type ())
44 #define NULL_DEVICE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), null_device_get_type(), NullDeviceClass)
47 * Main object structure
49 #ifndef __TYPEDEF_NULL_DEVICE__
50 #define __TYPEDEF_NULL_DEVICE__
51 typedef struct _NullDevice NullDevice;
60 typedef struct _NullDeviceClass NullDeviceClass;
61 struct _NullDeviceClass {
62 DeviceClass __parent__;
70 GType null_device_get_type (void);
71 void null_device_register (void);