Implemented crossplatform automatic startup management.
[udpgate.git] / src / startup.h
1 /* $Id$
2  * Include file for UDP Gateway utility startup scripts s inheritance support
3  * Copyright (C) 2004 Jan Kratochvil <project-udpgate@jankratochvil.net>
4  * 
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; exactly version 2 of June 1991 is required
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19
20 #ifndef _UDPGATE_STARTUP_H
21 #define _UDPGATE_STARTUP_H 1
22
23
24 #include <glib/gtypes.h>
25 #include <glib-object.h>
26
27
28 G_BEGIN_DECLS
29
30 #define UDPGATE_TYPE_STARTUP (udpgate_startup_get_type())
31 #define UDPGATE_STARTUP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),UDPGATE_TYPE_STARTUP,UdpgateStartup))
32 #define UDPGATE_STARTUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),UDPGATE_TYPE_STARTUP,UdpgateStartupClass))
33 #define UDPGATE_IS_STARTUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),UDPGATE_TYPE_STARTUP))
34 #define UDPGATE_IS_STARTUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),UDPGATE_TYPE_STARTUP))
35 #define UDPGATE_STARTUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),UDPGATE_TYPE_STARTUP,UdpgateStartupClass))
36
37 typedef struct _UdpgateStartup UdpgateStartup;
38 typedef struct _UdpgateStartupClass UdpgateStartupClass;
39
40 struct _UdpgateStartup
41 {
42         GObject parent_instance;
43 };
44
45 struct _UdpgateStartupClass
46 {
47         GObjectClass parent_class;
48
49         gboolean (*init)(UdpgateStartup *udpgate_startup);
50         gboolean (*query)(UdpgateStartup *udpgate_startup,gboolean *is_on);
51         gboolean (*on)(UdpgateStartup *udpgate_startup);
52         gboolean (*off)(UdpgateStartup *udpgate_startup);
53 };
54
55 GType udpgate_startup_get_type(void) G_GNUC_CONST;
56 UdpgateStartup *udpgate_startup_new(void);
57 gboolean udpgate_startup_query(UdpgateStartup *udpgate_startup,gboolean *is_on);
58 gboolean udpgate_startup_on(UdpgateStartup *udpgate_startup);
59 gboolean udpgate_startup_off(UdpgateStartup *udpgate_startup);
60
61 G_END_DECLS
62
63
64 #endif /* _UDPGATE_STARTUP_H */