X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=src%2Fstartup.h;h=68abed1478422da20f2106e9fcbfd0e8ef2f3f25;hb=91537644d1e946d3ed9b53c6eb69d1dbe2579f4e;hp=da8727da2cead25b007f9ec454c8bea1883d615b;hpb=35bf1dea80e8e3007ad127c1d5c0fc4fc3f80476;p=udpgate.git diff --git a/src/startup.h b/src/startup.h index da8727d..68abed1 100644 --- a/src/startup.h +++ b/src/startup.h @@ -1,5 +1,5 @@ /* $Id$ - * Include file for UDP Gateway utility startup scripts support + * Include file for UDP Gateway utility startup scripts s inheritance support * Copyright (C) 2004 Jan Kratochvil * * This program is free software; you can redistribute it and/or modify @@ -22,14 +22,41 @@ #include +#include G_BEGIN_DECLS -gboolean startup_init(void); -gboolean startup_query(gboolean *is_on); -gboolean startup_on(void); -gboolean startup_off(void); +#define UDPGATE_TYPE_STARTUP (udpgate_startup_get_type()) +#define UDPGATE_STARTUP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),UDPGATE_TYPE_STARTUP,UdpgateStartup)) +#define UDPGATE_STARTUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),UDPGATE_TYPE_STARTUP,UdpgateStartupClass)) +#define UDPGATE_IS_STARTUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),UDPGATE_TYPE_STARTUP)) +#define UDPGATE_IS_STARTUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),UDPGATE_TYPE_STARTUP)) +#define UDPGATE_STARTUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),UDPGATE_TYPE_STARTUP,UdpgateStartupClass)) + +typedef struct _UdpgateStartup UdpgateStartup; +typedef struct _UdpgateStartupClass UdpgateStartupClass; + +struct _UdpgateStartup +{ + GObject parent_instance; +}; + +struct _UdpgateStartupClass +{ + GObjectClass parent_class; + + gboolean (*init)(UdpgateStartup *udpgate_startup); + gboolean (*query)(UdpgateStartup *udpgate_startup,gboolean *is_on); + gboolean (*on)(UdpgateStartup *udpgate_startup); + gboolean (*off)(UdpgateStartup *udpgate_startup); +}; + +GType udpgate_startup_get_type(void) G_GNUC_CONST; +UdpgateStartup *udpgate_startup_new(void); +gboolean udpgate_startup_query(UdpgateStartup *udpgate_startup,gboolean *is_on); +gboolean udpgate_startup_on(UdpgateStartup *udpgate_startup); +gboolean udpgate_startup_off(UdpgateStartup *udpgate_startup); G_END_DECLS