b424d7eeafa87e70cca59ed25bf82742ad020649
[debian/amanda] / server-src / taper-port-source.h
1 /*
2  * Amanda, The Advanced Maryland Automatic Network Disk Archiver
3  * Copyright (c) 2005-2008 Zmanda Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19
20 /* The taper port source is a taper source (see taper-source.h)
21    used for the case where we are reading directly from a client
22    (PORT-WRITE). */
23
24 #include <glib.h>
25 #include <glib-object.h>
26
27 #include "taper-source.h"
28
29 #ifndef __TAPER_PORT_SOURCE_H__
30 #define __TAPER_PORT_SOURCE_H__
31
32 /*
33  * Type checking and casting macros
34  */
35 #define TAPER_TYPE_PORT_SOURCE  (taper_port_source_get_type())
36 #define TAPER_PORT_SOURCE(obj)  G_TYPE_CHECK_INSTANCE_CAST((obj), taper_port_source_get_type(), TaperPortSource)
37 #define TAPER_PORT_SOURCE_CONST(obj)    G_TYPE_CHECK_INSTANCE_CAST((obj), taper_port_source_get_type(), TaperPortSource const)
38 #define TAPER_PORT_SOURCE_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST((klass), taper_port_source_get_type(), TaperPortSourceClass)
39 #define TAPER_IS_PORT_SOURCE(obj)       G_TYPE_CHECK_INSTANCE_TYPE((obj), taper_port_source_get_type ())
40
41 #define TAPER_PORT_SOURCE_GET_CLASS(obj)        G_TYPE_INSTANCE_GET_CLASS((obj), taper_port_source_get_type(), TaperPortSourceClass)
42
43 /*
44  * Main object structure
45  */
46 #ifndef __TYPEDEF_TAPER_PORT_SOURCE__
47 #define __TYPEDEF_TAPER_PORT_SOURCE__
48 typedef struct _TaperPortSource TaperPortSource;
49 #endif
50 struct _TaperPortSource {
51     TaperSource __parent__;
52     /*< private >*/
53     int socket_fd; /* protected. */
54 };
55
56 /*
57  * Class definition
58  */
59 typedef struct _TaperPortSourceClass TaperPortSourceClass;
60 struct _TaperPortSourceClass {
61         TaperSourceClass __parent__;
62 };
63
64
65 /*
66  * Public methods
67  */
68 GType   taper_port_source_get_type      (void);
69
70 #endif